[Image-SIG] PIL and 16 bit Images
Rob Hooft
R.Hooft@EuroMail.com
Tue, 25 Aug 1998 13:39:21 +0200 (MZT)
>>>>> "BA" == Brian Adams <Brian_Adams@brown.edu> writes:
BA> Does PIL handle 16 bit images? I have some 16 bit greyscale raw
BA> data images that I am trying to display using PIL. The only way I
BA> can get it to look "right" is if I scale all the data to 8 bit
BA> before creating the image using "fromstring". I would like to be
BA> able to view it in 16 bit, not 8.
I have the same kind of data (from 16 bit CCD's). A real problem is that
displays do not have 16 bit grey-scales: I think the best you can get
is 8 bit (maybe 12 somewhere). Even if the display can show more than
8 bit, you eyes can't see the difference.
What I did is create a few classes that clip (upper and lower limits)
and scale (currently I have logarithmic and linear, but histogram
equality is another nice possibility) the 16 bit data into 8 bit
images using 'Numeric'. This gives me the flexibility to look at any
set of "consecutive bits" out of the 16.
Regards,
--
===== R.Hooft@EuroMail.com http://www.Sander.EMBL-Heidelberg.DE/rob/ ==
===== R&D, Nonius BV, Delft http://www.nonius.com/ ==
===== PGPid 0xFA19277D ========================== Use Linux! ==================