0

I'm trying to detect the text in a scanned page and get the coordinates of it. See the attached image for an example of scanned page.

I need the vertical coordinates for spliting page from the useless parts, and then detect the text's coordinates.

What kind of tools could I use to split and detect text's coordinates?

Example of scanned page

Tenaciousd93
  • 3,438
  • 4
  • 33
  • 56
  • possible duplicate of [Algorithm to detect presence of text on image](http://stackoverflow.com/questions/4606274/algorithm-to-detect-presence-of-text-on-image) – Adi Shavit May 19 '15 at 10:20

1 Answers1

2

Take a look at the Stroke Width Transform.
See also this SO answer.

Community
  • 1
  • 1
Adi Shavit
  • 16,743
  • 5
  • 67
  • 137
  • +1, thank you for pointing me at "Stroke wifht Transform", I will look at it. However my this case the pictures are not taken outdoor, in natural scene, but taken on a table with almost the same border and almost the same position. SWT could interpretate text in left the page in my example and it's not correct. I will give it a try. Thank you – Tenaciousd93 May 19 '15 at 12:19
  • "fast"? Anyway, if you know where the page is then you might be able to find the white margins. The text would be inside the margins. – Adi Shavit May 19 '15 at 12:22
  • Sorry, I mean "almost". I didn't know the right position of the text, but I know that it will always be on the left or right page, like in the attached image. I try Scan Tailor software that split the image and detect the text rather good. I would like to know if there are some algorithms that I could implement in a workflow to get the coordinates of the text. – Tenaciousd93 May 19 '15 at 12:28