OpenCV Select Ink On Scanned Page
<p>Say we have a picture of a page with text on it. However, a threshold is not sufficient. On an example image, the page has a large shadow that covers half the image, such that at some points, there is paper that is darker than the lightest ink.</p>

<p>What's the best way to get a mask of the ink on the page? I'm thinking it's something like edge detection, although I wouldn't then know how to select the inner part of the ink.</p>

<p>I'm doing this in Python, so answers in that would be most helpful!</p>

<p>There are two things you can try:</p>

<ul>
<li>Convert the image to HSV and check the hue component</li>
<li>Use algorithms to remove shadow from the image and then process it.
An example of such methods can be found  in <a href="http://www.serc.iisc.ernet.in/~venky/SE263/papers/Salvador_CVIU2004.pdf" rel="nofollow">this paper</a>  </li>
</ul>

python opencv mask threshold