public ImageCaptureSettings
Settings of image capture. The interface provides methods for tuning required aspect ratio range, document size for cropping and other useful settings.
An instance of this interface is passed as a parameter to the
MultiPageImageCaptureScenario.CaptureSettings.onConfigureImageCaptureSettings
.
@MainThread @NotNull com.abbyy.mobile.uicomponents.scenario.ImageCaptureScenario.DocumentSize getDocumentSize()
Returns the defined physical size of the captured document.
class ImageCaptureScenario.DocumentSize
object.@MainThread void setDocumentSize(@NotNull com.abbyy.mobile.uicomponents.scenario.ImageCaptureScenario.DocumentSize documentSize)
Sets the physical size of the captured document.
documentSize
- The size of the captured document, represented by a class ImageCaptureScenario.DocumentSize
object.@MainThread float getMinimumDocumentToViewRatio()
Returns the value of defined minimum document area relative to the whole frame area.
@MainThread void setMinimumDocumentToViewRatio(float ratio)
Sets the minimum document area relative to the whole frame area, required for capturing. If the document area is less the image will not be captured.
ratio
- The 0..1 ratio of the minimum document area relative to the whole frame area.@MainThread void setAspectRatioMin(float minValue)
Sets the lower limit of the document's aspect ratio.
This method is used in pair with the setAspectRatioMax, 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 upper limit is set, lower limit will be set to 1.
Note: Aspect ratio is calculated by division of the upper limit to lower limit and is expected to be greater
than or equal to 1 (or 0 if not set). By default aspect ratio is not set and is defined by class ImageCaptureScenario.DocumentSize
.
minValue
- minimum acceptable value for document's aspect ratioclass ImageCaptureScenario.DocumentSize
@MainThread float getAspectRatioMin()
Returns the value of defined lower limit of document's aspect ratio.
@MainThread void setAspectRatioMax(float maxValue)
Sets the upper limit of document's aspect ratio.
This method is used in pair with the setAspectRatioMin, 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 lower limit is set, upper limit will be set to infinity
Note: Aspect ratio is calculated by division of the upper limit to lower limit and is expected to be greater
than or equal to 1 (or 0 if not set). By default aspect ratio is not set and is defined by class ImageCaptureScenario.DocumentSize
.
maxValue
- maximum acceptable value for document's aspect ratioclass ImageCaptureScenario.DocumentSize
@MainThread float getAspectRatioMax()
Returns the value of defined upper limit of document's aspect ratio.
@MainThread int getImageFromGalleryMaxSize()
Returns the value of the maximum available size of an image, that can be loaded from the gallery.
@MainThread void setImageFromGalleryMaxSize(int size)
Sets the maximum available size of an image, that can be loaded from the gallery