Here is the information about getting Document Quality information from the Document OCR Processor.
Note - For the Document OCR processor, you must use processor version pretrained-ocr-v1.1-2022-09-12
to get the quality information.
Document OCR Processor - Handling the Processing Response
Starting with processor
version
pretrained-ocr-v1.1-2022-09-12
, the Document
OCR
processor can also perform quality assessment of a document based on
its readability. This quality assessment is a quality score in [0, 1]
, where 1
means perfect quality. The quality score is returned
in the
Page.imageQualityScores
field. All detected defects are listed as quality/defect_*
and
sorted in descending order by confidence value.
{
"pages": [
{
"imageQualityScores": {
"qualityScore": 0.7811847,
"detectedDefects": [
{
"type": "quality/defect_document_cutoff",
"confidence": 1.0
},
{
"type": "quality/defect_glare",
"confidence": 0.97849524
},
{
"type": "quality/defect_text_cutoff",
"confidence": 0.5
}
]
}
}
]
}