I have a very simple OCR app based on Tesseract. After the recognition step, I also provide a user verification step that allows correction in case OCR is wrong. To improve the user interface, I plan to draw a rectangle on top of the OCR-ed character on the original input image, and put it side by side with the OCR output. To get to that, I need the coordinate of the recognized characters.
I tried something like this but it seems to give me gibberish:
ETEXT_DESC output;
tess->Recognize(&output);
text = tess->GetUTF8Text();
Now if I access output->count, it gives me some value above 10,000, which is obviously wrong because the whole image only has 20 or so characters.
Am I on the right track? Can I have some direction please?
Maybe it's helpful to get the coordinates of the boxes. Try the executable of tesseract. Use the command
"tesseract.exe [image] [output] makebox"
Afterall you get the coordinates of each character, one per row. Then you are able to compare.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With