【发布时间】:2017-06-19 16:06:25
【问题描述】:
Google Vision API 文档指出检测到的字符的顶点将始终保持相同的顺序:
// The bounding box for the symbol.
// 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 vertice order will still be (0, 1, 2, 3).
但有时我可以看到不同的顶点顺序。以下是来自同一图像的两个字符的示例,它们具有相同的方向:
[x:778 y:316 x:793 y:316 x:793 y:323 x:778 y:323 ]
0----1
| |
3----2
和
[x:857 y:295 x:857 y:287 x:874 y:287 x:874 y:295 ]
1----2
| |
0----3
为什么顶点的顺序不一样?而不是在文档中?
【问题讨论】:
标签: google-cloud-platform ocr google-cloud-vision