-
public interface ImageCaptureSettingsSettings 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.
-
-
Method Summary
Modifier and Type Method Description abstract ImageCaptureScenario.DocumentSizegetDocumentSize()Return the defined physical size of the captured document. abstract UnitsetDocumentSize(ImageCaptureScenario.DocumentSize documentSize)Set the physical size of the captured document. abstract FloatgetMinimumDocumentToViewRatio()Return the value of defined minimum document area relative to the whole frame area. abstract UnitsetMinimumDocumentToViewRatio(Float ratio)Set the minimum document area, relative to the whole frame area, that is required for capture. abstract FloatgetAspectRatioMin()Return the value of defined lower limit of document's aspect ratio. abstract UnitsetAspectRatioMin(Float minValue)Set the lower limit of the document's aspect ratio. abstract FloatgetAspectRatioMax()Return the value of defined upper limit of document's aspect ratio. abstract UnitsetAspectRatioMax(Float maxValue)Set the upper limit of document's aspect ratio. abstract IntegergetImageFromGalleryMaxSize()Return the value of the maximum available size of an image that can be loaded from the gallery. abstract UnitsetImageFromGalleryMaxSize(Integer size)Set the maximum available size of an image, that can be loaded from the gallery abstract BooleanisCropEnabled()Check if the crop function is enabled and the captured image will be cropped. abstract UnitsetCropEnabled(Boolean isCropEnabled)Enable or disable the automatic crop option. abstract UnitsetNamedProperty(String name, Object value)Set the named extended property for image capture. -
-
Method Detail
-
getDocumentSize
@MainThread() abstract ImageCaptureScenario.DocumentSize getDocumentSize()
Return the defined physical size of the captured document.
-
setDocumentSize
@MainThread() abstract Unit setDocumentSize(ImageCaptureScenario.DocumentSize documentSize)
Set the physical size of the captured document.
- Parameters:
documentSize- The size of the captured document, represented by a DocumentSize object.
-
getMinimumDocumentToViewRatio
@MainThread() abstract Float getMinimumDocumentToViewRatio()
Return the value of defined minimum document area relative to the whole frame area.
-
setMinimumDocumentToViewRatio
@MainThread() abstract Unit setMinimumDocumentToViewRatio(Float ratio)
Set the minimum document area, relative to the whole frame area, that is required for capture. If the document area is less than that, the image will not be captured.
- Parameters:
ratio- The 0..
-
getAspectRatioMin
@MainThread() abstract Float getAspectRatioMin()
Return the value of defined lower limit of document's aspect ratio.
-
setAspectRatioMin
@MainThread() abstract Unit setAspectRatioMin(Float minValue)
Set 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 DocumentSize.
- Parameters:
minValue- minimum acceptable value for document's aspect ratio
-
getAspectRatioMax
@MainThread() abstract Float getAspectRatioMax()
Return the value of defined upper limit of document's aspect ratio.
-
setAspectRatioMax
@MainThread() abstract Unit setAspectRatioMax(Float maxValue)
Set 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 DocumentSize.
- Parameters:
maxValue- maximum acceptable value for document's aspect ratio
-
getImageFromGalleryMaxSize
@MainThread() abstract Integer getImageFromGalleryMaxSize()
Return the value of the maximum available size of an image that can be loaded from the gallery.
-
setImageFromGalleryMaxSize
@MainThread() abstract Unit setImageFromGalleryMaxSize(Integer size)
Set the maximum available size of an image, that can be loaded from the gallery
-
isCropEnabled
@Deprecated(message = "This flag no longer affects the capture - original image is always returned", replaceWith = @ReplaceWith(imports = {}, expression = "false"))@MainThread() abstract Boolean isCropEnabled()
Check if the crop function is enabled and the captured image will be cropped.
-
setCropEnabled
@Deprecated(message = "This flag no longer affects the capture - original image is always returned")@MainThread() abstract Unit setCropEnabled(Boolean isCropEnabled)
Enable or disable the automatic crop option. In case this option is enabled, the fields around captured document will be cropped. Also perspective distortion will be corrected if needed.
- Parameters:
isCropEnabled- This parameter defines if the crop option should be enabled.
-
setNamedProperty
abstract Unit setNamedProperty(String name, Object value)
Set the named extended property for image capture.
- Parameters:
name- the name of the propertyvalue- the value of the property
-
-
-
-