Search code examples
javatesseract

Java: Tesseract-ocr: How to find word co-ordinates?


Recently i have success using Tesseract-ocr in converting PNG file into Text. I am Using Java.

Scenario: I am taking screenshot(PNG) of the Mobile app and using Tesseract for converting PNG file into Text.

Question: When i convert PNG file into Text, can i also get coordinates(X,Y) of the certain text element on the mobile screen?

Example: Upon Conversion of PNG file into Text, text shows like this "Help people interested in this repository understand your project by adding a README."

In the above Example can i get coordinate(X,Y) of the Text element "understand" ?

This is my Project in git:

https://github.com/rkandanuru/Tess4J.git

Regards, Rakesh


Solution

  • Not sure about Tess4J running on mobile platform, but there are several examples of getting word coordinates in its unit tests.