The task is as follows - it is required to select cells on a notebook sheet filled with text and lines.

I tried to do this through CV2 , namely through the selection of the canny edges .

The problem is that the text has a more pronounced structure than the cells, and the canny edges selects the text, but not the cell. When the parameter is increased, there is a huge noise, which is impossible to work with.

For example, you can look at this picture. Here you want to draw a cell with the help of the line.

Here is the result of the canny edges with the minimum parameter enter image description here

Increasing this parameter increases the noise level. enter image description here

Are there any other options that allow you to select cell lines, bypassing the text?

  • MB try searching by color? Here is an example of a color search (hsv): github.com/gil9red/SimplePyScripts/tree/… - gil9red
  • @ gil9red, the idea is interesting, but the problem is that this is just one example. Black and white scans can also occur. So strictly indicate the color does not work. Moreover, the color of the pen and the cells are somewhat similar. - magicarm22
  • Googled and found something interesting: cv2.HoughLines - gil9red
  • @ gil9red, HoughLines is used when edges are correctly received. I have, alas, the result is somewhat sad (pictures above) - magicarm22

0