DocumentScannerCameraConfiguration

data class DocumentScannerCameraConfiguration(var cameraModule: CameraModule = CameraModule.BACK, var defaultZoomFactor: Double = 1.0, var autoCropOnManualSnap: Boolean = true, var flashEnabled: Boolean = false, var minFocusDistanceLock: Boolean = false, var touchToFocusEnabled: Boolean = false, var pinchToZoomEnabled: Boolean = true, var cameraPreviewMode: CameraPreviewMode = CameraPreviewMode.FILL_IN, var captureQualityPrioritization: CapturePhotoQualityPrioritization = CapturePhotoQualityPrioritization.BALANCED, var autoSnappingSensitivity: Double = 0.66, var autoSnappingDelay: Int = 200, var autoSnappingEnabled: Boolean = true, var captureWithHardwareButtonsEnabled: Boolean = true, var fpsLimit: Int = 20) : Parcelable

Configuration of the camera behavior.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(cameraModule: CameraModule = CameraModule.BACK, defaultZoomFactor: Double = 1.0, autoCropOnManualSnap: Boolean = true, flashEnabled: Boolean = false, minFocusDistanceLock: Boolean = false, touchToFocusEnabled: Boolean = false, pinchToZoomEnabled: Boolean = true, cameraPreviewMode: CameraPreviewMode = CameraPreviewMode.FILL_IN, captureQualityPrioritization: CapturePhotoQualityPrioritization = CapturePhotoQualityPrioritization.BALANCED, autoSnappingSensitivity: Double = 0.66, autoSnappingDelay: Int = 200, autoSnappingEnabled: Boolean = true, captureWithHardwareButtonsEnabled: Boolean = true, fpsLimit: Int = 20)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Determines whether the document should be cropped automatically after a manual snap or not.

Link copied to clipboard

After a page has been snapped, the delay in milliseconds before auto snapping resumes for the next page.

Link copied to clipboard

Determines if auto snapping is enabled or not.

Link copied to clipboard

Controls the auto snapping speed. The sensitivity must be between 0.0 and 1.0. A value of 1.0 triggers auto snapping immediately, while a value of 0.0 delays the auto snapping by 3 seconds. The default value is 0.66 (2 seconds).

Link copied to clipboard

Determines which camera module to use on start-up.

Link copied to clipboard

Determines which camera preview mode to use.

Link copied to clipboard

Determines the prioritization of still image quality and capturing speed.

Link copied to clipboard

When enabled the hardware volume up/down buttons can be used to capture an image if manual snapping is enabled. For iOS version 17.2 or later is required. On iPhones with camera control (iPhone 16 series) this also enables zooming and capturing with the camera control.

Link copied to clipboard

The default zoom factor on start-up.

Link copied to clipboard

Determines whether the flashlight is enabled or not on start-up.

Link copied to clipboard

The rate of detections/recognitions per second in normal performance mode. If the number is equal or greater than the video frame rate, no frames will be skipped.

Link copied to clipboard

Determines whether locking the focus at the minimum possible distance is enabled or not (device-specific).

Link copied to clipboard

Determines whether pinch-to-zoom is enabled or not.

Link copied to clipboard

Determines whether touch-to-focus is enabled or not. Android only.

Functions

Link copied to clipboard
Link copied to clipboard
fun toJson(config: ToJsonConfiguration = ToJsonConfiguration.default()): JSONObject