recognizeText:onProgress:onTextOrientationDetected:error: method of the RTRCoreAPI protocol
Performs recognition of a single image.
- (NSArray<RTRTextBlock*>*)recognizeText:(UIImage*)image
onProgress:(BOOL(^)(int percentage, RTRCallbackWarningCode warningCode))progressCallback
onTextOrientationDetected:(void(^)(int angle))textOrientationDetectedCallback
error:(__autoreleasing NSError**)error;
Parameters
- image
- The image to be recognized.
- onProgress
- 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.
- onTextOrientationDetected
- 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.
- error
- 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.
02.03.2022 12:59:15