Backgroud illumination

Backgroud illumination

Post by Kay » Thu, 29 Oct 2009 14:43:04

How can I estimate background illumination within an image?

Backgroud illumination

Post by ImageAnaly » Thu, 29 Oct 2009 19:24:14

Lots of ways, depending on what you mean.
Maybe you should start with learning about "homomorphic filtering." ~stella/papers/blairthesis/main/node33.html


Backgroud illumination

Post by Dave Robin » Thu, 29 Oct 2009 19:33:02

You could lowpass filter the log(intensity) of your image (you need to avoid the log(0) problem on black pixels - add 1 to black pixels (Uint8 format) perhaps).

An image consists of the reflection matrix of your subject (Rm) multiplied by the illumination (I). Thus

Image = Rm*I;

Finding the log gives you
log(Image) = log(Rm) + log(I);

Which is now ameanable to DSP filtering.

In general the spatial frequency matrix of the reflection matrix contains higher frequency components than the illumination matrix, (which for an ideally set out picture would be simply a uniform field). Thus low pass filtering will severely attenuate the reflection matrix contribution, and provides you with an approximation to your illumination field. Simply antilog the result and you may be home and dry.

This process is known as Homomorphic filtering, and sometimes works well.

You can of course imagine an image for which the assumptions on which this technique is based are not valid, and in which case the process wont work.


Dave Robinson