View Single Post
Old 25th July 2004, 18:57   #14  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
It gets clearer with some curves. The following curves are not mathematically exact - they're quickly free-handed, but give the idea.

A plain gamma correction looks like this:


We get a strong brightening effect over the full range. But from about 35% of the available range, we start loosing contrast (steepyness of curve gets < 1).

Ylevels simply blends the normal gamma curve, weightened with the inverse of the input's brightness. The result is similar to this:


By this weightening, the brightening of the dark areas is still achieved. But here, the cost of the additional levels that were assigned to the darks is distributed more equally over the remaining ranges: the curve's steepyness goes only a little below '1', plus the curve's overall deviation from y=x is much smaller.

You can tweak your levels().tweak() - combo until you get blue in the face: you'll never get the same effect. Starting with normal levels(), contrast in the upper 65% is lost. Then, you can get it back
- if at all, only with loss. Expanding the compressed ranges again will lead to posterization, because actually values got lost during gamma correction
- not at all with tweak() - (not really), since its contrast parameter works symetrically to Y=127.


Hey, I don't want to sell anything here

But the difference is really easy to spot, in my opinion:

interleave( levels(...).tweak(...), Ylevels(...) )

Flip this back 'n forth, and don't say you see no difference


- Didée
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 25th July 2004 at 19:10.
Didée is offline   Reply With Quote