问题
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