Passing bounding box coordinates of an detected object from image to extract text

64 views
Skip to first unread message

Petar Mihić

unread,
Feb 8, 2023, 10:26:28 AM2/8/23
to tesseract-ocr
Hello. I made a model in YOLOv7 for custom object detection which contains some text. Now i want to read that text from an image. I managed to extract bounding box coordinates from my model. Now i am wondering how i can pass an image with corresponding bounding box coordinates so i can read text from detected object. Also, i want to do that on multiple images (i have BB coordinates for each image, separately).

Zdenko Podobny

unread,
Feb 9, 2023, 4:35:52 AM2/9/23
to tesser...@googlegroups.com
Hello,

Unfortunately you did not provide any examples (input image, code), so we can just guess how to help you...
If you have a bounding box (BB) I assume you already have the image in memory, so I would copy/crop the image to the BB and request to OCR only that. 
I would assume you also would need to preprocess the image (e.g. add border to BB) and it should be faster on part of image than whole image.
Other option is to use tesseract API (SetImage or SetRectangle)


Zdenko


st 8. 2. 2023 o 16:26 Petar Mihić <manofbl...@gmail.com> napísal(a):
Hello. I made a model in YOLOv7 for custom object detection which contains some text. Now i want to read that text from an image. I managed to extract bounding box coordinates from my model. Now i am wondering how i can pass an image with corresponding bounding box coordinates so i can read text from detected object. Also, i want to do that on multiple images (i have BB coordinates for each image, separately).

--
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/3d5352de-8d30-4623-a734-ef3663afe9e8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages