|
Author |
Topic: Uneven lighting and webcamxtra (Read 796 times) |
|
winston_smith
|
Uneven lighting and webcamxtra
« on: Aug 23rd, 2004, 12:18pm » |
|
Howdy, I've noticed that actually using the bounding box information is subverted by uneven lighting in a given scene. I'm trying to develop a rather simple facial recognition engine (all it does is extract bounding boxes around only the eyes, nose, and mouth). When a light source is far to either side, globs are less dense on the brighter side, hence smaller. And with min/maxDensity being fairly narrow, this makes a huge impact... I'd like to preprocess each video frame before feeding through JMyron. How might I "balance" the light, such that no area of the image is washed out nor darkened too much... I guess it comes down to enhancing contrast selectively or something... Any ideas?
|
|
|
|
TomC
|
Re: Uneven lighting and webcamxtra
« Reply #1 on: Aug 23rd, 2004, 2:55pm » |
|
You probably want to do something like histogram equalisation. It might be the case that histogram analysis would allow you to more accurately pick the colours you are trying to detect, without actually needing to process the image first. That will make sense if you're familiar with histograms. These links might help with implementation: http://homepages.inf.ed.ac.uk/cgi/rbf/CVONLINE/entries.pl?TAG571 http://homepages.inf.ed.ac.uk/cgi/rbf/CVONLINE/entries.pl?TAG553 If you're not familiar with image histograms - they are basically a count of how many times each value occurs. So you might make a brightness histogram, and count how many times each value (0,1,2,...,255)occurs and decide that the most popular value would be the threshold value you were looking for.
|
|
|
|
winston_smith
|
Re: Uneven lighting and webcamxtra
« Reply #2 on: Aug 23rd, 2004, 10:01pm » |
|
Ahh, just what I was looking for. I'm a self-proclaimed photoshop wiz, but somehow this solution was way over my head for some reason... thanks!
|
|
|
|
TomC
|
Re: Uneven lighting and webcamxtra
« Reply #3 on: Aug 23rd, 2004, 11:27pm » |
|
Ah yes, another one sacrificed at the altar of auto-levels. Eeeh... when I were a lad we had to code our own histograms, grumble, grumble, etc.
|
|
|
|
|