[Image-SIG] Re: Help wanted: sensible way to scale 16-bit
grayscaleimage
Fredrik Lundh
fredrik at pythonware.com
Fri Dec 17 09:57:59 CET 2004
Russell E. Owen wrote:
> Right now I am using brute force to create the 8-bit image -- using
> numarray to apply the scaling function to each pixel to create a scaled
> version to display. I had hoped, instead, to specify the desired scaling
> as an array of 256 values that told PIM how to map values from the
> original image down to 8 bits (thus only computing my scaling function
> at 256 points instead of for every pixel in the original image).
>
> It sounds as if PIM does not have LUT support in that sense, which is a
> pity as it seems a natural thing to do.
as I said, "point" with a lookup table is currently only supported for 8-bit
images. for other images, you can use "point" to do linear transforms (by
passing in a lambda of the right form).
adding 16-bit LUT support shouldn't be too hard; I'll look into this for the
next beta. (but you'll have to provide 65536 values, not 256 values)
</F>
More information about the Image-SIG
mailing list