Assigned
Status Update
Comments
mi...@google.com <mi...@google.com>
mi...@google.com <mi...@google.com> #2
I have informed our engineering team of this feature request. There is currently no ETA for its implementation.
A current workaround would be to check the returned "boundingPoly" [1] "vertices" for the returned "textAnnotations". If the calculated rectangle's heights > widths, than your image is sideways.
[1]https://cloud.google.com/vision/reference/rest/v1/images/annotate#boundingpoly
A current workaround would be to check the returned "boundingPoly" [1] "vertices" for the returned "textAnnotations". If the calculated rectangle's heights > widths, than your image is sideways.
[1]
sa...@gmail.com <sa...@gmail.com> #3
I also need this problem solved :)
mi...@google.com <mi...@google.com> #4
same :D
da...@gmail.com <da...@gmail.com> #5
+1
ls...@gmail.com <ls...@gmail.com> #6
+1
kr...@softagent.se <kr...@softagent.se> #7
This needs more attention. It's not just a display issue as described in the report. The co-ordinates returned in 'boundingPoly' are incorrect if the image was taken on a phone. All the x points should be y and vice versa.
The workaround does not make sense as "boundingPoly" [1] "vertices" for "textAnnotations" does not indicate the image dimensions - it indicates the dimensions of the relevant text block inside the image.
The workaround does not make sense as "boundingPoly" [1] "vertices" for "textAnnotations" does not indicate the image dimensions - it indicates the dimensions of the relevant text block inside the image.
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
ve...@gmail.com <ve...@gmail.com> #8
+1
Description
--
- Problem you have encountered: When using OCR to detect text in images [1], with Python client library, the confidence field is not set properly.
- What you expected to happen: Confidence field should have the same value in the "Try the API" option and when performing the recognition with the python client library.
- Steps to reproduce:
You can check this easily with any image. Run the following function with any image url:
```
from google.cloud import vision
def detect_text_uri(uri):
client = vision.ImageAnnotatorClient()
image = vision.types.Image()
image.source.image_uri = uri
response = client.text_detection(image=image)
texts = response.text_annotations
print('Texts:')
for text in texts:
print('\n"{}"'.format(text.description))
vertices = (['({},{})'.format(vertex.x, vertex.y)
for vertex in text.bounding_poly.vertices])
print('bounds: {}'.format(','.join(vertices)))
print("confidence: {}".format(text.confidence))
if response.error.message:
raise Exception(
'{}\nFor more info on error messages, check: '
'
response.error.message))
```
You will see that confidences are 0.0.
Then, use "Try the API" in [2] for the same image. You will see non zero confidences.
- Other information (workarounds you have tried, documentation consulted, etc):
I have also checked that the same happens with a local image.
[1]
[2]