Handle low-quality or blurry images
BlinkID assesses the quality of every camera frame before it tries to extract data.
You can control how strictly the SDK treats blur, glare, and poor lighting through the documentCaptureModule of ScanningSettings.
The built-in camera UX already guides users in real time, prompting them to move closer, hold steady, or avoid glare. Most low-quality input is handled automatically, so you only need these settings when you want finer control over which frames the SDK accepts.
Use a quality profile
Added in BlinkID Web v8003.0.0, and in BlinkID Android and iOS v8002.0.0. Earlier v8xxx versions don't have use cases; follow Reject low-quality frames and Tune the sensitivity levels instead.
The document video and document photo use cases have a quality option that sets the rejection flags and sensitivity levels for you:
balanced(default): the default rejection flags and sensitivity levels.high-accuracy: raises blur, glare, and tilt sensitivity tohigh, so only clean frames are accepted. It also requires a face image on the document.permissive: lowers sensitivity and turns off blur, glare, poor lighting, and hand occlusion rejection, so frames are accepted even in difficult conditions.high-speed(video only): lowers blur, glare, and tilt sensitivity tolow, and picks the first acceptable frame faster.
For the full list of settings each profile changes, see Settings applied by each option.
- Web (TS)
- Android (Kotlin)
- iOS (Swift)
import { createBlinkId } from "@microblink/blinkid";
const blinkId = await createBlinkId({
licenseKey: "your-license-key",
presetScanningSettingsBuilder: (presetBuilder) =>
presetBuilder.buildDocumentVideoSettings({
quality: "high-accuracy",
}),
});
val sessionSettings = BlinkIdSessionSettings.documentVideo(
DocumentVideoUseCase(quality = VideoQualityProfile.HighAccuracy)
)
let sessionSettings = BlinkIDSessionSettings.documentVideo(
DocumentVideoUseCase(quality: .highAccuracy)
)
Reject low-quality frames
This section and Tune the sensitivity levels apply to versions earlier than BlinkID Web v8003.0.0, and BlinkID Android and iOS v8002.0.0. If you have a newer version, you can also use a quality profile.
When a quality issue is detected on a frame, you can tell the SDK to skip that frame instead of processing it. Three boolean flags control this:
imageWithBlurRejected: whentrue, frames with detected blur are skipped, so only sharp frames are processed.imageWithGlareRejected: whentrue, frames with detected glare are skipped.imageWithPoorLightingRejected: whentrue, frames with inadequate lighting are skipped.
Rejecting low-quality frames improves the reliability of the extracted data because the SDK only reads from clean input. The trade-off is capture speed: in difficult conditions, such as poor lighting or a reflective document, fewer frames qualify, so scanning can take longer before a usable frame arrives.
- Web (TS)
- Android (Kotlin)
- iOS (Swift)
- Flutter (Dart)
- React Native (TS)
const settings: ScanningSettings = {
documentCaptureModule: {
imageWithBlurRejected: true,
imageWithGlareRejected: true,
imageWithPoorLightingRejected: true,
},
};
val settings = ScanningSettings(
documentCaptureModule = DocumentCaptureModuleSettings(
imageWithBlurRejected = true,
imageWithGlareRejected = true,
imageWithPoorLightingRejected = true,
),
)
let settings = ScanningSettings(
documentCaptureModule: DocumentCaptureModuleSettings(
imageWithBlurRejected: true,
imageWithGlareRejected: true,
imageWithPoorLightingRejected: true
)
)
// Modules you leave out are disabled, so list every module you need.
final settings = BlinkIdScanningSettings(
documentCaptureModule: DocumentCaptureModuleSettings(
imageWithBlurRejected: true,
imageWithGlareRejected: true,
imageWithPoorLightingRejected: true,
),
mrzModule: MrzModuleSettings(),
barcodeModule: BarcodeModuleSettings(),
vizModule: VizModuleSettings(),
);
// Modules you leave out are disabled, so list every module you need.
const scanningSettings: BlinkIdScanningSettings = {
documentCaptureModule: {
imageWithBlurRejected: true,
imageWithGlareRejected: true,
imageWithPoorLightingRejected: true,
},
mrzModule: {},
barcodeModule: {},
vizModule: {},
};
Tune the sensitivity levels
Blur and glare detection have an adjustable sensitivity that determines how aggressively the SDK flags a frame as affected. Two fields control this:
blurSensitivityLevel- type: string
- one of
"off","low","mid","high" - a higher level means more aggressive blur detection
glareSensitivityLevel- type: string
- one of
"off","low","mid","high" - a higher level means more aggressive glare detection
Setting a level to "off" disables detection for that quality issue.
Raising the level catches more borderline frames, which pairs well with the rejection flags above for the strictest possible capture.
Lowering it is more permissive and can speed up capture when conditions are consistently good.
- Web (TS)
- Android (Kotlin)
- iOS (Swift)
- Flutter (Dart)
- React Native (TS)
const settings: ScanningSettings = {
documentCaptureModule: {
blurSensitivityLevel: "high",
imageWithBlurRejected: true,
glareSensitivityLevel: "high",
imageWithGlareRejected: true,
imageWithPoorLightingRejected: true,
},
};
val settings = ScanningSettings(
documentCaptureModule = DocumentCaptureModuleSettings(
blurSensitivityLevel = SensitivityLevel.High,
imageWithBlurRejected = true,
glareSensitivityLevel = SensitivityLevel.High,
imageWithGlareRejected = true,
imageWithPoorLightingRejected = true,
),
)
let settings = ScanningSettings(
documentCaptureModule: DocumentCaptureModuleSettings(
blurSensitivityLevel: .high,
imageWithBlurRejected: true,
glareSensitivityLevel: .high,
imageWithGlareRejected: true,
imageWithPoorLightingRejected: true
)
)
final settings = BlinkIdScanningSettings(
documentCaptureModule: DocumentCaptureModuleSettings(
blurSensitivityLevel: SensitivityLevel.high,
imageWithBlurRejected: true,
glareSensitivityLevel: SensitivityLevel.high,
imageWithGlareRejected: true,
imageWithPoorLightingRejected: true,
),
mrzModule: MrzModuleSettings(),
barcodeModule: BarcodeModuleSettings(),
vizModule: VizModuleSettings(),
);
const scanningSettings: BlinkIdScanningSettings = {
documentCaptureModule: {
blurSensitivityLevel: 'high',
imageWithBlurRejected: true,
glareSensitivityLevel: 'high',
imageWithGlareRejected: true,
imageWithPoorLightingRejected: true,
},
mrzModule: {},
barcodeModule: {},
vizModule: {},
};
On web the sensitivity is a plain string.
On Android it is the SensitivityLevel enum (SensitivityLevel.Off, .Low, .Mid, .High), and on iOS it is the SensitivityLevel case (.off, .low, .mid, .high).