analyze document quality of the given image.
The image to analyze.
Optional consumeImage: Config.ConsumeTypeControls if the image can still be used after calling this method, or if it will be consumed by the method. See ConsumeType for more details.
The analyzed document quality.
Static createOptional configuration: { Optional detectEnable orientation detection. Document orientation will be returned in DocumentQualityAnalyzerResult.orientation.
false;
Optional inspectInspect small text (typically less than 12 pixels height) when analyzing the document quality. If true, processing will be slower, but when the quality issue with a document is the low resolution of the text, then the issue will be caught.
false;
Optional maxMaximum image size in pixels, if image is bigger, it will be resized.
2000;
Optional maxAt most this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed.
1.0;
Optional minIf estimated number of symbols is less than this value, return that document is not found.
20;
Optional minIf this number of symbols is found and minProcessedFraction of the image is processed, the processing stops.
100;
Optional minAt least this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed.
1.0;
Optional minIf detectOrientation is True, minNumberOfRequiredSymbols is found, and orientationConfidence is bigger than this threshold, the processing stops. If the maxProcessedFraction part of the image is processed and orientationConfidence is lower than the threshold, the returned orientation will be 0.
0.0;
Optional qualityquality levels.
["VERY_POOR", "POOR", "REASONABLE", "GOOD", "EXCELLENT"];
Optional qualityQuality thresholds to separate quality levels.
[new DocumentQualityThreshold({
"symbolQuality": 0.5,
"symbolRatio": 0.5
}), new DocumentQualityThreshold({
"symbolQuality": 0.7,
"symbolRatio": 0.3
}), new DocumentQualityThreshold({
"symbolQuality": 0.85,
"symbolRatio": 0.3
}), new DocumentQualityThreshold({
"symbolQuality": 0.9,
"symbolRatio": 0.1
})];
Optional returnIf true, will return the quality heatmap as a part of the result. In this case, the entire image will be processed and the minProcessedFraction will be ignored. Useful for debugging situations where the returned quality doesn't appear to match the perceived quality.
false;
Optional tileImage will be processed in tiles of this size; will be ignored if image is small.
300;
Generated using TypeDoc
API for analyzing document quality.
Required licence feature(s): ImageProcessing.