RTRImageCaptureService protocol

A background image capture service protocol. Inherits from the RTRRecognitionService protocol.

This protocol is adopted by the image capture service object returned by the createImageCaptureServiceWithDelegate: method. Its methods are used to tune the processing settings, pass video frames from the camera to the background processing engine, and release the resources afterwards.

The image capture service requires a delegate that conforms to the RTRImageCaptureServiceDelegate protocol. The service informs the delegate when the result is ready, sends progress information, warnings and errors.

Properties

Name Type Description
aspectRatioMin CGFloat

Lower limit of the document's aspect ratio.

This property is used in pair with the aspectRatioMax, defining an interval of acceptable aspect ratio values of the document to be captured. Setting aspect ratio will help to improve boundary detection accuracy.

If only aspectRatioMax is set, aspectRatioMin will be set to 1.

By default the property is set to 0 (aspect ratio is not set).

aspectRatioMax CGFloat

Upper limit of document's aspect ratio.

This property is used in pair with the aspectRatioMin, defining an interval of acceptable aspect ratio values of the document to be captured. Setting aspect ratio will help to improve boundary detection accuracy.

If only aspectRatioMin is set, aspectRatioMax will be set to CGFLOAT_MAX.

By default the property is set to 0 (aspect ratio is not set).

numberOfBestFramesToCollect NSUInteger

Number of frames with the highest quality to collect during capture. Access the frames via the bestFramesStatus property of the RTRImageCaptureResult interface.

By default the property is set to 0 (no additional frames will be returned).

Document aspect ratio setting is intended to specify the exact proportions of the target document, which will increase capture accuracy.

 Notes: 

  • Aspect ratio detection requires the mobile device to be placed strictly horizontally over the document during image capture. In case the mobile device is tilted, camera will capture distorted image and the document aspect ratio may be detected incorrectly.
  • The value of aspect ratio is calculated by division of the longer side to the shorter side and is expected to be greater than or equal to 1 (or 0 if not set). If neither aspectRatioMin nor aspectRatioMin are set, the values will be calculated from the documentSize setting.
  • Either height or width of the document should be greater than 60% of the frame height or width respectively. Otherwise the document is considered to be too small and no capture is performed.

Methods

Name Description
- addSampleBuffer: Sends the video frame obtained from camera to the service. Inherited from the RTRRecognitionService protocol.
- setAreaOfInterest: Sets the search area on the frame. Inherited from the RTRRecognitionService protocol.
- setDocumentSize: Sets the physical size of the document to be captured.
- stopTasks Stops processing and releases the resources used by the recognition service. Inherited from the RTRRecognitionService protocol.

3/2/2022 12:59:15 PM

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.