aku wrote:I.e. you want something like
http://www.comp.nus.edu.sg/~tancl/Paper ... p03-lu.pdf
and the follow-up paper
In fact my illumination equalization code is already based on that paper. However, this method when applied as is, fails in the presence of large pictures. Therefore, I do some preprocessing first. That preprocessing makes an assumption that gray levels along a vertical scan line don't form cavities. That is, it can be lighter in the middle, but it can't be darker. If it is, it's assumed to be a picture. That's what is happening in Antoha-spb's case.
Thinking about it today, I came up with another idea for preprocessing, which wouldn't have this limitation. I'll try it in the next days.