Using the Document Quality Analyzer to analyze the quality of an image
You can use the Document Quality Analyzer to analyze the quality of an image like this:
createDocumentQualityAnalyzer(config: DocumentQualityAnalyzerConfiguration): Promise<DocumentQualityAnalyzer>
See DocumentQualityAnalyzerConfiguration for a list of available configuration options.
async analyze(imageData: Image): Promise<DocumentQualityAnalyzerResult>
Please refer to the API documentation for details on the result object.
Always release the analyzer object after it is no longer needed.
async release(): Promise<void>
Example usage:
async function onDocumentDetected(e) {
const config = new ScanbotSDK.Config.DocumentQualityAnalyzerConfiguration();
const analyzer = await this.sdk.createDocumentQualityAnalyzer(config);
const result = await analyzer.run(image);
console.log('analysis', result);
await analyzer.destroy();
}
Want to scan longer than one minute?
Generate a free trial license to test the Scanbot SDK thoroughly.
Get free trial licenseScanbot SDK is part of the Apryse SDK product family
A mobile scan is just the start. With Apryse SDKs, you can expand mobile workflows into full cross‑platform document processing. Whether you need to edit PDFs, add secure digital signatures, or use a fast, customizable document viewer and editor, Apryse gives you the tools to build powerful features quickly.
Learn more
