Skip to main content
Version: v8xxx

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.

note

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​

note

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 to high, 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 to low, and picks the first acceptable frame faster.

For the full list of settings each profile changes, see Settings applied by each option.

import { createBlinkId } from "@microblink/blinkid";

const blinkId = await createBlinkId({
licenseKey: "your-license-key",
presetScanningSettingsBuilder: (presetBuilder) =>
presetBuilder.buildDocumentVideoSettings({
quality: "high-accuracy",
}),
});

Reject low-quality frames​

note

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: when true, frames with detected blur are skipped, so only sharp frames are processed.
  • imageWithGlareRejected: when true, frames with detected glare are skipped.
  • imageWithPoorLightingRejected: when true, 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.

const settings: ScanningSettings = {
documentCaptureModule: {
imageWithBlurRejected: true,
imageWithGlareRejected: true,
imageWithPoorLightingRejected: true,
},
};

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.

const settings: ScanningSettings = {
documentCaptureModule: {
blurSensitivityLevel: "high",
imageWithBlurRejected: true,
glareSensitivityLevel: "high",
imageWithGlareRejected: true,
imageWithPoorLightingRejected: true,
},
};

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).