recognizeText method of the RTRCoreAPI protocol

Documentation Menu

Performs recognition of a single image.

note Note: This method is available only in the extended version of the library.

- (NSArray*)recognizeText:(UIImage*)image 
       onProgress:(BOOL(^)(int percentage, RTRCallbackWarningCode warningCode))progressCallback 
       onTextOrientationDetected:(void(^)(int angle))textOrientationDetectedCallback 
       error:(__autoreleasing NSError**)error;



The image to be recognized.


The callback informing you of approximate percentage of operation completed, and any warning that occurred (represented by an RTRCallbackWarningCode constant). This callback can also be used to interrupt processing: return TRUE if you wish to terminate the current operation, FALSE to continue.


The callback informing you when the image orientation is detected. The angle parameter can take values of 0, 90, 180, and 270, and means the angle on which the image should be rotated to get normal orientation.


The error callback.

Return values

The method returns an array of RTRTextBlock objects which contain the results of recognition for the text areas found on the image.