How to get coordinates using abbyy mobile sdk for iphone

时光怂恿深爱的人放手 提交于 2019-11-29 08:04:15

For now, the layout returned by the text recognition functions doesn't contain information about words rectangles. The layout stores only text lines rectangles and letters rectangles.

We can add words rectangles to layout in the next release. However, this functionality will be added not earlier than several months later.

I have found a slightly diffrent way to highlight a particular word(s):

The recognition results stores in the Layout class (see Help → Wrapper for iOS/MacOSX → Recognition Result Classes → CMocrLayout).

In the sample the recognition results are getting in the line CFineLayout* recognitionResults = [fineManager copyRecognitionResults]; (see the processRecognitionResult method from MainRecognitionController.m file)

Then use the following properties: 1) Block property of Layout, 2) Lines property of Block, 3) Characters property of TextLine, 4) CharRect property of Character.

CharRect property contains rectangular area on the image with a character inside.

To get word coordinates you can use coordinates of its first and last characters.

Hope the information is helpful!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!