ImageCaptureSettings interface

Provides access to the settings of the image capture scenario for the certain page.

This interface provides methods for tuning such settings as required aspect ratio range, document size for cropping, etc.

An instance of this interface is passed as a parameter to the onConfigureImageCaptureSettings method of the CaptureSettings interface.

 Note: By default the settings from the DataCaptureSettings interface will be used. But if configured, capture settings defined by an ImageCaptureSettings interface object are preferable over the settings defined by the DataCaptureSettings interface object.

Methods

 Important! All methods should be called from the Android Main Thread.

Name Description
setAspectRatioMax Sets the upper limit of document's aspect ratio.
getAspectRatioMax Returns the value of the upper limit of document's aspect ratio.
setAspectRatioMin Sets the lower limit of the document's aspect ratio.
getAspectRatioMin Returns the value of the lower limit of the document's aspect ratio.
setDocumentSize Sets the physical size of the captured document, if known.
getDocumentSize Returns the defined physical size of the captured document.
setMinimumDocumentToViewRatio

Sets the minimum document area relative to the whole frame area, required for capture. If the document area is less the image will not be captured.

 Note: 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.

getMinimumDocumentToViewRatio

Returns the value of defined minimum document area relative to the whole frame area.

 Note: 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.

setImageFromGalleryMaxSize Sets the maximum available size of an image, that can be loaded from the gallery. The size is defined as the length of the largest side of an image (in pixels).
getImageFromGalleryMaxSize Returns the value of the maximum available size of an image, that can be loaded from the gallery. The size is defined as the length of the largest side of an image (in pixels).
setNamedProperty Sets the named property of extended settings for image capture.

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.

02.03.2022 12:59:15

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.