[Image-SIG] Odd behavior in PIL 1.1.4 equalization
Fredrik Lundh
fredrik at pythonware.com
Thu May 5 11:04:31 CEST 2005
David Kirtley wrote:
> I seem to have found an odd behavior in the equalization.
>
> I created a series of test images with PIL for a demonstration:
> a 300x300 RGB image with three bars of gray with offsets of 20 in
> all three channels
> with starting values of 0 to 200 in steps of 50.
>
> I expected the equalization routine to move them to 0, 128, 255 as per
> the definition of Histogram Equailzation but to my suprise the
> equalization routine decides to instead
> set them to 0, 85, 170.
>
> Is this intended functionality? Is this a bug/feature? :)
looks like an off-by-one error (note that 170+85=255). should only
cause problems for extreme cases, and should be trivial to fix.
I'll into this for 1.1.6 (patches are welcome).
</F>
More information about the Image-SIG
mailing list