I'm interested in adding the ability to output the coordinates where characters and words were found. It looks like there is quite a bit of code here. Does anybody maybe have a pointer of where to start looking?
I would be interested in having this ability as well.
I believe your answer to the coordinate issue is through the api_main() functions which uses the function ocr_append_char() which has all the data you need. I am still researching this. I will write some documentation on it when I am done.
I can do a little bit of C++ so I can maybe help put the code together.
I have successfully reverse engineered the api_main function. I am able to get coordinates and other stuff from the tesseract and use it in my program. I would post the code but I talked to the admin on this project and a simpler API is coming so I will wait for that release. I will post my code and any mods that need to be done to the simple api to get coordinates.
Would you mind sending me the code to get the coordinates? That would be extremely helpful!
here is a windows dll that gives coordinates. There is hope for the code for this dll to be in the next version of tess:
I built tesseract from source on a Mac running os 10.4.1 and it ran fine. My application is to automate document processing in my medical office. I plan on printing ID information on the top of the page to direct automated filing of documents. To speed up the process it seems reasonable to tell tesseract where to look on the document, so restricting scanning to a part of the document would make sense. I'm posting in this thread since getting coordinates out is going to overlap with putting coordinates in.
Where in the source code should I look for this? (Besides api_main and ocr_append_char).
Also, what command line options would make sense? If I may suggest,
-r, --region=REGION, specified as (x1,y1:x2,y2)
Output coordinates to standard output
It would be very nice if tesseract used the same format describing rectangular regions as libdmtx does. That way one programs output could be fed to the other to speed workflows.
(Stolen from libdmtx http://www.libdmtx.org/display.php?text=dmtxread.1\)
Log in to post a comment.