[pwc] images appear too bright... howto for auto-compensation?

Mathieu Bouchard matju at artengine.ca
Wed Apr 25 18:23:55 CEST 2007


On Wed, 25 Apr 2007, Christopher Friedt wrote:

> This is probably a very common question to ask, but can anyone explain 
> vaguely, or point me to a better description, of how one could 
> automatically optimize the image so that it appears 'natural'?

What I do is select a part of the image to focus on, then compute the 
average U and average V of that selection, and then make PWC calls to set 
the white balance until the average is quite close to 0.

For example, I've been selecting everything for Y>100 for example, if 
viewers are going to look at bright objects rather than dark ones. If 
edges and intricate surfaces are more interesting, then use a high-pass 
filter (edge detector) to decide whether a pixel is in or out.

Instead of making a clear-cut selection, you may also give weights to 
pixels, e.g. proportionally to Y, to Y*(256-Y), or the norm the output of 
a high-pass filter. (the norm being square root of Y*Y+U*U+V*V, perhaps 
with special weights for U and V (?))

> Does this have something to do with gamma values?

Gamma is one of many factors that you may have to play with. AFAIK it's 
hard for a program to self-optimise its vision without optimising a 
certain monitor-camera pair and not any of those separately.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada


More information about the pwc mailing list