Capture Modes
When initializing a capture session, you can choose between two capture modes: Manual Capture and Auto Capture. This is configured via DSOptions.captureMode
, which is defaulted to .Manual
.
Manual Capture
During a Manual Capture, the user must tap the screen in order to begin the capture process:
Note
During Manual Capture, 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 & produce lower-quality images.
Auto Capture
During an Auto Capture, the user must simply position the ID document within the viewfinder, and the capture process will begin automatically:
With Dynamic Capture Feedback disabled, the SDK will wait until the device is stable and the camera sensors are not adjusting. If these conditions are not met before the timeout specified in DSOptions.autoCaptureTimeoutDuration
, then the SDK will automatically 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 in order to capture a high-quality document image. This is configurable via the DSOptions.dynamicCaptureFeedbackOptions
. By default, Dynamic Capture Feedback is enabled.
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
When any of this criteria is not met, then the issue is presented 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 ID1-Back)
Machine-Readable Zone: Enforces that an MRZ must be detected (ignored in all documents except passport and passport card)
Note
Barcode is currently not enforced on the back of licenses by default. To change this, you’ll need to insert .barcode
to the DSOptions.dynamicCaptureFeedbackOptions.detectionOptions.licenseBackDetectors
.
Additionally, there are 3 light-based quality checks introduced by Dynamic Capture Feedback:
Document Lighting: Checks that the document has sufficient luminance
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
.
Tip
DSOptions.dynamicCaptureFeedbackOptions.detectionOptions
is publicly settable. You can create and configure a standalone DynamicCaptureFeedbackDetectionOptions
and share it between any DSOptions
that you create.