On 23/06/2012, at 11:56 PM, Stefan Stavrev wrote:

> Malcolm can you please give me more details what do you mean by "pivot 
> parameter"?

With unbounded images especially (values over 1.0) the average value most 
likely is not the centre of the visual range. Contrast conceptually as it is 
reduced should arrive closer to this centre point (middle grey in most cases).

> At this point I do this per channel for each pixel:
> 
> new_value = (value - average) * contrast + average

This is what you could call a linear contrast, these are useful mostly for data 
images like masks etc where the relationship between the highest value and the 
lowest value is linear.

> where average is the average pixel value for that channel. I assume you refer 
> to average, instead I can use a parameter as you suggest.

For images its more visually appealing to use something more like this (some 
people call this a filmic contrast):

out = pow(in * pow(pivot, 1.0 / contrast - 1.0), contrast)

There are a few different flavors of this contrast math, so maybe look for 
consensus from the list before just using this.

.malcolm

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

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

Reply via email to