Assigned
Status Update
Comments
jm...@google.com <jm...@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]
jm...@google.com <jm...@google.com>
ar...@gmail.com <ar...@gmail.com> #3
I also need this problem solved :)
h....@gmail.com <h....@gmail.com> #4
same :D
mi...@gmail.com <mi...@gmail.com> #5
+1
ra...@gmail.com <ra...@gmail.com> #6
+1
cr...@gmail.com <cr...@gmail.com> #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.
go...@gmail.com <go...@gmail.com> #8
+1
gu...@gmail.com <gu...@gmail.com> #9
Would be great if this could be implemented.
mo...@gmail.com <mo...@gmail.com> #10
+1
[Deleted User] <[Deleted User]> #11
+1
ak...@gmail.com <ak...@gmail.com> #12
+1
na...@gmail.com <na...@gmail.com> #13
+1.
xi...@google.com <xi...@google.com> #14
The rotation information should already be available, basically the order of the bounding box vertices encode that rotation information:
https://cloud.google.com/vision/docs/reference/rest/v1/images/annotate#block
Could you please test and see if that works for your case?
Could you please test and see if that works for your case?
[Deleted User] <[Deleted User]> #15
Each bounding box on the page can have a different orientation, so it can be frustrating to figure out.
ed...@gmail.com <ed...@gmail.com> #16
+1
ma...@gmail.com <ma...@gmail.com> #17
"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. " - The proposed workaround does not work if the image needs to be rotated at 180 degrees. Any ETA after 2y and 1 day?
[Deleted User] <[Deleted User]> #18
+1
oe...@googlemail.com <oe...@googlemail.com> #19
+1
at...@gmail.com <at...@gmail.com> #20
+1
gg...@gmail.com <gg...@gmail.com> #21
+1
ap...@paymentus.com <ap...@paymentus.com> #22
Any ETA after such long time.
du...@google.com <du...@google.com> #23
We just prioritized this work and tentatively aiming for August for releasing various OCR improvements including orientation detection.
nj...@gmail.com <nj...@gmail.com> #24
Great stuff, really good to hear, this will have some really useful applications!
du...@google.com <du...@google.com> #25
Just to gather some details, this feature request is for *page* level orientation information? Like a enum UP DOWN LEFT RIGHT. Is orientation also desired for individual blocks, paragraphs, words, symbols, etc?
Also, this new orientation info will only apply to the DOCUMENT_TEXT_DETECTION feature.
Also, this new orientation info will only apply to the DOCUMENT_TEXT_DETECTION feature.
nj...@gmail.com <nj...@gmail.com> #26
Page level orientation is definitely essential - and useful where the majority of the document rest upon one orientation (eg: letter, page, identity document).
Orientation of individual blocks, words etc would also be very useful if the information already exists through the model, and would be greatly desired.
Cheers,
Orientation of individual blocks, words etc would also be very useful if the information already exists through the model, and would be greatly desired.
Cheers,
oe...@googlemail.com <oe...@googlemail.com> #27
I think there should be an option field where you can decide if the orientation should also be given for individual blocks, words etc.
io...@gmail.com <io...@gmail.com> #28
Ideally we would have word-level information around rotation as well
be...@googlemail.com <be...@googlemail.com> #29
Great to hear that this feature will be added in the near future!
ti...@ageas.com <ti...@ageas.com> #30
+1 please!
mi...@gmail.com <mi...@gmail.com> #31
+1
al...@gmail.com <al...@gmail.com> #32
+1
it...@libratus.edu.pl <it...@libratus.edu.pl> #33
+1
b....@snapaddy.com <b....@snapaddy.com> #34
Any news on this feature yet? Will there be a beta version of the Cloud Vision API containing this? I'm really looking forward to this :)
[Deleted User] <[Deleted User]> #35
Any news?
da...@gmail.com <da...@gmail.com> #36
+1
bu...@gmail.com <bu...@gmail.com> #37
+1
[Deleted User] <[Deleted User]> #38
+1
[Deleted User] <[Deleted User]> #39
+1
al...@gmail.com <al...@gmail.com> #40
+1
he...@max-krause.com <he...@max-krause.com> #41
+1! Urgently needed.
vi...@lemontree.fi <vi...@lemontree.fi> #42
+1 We really need this one too.
ka...@cawstudios.com <ka...@cawstudios.com> #43
+1
jm...@google.com <jm...@google.com> #44
Orientation information should now be returned in 'boundingBox' object for Page Blocks [1], Paragraphs [2], Words [3], and Symbols [4] for all versions of the Vision API (v1, v1p3beta1, and v1p4beta1) [5].
[1]https://cloud.google.com/vision/docs/reference/rest/v1p4beta1/AnnotateImageResponse#block
[2]https://cloud.google.com/vision/docs/reference/rest/v1p4beta1/AnnotateImageResponse#paragraph
[3]https://cloud.google.com/vision/docs/reference/rest/v1p4beta1/AnnotateImageResponse#word
[4]https://cloud.google.com/vision/docs/reference/rest/v1p4beta1/AnnotateImageResponse#symbol
[5]https://cloud.google.com/vision/docs/reference/rest/
[1]
[2]
[3]
[4]
[5]
nj...@gmail.com <nj...@gmail.com> #45
Thanks for the update on this one, great to see it has been fixed.
However, could not see what additional information is provided to infer the orientation of an image in the updated boundingBox response?
What are the names of the elements in the response that provide this, and maybe an example of how to determine how an image should be operated on to make it upright?
Cheers!
However, could not see what additional information is provided to infer the orientation of an image in the updated boundingBox response?
What are the names of the elements in the response that provide this, and maybe an example of how to determine how an image should be operated on to make it upright?
Cheers!
jm...@google.com <jm...@google.com> #46
When orientation is detected, it is represented by the boundingBox vertex positions returned by the object types listed in comment#44 . Here is the documented description for the 'Page Block' type orientation:
"The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:
when the text is horizontal it might look like:
0 ------- 1
| |
3 ------- 2
when it's rotated 180 degrees around the top-left corner it becomes:
2 ------- 3
| |
1 ------- 0
and the vertex order will still be (0, 1, 2, 3)."
"The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example:
when the text is horizontal it might look like:
0 ------- 1
| |
3 ------- 2
when it's rotated 180 degrees around the top-left corner it becomes:
2 ------- 3
| |
1 ------- 0
and the vertex order will still be (0, 1, 2, 3)."
ia...@dnlab.de <ia...@dnlab.de> #47
Can someone please add an example of where to find and how to extract this image-rotation?
jo...@nicefilmclub.com <jo...@nicefilmclub.com> #48
Well there be any support for this for OBJECT_DETECTION? I scan a lot of film negatives, and it would be amazing to guess the correct orientation of the image with a confidence score.
uz...@gmail.com <uz...@gmail.com> #49
Hello,
I don't understand
description: "0,13"
bounding_poly {
vertices {
x: 214
y: 147
}
vertices {
x: 215
y: 131
}
vertices {
x: 223
y: 132
}
vertices {
x: 222
y: 148
}
}
How should I interpret this to get the page orientation of my image (which is mostly text) ?
pr...@gmail.com <pr...@gmail.com> #50
+1
su...@insight.ly <su...@insight.ly> #51
+1
va...@veryfi.com <va...@veryfi.com> #52
jo...@nicefilmclub.com <jo...@nicefilmclub.com> #53
+1
pr...@gmail.com <pr...@gmail.com> #54
+1
ma...@gmail.com <ma...@gmail.com> #55
+1
je...@wizy.io <je...@wizy.io> #56
+1
sh...@gmail.com <sh...@gmail.com> #57
+1. Couldn't this be added in the last four and a half years this issue has been open?
ma...@whiterabbitjapan.com <ma...@whiterabbitjapan.com> #58
+1
al...@gmail.com <al...@gmail.com> #59
+1
tu...@gmail.com <tu...@gmail.com> #60
+1
jm...@google.com <jm...@google.com>
bo...@fetchpackage.com <bo...@fetchpackage.com> #61
+1
ju...@gmail.com <ju...@gmail.com> #62
+1
va...@veryfi.com <va...@veryfi.com> #63
+1
ja...@gmail.com <ja...@gmail.com> #64
+1
al...@gmail.com <al...@gmail.com> #65
+1
wn...@gmail.com <wn...@gmail.com> #66
+1
mc...@gmail.com <mc...@gmail.com> #67
+1
ke...@gmail.com <ke...@gmail.com> #68
Has this issue been solved yet?
My OCR results also seem to be output of images that are randomly rotated 0, 90, 180 or 270 degrees of original images.
My OCR results also seem to be output of images that are randomly rotated 0, 90, 180 or 270 degrees of original images.
ja...@mrcooper.com <ja...@mrcooper.com> #69
I see this is still in assigned status even after 4 years. Please expedite as it is already working in OCR, and needs to be exposed to the customers via response.
au...@gmail.com <au...@gmail.com> #70
I think I might have sorted it out, even if it is not perfect of course.
horizontal_text = []
for page in response.full_text_annotation.pages:
for block in page.blocks:
for paragraph in block.paragraphs:
prev_word = None
current_line = []
for word in paragraph.words:
word_text = ''.join([symbol.text for symbol in word.symbols])
y_diff = word.bounding_box.vertices[3].y - word.bounding_box.vertices[0].y
x_diff = word.bounding_box.vertices[3].x - word.bounding_box.vertices[0].x
if x_diff == 0:
angle = 90
else:
angle = abs(math.degrees(math.atan(y_diff / x_diff)))
if 45 <= angle < 135:
if prev_word and word.bounding_box.vertices[0].y - prev_word.bounding_box.vertices[3].y > \
threshold:
horizontal_text.append(''.join(current_line).strip())
current_line = []
current_line.append(' ' + word_text)
prev_word = word
if current_line:
horizontal_text.append(''.join(current_line).strip())
return '\n'.join(horizontal_text)
ar...@gmail.com <ar...@gmail.com> #71
Google is evil.
co...@eversionsystems.com <co...@eversionsystems.com> #72
+1 I created a bug about this today but have just realized this is talking about the same issue I am having, 6 years on and it's still not fixed!!
gi...@evolution.ai <gi...@evolution.ai> #73
+1
[Deleted User] <[Deleted User]> #74
+1
ya...@gmail.com <ya...@gmail.com> #75
+1
bi...@gmail.com <bi...@gmail.com> #76
+1
Description
I found that Vision API still can recognize the characters.
(Please see the attached screen shot)
However the response doesn't include the correct orientation of recognized text.
If I get the correct image orientation, I can help user to rotate/display the image correctly.
I would expect this request is not complicated, since the algorithm already make it.
p.s.
The api version I am testing:
com.google.apis:google-api-services-vision:v1-rev30-1.22.0