Result of document quality analysis. It can be used to determine, e.g., if a document is good enough to be used for OCR processing.

Hierarchy (view full)

Constructors

Properties

cumulativeQualityHistogram: number[]

Cumulative histogram where every entry is equal to the number of symbols with quality equal or lower than N percent, where N is the index of the entry in the array.

documentFound: boolean

True if a document was found.

orientation: null | number

Dominant orientation of the document, if found and if orientation detection is enabled. The value is in degrees counter-clockwise, where 0 corresponds to the document being straight, and the value is in the range of [-180, 180]. To rotate the document to be straight, rotate the image clockwise by this value.

quality: null | DocumentQuality

Quality of the document, if found.

qualityHeatmap: null | ImageRef

Quality heatmap. Black marks areas of no detected text. Colors represent the quality of detected text, with red meaning the lowest quality and yellow and green meaning progressively higher quality.

Methods

  • Returns Promise<void>

  • Returns void

  • Parameters

    Returns Promise<{
        cumulativeQualityHistogram?: (undefined | number)[];
        documentFound?: boolean;
        orientation?: null | number;
        quality?: null | DocumentQuality;
        qualityHeatmap?: null | {
            buffer: undefined | string;
            uniqueId?: string;
            clear?: any;
            clone?: any;
            encodeImage?: any;
            encodeInPlace?: any;
            hibernate?: any;
            info?: any;
            isRetained?: any;
            release?: any;
            retain?: any;
            saveImage?: any;
            serialize?: any;
        };
        encodeImages?: any;
        release?: any;
        serialize?: any;
    }>