Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There shpuld be quite a lot of research going on in this area, but unfortunately I have no good links to give.</p> <p>An idea, which might work but I have not tested, is to try to estimate the lighting variations and then remove that before thresholding (which is a better term than "binarization"). The problem is then moved from adaptive thresholding to finding a good lighting model.</p> <p>If you know anything about the light sources then you could of course build a model from that. </p> <p>Otherwise a quick hack that might work is to apply a really heavy low pass filter to your image (blur it) and then use that as your lighting model. Then create a difference image between the original and the blurred version, and threshold that.</p> <p><strong>EDIT</strong>: After quick testing, it appears that my "quick hack" is not really going to work at all. After thinking about it I am not very surprised either :)</p> <pre><code>I = someImage Ib = blur(I, 'a lot!') Idiff = I - Idiff It = threshold(Idiff, 'some global threshold') </code></pre> <p><strong>EDIT 2</strong> Got one other idea which could work depending on how your images are generated. Try estimating the lighting model from the first few rows in the image:</p> <ol> <li>Take the first N rows in the image</li> <li>Create a mean row from the N collected rows. You know have one row as your background model.</li> <li>For each row in the image subtract the background model row (the mean row).</li> <li>Threshold the resulting image.</li> </ol> <p>Unfortunately I am at home without any good tools to test this.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload