0

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.

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.

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

Jacob Parker
  • 297
  • 4
  • 13

1 Answers1

0

There are two things you can try:

  • Convert the image to HSV and check the hue component
  • Use algorithms to remove shadow from the image and then process it. An example of such methods can be found in this paper
v.coder
  • 1,822
  • 2
  • 15
  • 24