How to get coordinates using abbyy mobile sdk for iphone

守給你的承諾、 提交于 2019-11-28 01:45:40

问题


I am using sample project of abbyy mobile SDK for iPhone (version 4). using this how can i get co-ordinates of specific word(s) of an image using the mobile sdk for iphone .

I have checked the API reference and found FineRecognizeRegion Function but do not know how can i use it to get the co-ordinates of a specific word(s) on an image taken by device camera.

Please help

Thanks in advance


回答1:


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.




回答2:


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!



来源:https://stackoverflow.com/questions/9113119/how-to-get-coordinates-using-abbyy-mobile-sdk-for-iphone

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