[PyOpenGL-Users] False color images
Brought to you by:
mcfletch
From: Derakon <de...@gm...> - 2012-02-10 22:33:58
|
I have a program that displays monochrome camera images, obtained as Numpy arrays of 16-bit integer pixel brightnesses. I'd like to have a false-color mode that displays low values as blue and high values as red, to get some extra contrast and make it easier to tell where the brightest pixels in the image are. I did some searching around and about all I can find is some discussion on using color-index mode, with concern that it's really meant for palettized sprites and isn't really recommended these days. Is that accurate? Presumably this task has been done before; what's the recommended way to do false color? Especially, I want to be able to rescale what value is considered the darkest and what the brightest on the fly -- for example, if I get an image where the distance between darkest and brightest pixel is only 1000 (~10 bits) then I don't want to be scaling things as if the brightest pixel is 2^16-1 and the darkest is 0. Any advice would be recommended. Thanks. -Chris |