Re: 14 bit image in false color [message #53202] |
Thu, 29 March 2007 14:27 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
rpertaub@gmail.com writes:
> Maybe what I am trying to do is not possible?
Well, it's *possible*. We just did it. The real
question is whether it provides you with any
information. And this I greatly doubt, since there
is no earthly reason (maybe this is a planetary
picture, so there is still hope) for arbitrarily
dividing the "colors" as we did.
I'd learn about the BYTSCL and the TV commands. (Forget
about TVSCL if you are doing real science. It's really
only good for fooling around.) But this way at least
you have some chance of interpreting your image.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: 14 bit image in false color [message #53203 is a reply to message #53202] |
Thu, 29 March 2007 14:21  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Put that up on the web. I'd be interested to see what
> that looks like. :-)
After a little more experimenting, I have even less
hope than before. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: 14 bit image in false color [message #53204 is a reply to message #53203] |
Thu, 29 March 2007 13:16  |
rpertaub@gmail.com
Messages: 43 Registered: January 2007
|
Member |
|
|
On Mar 29, 4:08 pm, David Fanning <n...@dfanning.com> wrote:
> rpert...@gmail.com writes:
>> I have a 14 bit image, that I obviously cannot see with TV, but need
>> to use, TVSCL or bytescale the image before using TV. My question is
>> this: I want to see the 14 bit image without any scaling, and would
>> think I would be able to do this withfalsecoloring, since we have
>> millions ofcolorin a 32 bit display...
>> But I am not sure how to do that in IDL.
>
> I don't know how you are going to do it either, since
> 14 doesn't divide by 3 evenly. :-)
>
> The best you could do would be 16 * 32 * 32 = 16,384
> colors. But you might try something like this. Let's
> say 32 shades of red, 32 shades of green and 16 shades
> of blue.
>
> red = image AND (2^0 + 2^1 + 2^2 + 2^3 + 2^4)
> grn = image AND (2^5 + 2^6 + 2^7 + 2^8 + 2^9)
> blu = image AND (2^10 + 2^11 + 2^12 + 2^13)
>
> image24 = [[[BytScl(red)]], [[BytScl(grn)]], [[BytScl(blu)]]]
> TV, image24, TRUE=3
>
> Put that up on the web. I'd be interested to see what
> that looks like. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
This 14-bit image I have was actually taken by a camera that saved the
14 bit on 2 pixels. i.e. 1 pixel info of 14-bit was saved on 2 8 bit
pixels, therefore I had to do a small algorithm to figure out the
values of the pixel. (just some background). The funny thing, when I
do TV image, the image is snowy, and when I do TVSCL it is the right
image (white dots against dark background). I tried the few lines you
posted, unfortunately, it gave me only colored snowy image, and not
the (colored) dots I would expect...Maybe what I am trying to do is
not possible?
|
|
|
Re: 14 bit image in false color [message #53205 is a reply to message #53204] |
Thu, 29 March 2007 14:08  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
rpertaub@gmail.com writes:
> I have a 14 bit image, that I obviously cannot see with TV, but need
> to use, TVSCL or bytescale the image before using TV. My question is
> this: I want to see the 14 bit image without any scaling, and would
> think I would be able to do this with false coloring, since we have
> millions of color in a 32 bit display...
> But I am not sure how to do that in IDL.
I don't know how you are going to do it either, since
14 doesn't divide by 3 evenly. :-)
The best you could do would be 16 * 32 * 32 = 16,384
colors. But you might try something like this. Let's
say 32 shades of red, 32 shades of green and 16 shades
of blue.
red = image AND (2^0 + 2^1 + 2^2 + 2^3 + 2^4)
grn = image AND (2^5 + 2^6 + 2^7 + 2^8 + 2^9)
blu = image AND (2^10 + 2^11 + 2^12 + 2^13)
image24 = [[[BytScl(red)]], [[BytScl(grn)]], [[BytScl(blu)]]]
TV, image24, TRUE=3
Put that up on the web. I'd be interested to see what
that looks like. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|