How to get bounding box with text using Tesseract4Android

54 views
Skip to first unread message

Ju Ash

unread,
Jan 27, 2023, 9:52:01 AM1/27/23
to tesseract-ocr
I am using 'cz.adaptech.tesseract4android:tesseract4android:4.3.0' in my Android project. Is it possible to get bounding box with text data like in example below?
(32, 24, 60, 17) Maitre 
(100, 24, 82, 19) corbeau, 
(191, 28, 29, 13) sur 
(227, 28, 22, 12) un 
(257, 24, 50, 17) arbre 
(315, 24, 70, 21) perché, 
(79, 49, 58, 17) Tenait

Official sample shows how to get plain text only, bot boxes with text inside:

TessBaseAPI tess = getTessBaseAPI(path, context); 
 String text = tess.getUTF8Text();

Zdenko Podobny

unread,
Jan 27, 2023, 11:47:32 AM1/27/23
to tesser...@googlegroups.com
Did you check the documentation? I am not familiar this this android implementation, but I would expect that API example in tesseract documentation should work.


Zdenko


pi 27. 1. 2023 o 10:52 Ju Ash <ashom...@gmail.com> napísal(a):
--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/e937f7bc-5e04-4f85-b7a1-a63f61e00426n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages