How to highlight the bounding box using DOCUMENT_TEXT_DETECTION when the text inside the image is rotated at some angle?

123 views
Skip to first unread message

Anisur Rahman

unread,
Jul 15, 2022, 11:23:24 AM7/15/22
to cloud-vision-discuss
I was exploring vision API for text detection. It works fine when text is either vertical or horizontal. But I am getting some weird vertices when trying to detect text that at some angle refers to the vertical and horizontal line of the image.
Some of the vertexes have a negative value for x or y coordinates and some vertex have a larger value for x or y than the actual image size.

So I have the following questions
1. Is it a limitation of vision API?
2. How to identify the correct bounding box if the text is rotated at some angle?

I have attached the test image, request body, and response file here.
Any help will be highly appreciated. Thanks in advance.
 
sample_response.txt
image.png
sample_request.txt

Tianli Yu

unread,
Jul 18, 2022, 12:35:26 AM7/18/22
to cloud-vision-discuss
For tilted images, the bounding box of a line/word can have one or more vertices outside the image. This is normal. If you want all vertices inside the image please apply some clip function at the post processing step. 

Anisur Rahman

unread,
Jul 26, 2022, 10:33:00 AM7/26/22
to cloud-vision-discuss
Thank you
Reply all
Reply to author
Forward
0 new messages