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.