We can have both. The contrast algorithm for color images is:

1. RGB -> HSI.
2. Apply histogram equalization to I.
3. HSI -> RGB.

Step 2 can be replaced by another contrast modification algorithm that does
take parameters, unlike histogram equalization.

The only question left is, which contrast formula do we use:

1. out = (in - average) * contrast + average
2. out = pow(in * pow(pivot, 1.0 / contrast - 1.0), contrast)

I have tested 1) for grayscale and color images and it is not bad, gives
good results. Malcolm's formula 2) is probably better, but have not tried
it.

Chris I would suggest we transfer the contrast conversation in the
"Contrast" topic started. Also, the contrast algorithm will need color
space conversions, for which I don't know yet if I should write them or
maybe I could use something already existing. Not sure if Jeremy has those
in OpenColorIO. On the other hand I think we can merge the histogram
functions in few day, they are really very simple.

Stefan
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to