On Oct 31, 3:31 am, shari <[email protected]> wrote: > ->How to call tesseract OCR within opencv code?
Call tesseract.exe (or equivalent) with a config file option on its command line: tesseract.exe sampleImage.png ocrText +config Inside the config file write the line "tessedit_create_hocr 1". Use your favorite programming language's "system()" command to shell to the tesseract executable. Read the output file, ocrText.html, into an XML reader. Parse that XML document with an XPath expression, such as // span[ contains(@title, 'bbox') ] Parse the returned title to inspect the bbox coordinates, such as 'bbox 7 1 216 56'. Use a little arithmetic to find bounding boxes inside the boxes that OpenCV has detected. > ->Which are the header files that have to be included to call > tesseract libraries within the opencv? > ->Having done this,finally how to compile the code?any libraries to be > linked on compiling? I wouldn't mess with source code until exhausting external integration options. If you need any other detail besides bounding boxes Tess might have a configuration for it. Read ccmain/tesseractclass.cpp to learn all the configuration options. -- Phlip -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tesseract-ocr?hl=en

