Skip to main content

Blur Detection | Cordova Document Scanner

Estimate Blur

ScanbotSdk.estimateBlur(args: {imageFileUri: string})

Estimates image blurriness of any image file. It is recommended to use the hi-res document image file URI (documentImageFileUri) of a scanned Page.

import ScanbotSdk, { Page } from 'cordova-plugin-scanbot-sdk';

private SDK = ScanbotSdk.promisify();
public page: Page = ...

// Always make sure you have a valid license on runtime via SDK.getLicenseInfo()
if (!licenseCheckMethod()) { return; }

const result = await this.SDK.estimateBlur({imageFileUri:});

// check the blurriness value, e.g.
if (result.blur > 0.6) {
alert('This scanned image looks blurry. Consider rescanning it.');

Result fields:

  • status: 'OK' or 'ERROR'
  • blur: Numeric blur value. Less is sharper, more is blurred. In broad terms, consider blur values as follows:
    • 0.0-0.3: This image is not blurry at all
    • 0.3-0.6: Somewhat blurry, should be okay
    • 0.6-1.0: I am skeptical of the usefulness of the image

Want to scan longer than one minute?

Generate your free "no-strings-attached" Trial License and properly test the Scanbot SDK.

Get your free Trial License

What do you think of this documentation?

On this page

Scroll to top