Just a reminder, I am working on manual contrast that
applies this formula to all pixels:
out = (in - pivot) * contrast + pivot

I propose this API: http://ideone.com/thm5e

and this usage:

1. ./oiiotool in.png --contrast contrast -o out.png
This applies the formula to all channels, and assumes
pivot = 0.5(average of 0 and 1), which is mostly used.

If you want to specify pivot then:
./oiiotool in.png --contrast:pivot=0.3 contrast -o out.png

2. ./oiiotool in.png --contrast:rgb=1 contrast -o out.png
This means we have RGB image as input and the formula
is applied to the luminance channel rather than all channels,
which leads to better results.

If we want to specify pivot then:
./oiiotool in.png --contrast:rgb=1:pivot=0.3 contrast -o out.png

So, if the user wants to apply the contrast method to all channels
he can use option 1). If for RGB images he wants better results,
he can use 2). I expect pivot to be rarely changed, the default 0.5
will be good enough for many cases.
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to