Hello,

I just mention who a constrast can be better with using soft clipping
equations.
If you just apply a linear correction you can insert clamped values.
Using curves like:
http://www.luminous-landscape.com/forum/index.php?topic=52364.0
y = x^2*2 for x<=0.5
y = 1-(1-x)^2*2 for x>0.5

can offer contrast adjustment without clipping values.

But I don't know if it's the goal of OpenImageIO to add these process.
I think it could be better if it only a library to opening/writing files,
others projects can used this project to apply effects.



2012/7/24 Stefan Stavrev <[email protected]>

> 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
>
>


-- 
Marc-Antoine* *ARNAUD
Software Engineer

Mikros Image - Digital Post-Production for Video and Film
www.mikrosimage.eu
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to