Re: 3D array imaging with different colors [message #83426 is a reply to message #83367] |
Fri, 01 March 2013 07:03  |
tackmeister
Messages: 5 Registered: March 2013
|
Junior Member |
|
|
Op vrijdag 1 maart 2013 15:49:26 UTC+1 schreef David Fanning het volgende:
> If you just want to change the background color. Find all the pixels
>
> that have zeros in all three color channels and change the value of
>
> these pixels to 255 in each color channel. Do the opposite to change
>
> white pixels to black.
>
>
>
> I doubt this will be satisfying to you, because normally in a "mixing"
>
> situation like this, there will be a lot of pixels that are "almost"
>
> black (e.g., [0,1,4]). These will not be found and won't be changed.
>
>
>
> I think it will be easier in your situation to just learn to love black
>
> backgrounds. You will sleep better at night. :-)
>
>
>
> Cheers,
>
>
>
> David
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Aye, I was afraid this would be the final idea. Changing black to white and the other way around does not work perfectly for the reasons you supply yourself. I suppose I could work with a cut-off somewhere that allows for more black-ish values to turn white and more white-ish values to turn black.
But I suppose the 'loving the black backgrounds' would be the best idea indeed. I'll try to work on it ;)
(if in the meantime of course someone does know a better way of doing these things, feel free to share. My latest idea was the following:
;define color table variable for red, green, blue signals:
table = [62,53,49]
;plot the R, G, B images one after the other using transparency:
for i=0,2 do graph=image(a[*,*,i],rgb_table=table[i],/overplot,transparen cy=67)
This works as far as I see, though there is no 'color mixing' and the image looks kind of 'smoky' because of the transparencies. So overall the black background images are to be preferred.)
|
|
|