Capture Modes in Document Scan SDK for Android
When initializing a capture session, the DSOptions.captureMode setting determines the capture mode. You can choose between two capture modes:
-
Manual Capture: During a manual capture, the user must tap the screen in order to begin the capture process. This is the default.
Note: No checks are performed until after the user taps the screen. This gives the user more control over capture, but it also may take longer and produce lower-quality images. -
Auto Capture: During an auto capture, the user must position the ID document within the viewfinder. The capture process then begins automatically.
You can use Dynamic Capture Feedback to assist users with Auto Capture. If you disable Dynamic Capture Feedback, auto capture may time out and transition to manual capture.
Dynamic Capture Feedback
Dynamic Capture Feedback is an optional feature that extends Auto Capture. When enabled, the SDK will “coach” the user on how to correct their device or environment to capture a high-quality image.
This is configurable via the DSOptions.dynamicCaptureFeedbackOptions.
When Dynamic Capture Feedback is enabled, the criteria for initiating the final capture becomes more strict:
-
The device must be stable
-
The document must be in-focus
-
The document must be positioned in the viewfinder
If any of this criteria is not met, the SDK presents the issue to the user.
Configurable Detectors
Dynamic Capture Feedback introduces additional configurable quality checks to reduce recaptures. This configuration exists as a standalone object,DynamicCaptureFeedbackDetectionOptions, which is accessible via the DSOptions.dynamicCaptureFeedbackOptions.detectionOptions.
A DynamicCaptureFeedbackDetectionOptions flags specific detectors to run for every possible document type and side. These flags are defined as DynamicCaptureFeedbackEnforcedDetectors.
Enforced Detectors
Currently, there are 5 configurable detectors defined by DynamicCaptureFeedbackEnforcedDetectors:
-
Barcode: Enforces that a barcode must be detected (ignored in all documents except ID1Back).
Note: Barcode is currently not enforced by default. To enforce Barcode, insert .barcode to the DSOptions.dynamicCaptureFeedbackOptions.detectionOptions.licenseBackDetectors. -
Machine-Readable Zone: Enforces that an MRZ must be detected (ignored in all documents except passport and passport card).
-
Document Lighting: Checks that the document has sufficient lighting.
-
Glare: Checks that the document image is not burned out by too much glare (requires Document Lighting to be enabled).
-
Contrast: Checks that there is sufficient color contrast between the document and the background (requires Document Lighting to be enabled).
All light-based quality checks are enforced on every document type by default. The combination of these 3 detectors are represented by the combined flag .lightQuality.