@interface SBSDKGenericTextLineRecognizer : NSObject
A class for recognizing one line of text in a small area and running a validation on the result. It is intended to be a very generic text-based live video recognizer for tasks that can’t be accomplished with the specialized recognizers in ScanbotSDK.
- (nonnull instancetype)init;
Initializes an instance with the given configuration. Returns nil, if the required OCR resources are not installed.
- (nullable instancetype)initWithConfiguration: (nonnull SBSDKGenericTextLineRecognizerConfiguration *)configuration;
The configuration object to be used to configure the new instance.
Recognizes text information from given sample buffer. Intended for usage with live detection.
- (nullable SBSDKGenericTextLineRecognizerResult *) recognizeFromSampleBuffer:(nonnull CMSampleBufferRef)sampleBufferRef orientation:(AVCaptureVideoOrientation)videoOrientation inRect:(CGRect)rect;
func recognize(from sampleBufferRef: CMSampleBuffer, orientation videoOrientation: AVCaptureVideoOrientation, in rect: CGRect) -> SBSDKGenericTextLineRecognizerResult?
The sample buffer reference.
Video frame orientation. Should be the orientation that the device currently has, not actual image orientation.
Rectangle in image coordinates in which to perform the search. Must be inside the image.
The result of the recognition.
Clears the frame accumulator of the recognizer. This should be called after retrieving a result and initiating a new recognition.