Skip to main content

Scanning a Document from Image or Page

Document Detection on Image

ScanbotSDK.detectDocument({imageFileUri: string})

The Scanbot SDK uses digital image processing algorithms to find rectangular, document like, polygons in a digital image. This function applies edge detection and processes all image operations in a background thread. There will be no UI started. As input, a file URI of an image must be passed. The output contains the Detection Result as a string and on success the cropped and perspective corrected image as a new file as well as the detected polygon. If there was no document detected the result enum provides the exact reason (noisy background, too dark, etc). The input image file will not be modified.

Document Detection on image
loading...

Returns

Document Detection Result

Document Detection on Page

ScanbotSDK.detectDocumentOnPage({page: page})

Runs document detection on the given Page. Returns a new Page object, which will contain the detection status, the polygon points and the cropped image.

Document Detection on page
loading...

Returns

Document Detection on Page Result

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get your free Trial License

What do you think of this documentation?