Document Quality
The document quality service can be used to check the quality of an image by either uploading the image directly in the request body or by passing the image URL in the request body.
Image Quality Parameters
This API checks the following parameters to give the quality score of an image -
Quality Parameters | Description | Score |
---|---|---|
Blurriness | Gives a score ranging from 0-100 on the blurriness of the image uploaded. Blurry Images are hard to process for extraction | 0 - Highly Blurred 100 - Sharp Image |
Brightness | Gives a score ranging from 0-100 on the brightness/visibility (either image has minimum visibility to be extracted) or not of the image uploaded | 0 - Dark Image 100 - Bright Image |
Compression Quality | Gives a score ranging from 0-100 on whether the image is pixelated. Highly pixelated image is not readable | 0 - Pixelated/Compressed 100 - Not Pixelated/Good Quality |
Text Quality | Gives a score ranging from 0-100 on the text readability, whether the text present on the image is readable | 0 - Bad Readability 100 - Good Readability |
Use Cases
This API can be used for the following -
- To identify the quality of an image, especially ID Documents
- To reject or approve for verification purposes based on the quality of the image
- To check if the image has been tampered or if it is a fake
API Requirements
Supported Formats: This API supports a limited set of image extensions or file formats -
- JPG
- JPEG
- PNG
Maximum File Size: This API supports an image with a max size of 2MB.
Sample Request & Response
{
"reference_id": "ABCDEF12345",
"consent": true,
"consent_purpose": "for bank account purpose only",
"image_url": "<Image URL>",
"quality_parameter": "all",
"threshold": 50
}
{
"decentroTxnId": "DECXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"status": "SUCCESS",
"responseCode": "S00000",
"message": "Image Quality check performed successfully",
"data": {
"imageQuality": {
"qualityScores": {
"textQuality": {
"valid": "yes",
"score": 100.0
},
"sharpness": {
"valid": "yes",
"score": 100.0
},
"brightness": {
"valid": "yes",
"score": 100.0
},
"compressionQuality": {
"valid": "yes",
"score": 73.0
}
},
"extractionQuality": "high",
"score": 73.0,
"summary": "accept",
"msg": "done"
}
},
"responseKey": "success_image_quality_check"
}
Updated 8 months ago