Image Quality Check

Image Quality API 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 ParamtersDescriptionScore
BlurrinessGives a score ranging from 0-100 on the blurriness of the image uploaded. Blurry Images are hard to process for extraction0 - Highly Blurred
100 - Sharp Image
BrightnessGives a score ranging from 0-100 on the brightness/visibility (either image has minimum visibility to be extracted) or not of the image uploaded0 - Dark Image
100 - Bright Image
Compression QualityGives a score ranging from 0-100 on whether the image is pixelated. Highly pixelated image is not readable0 - Pixelated/Compressed
100 - Not Pixelated/Good Quality
Text QualityGives a score ranging from 0-100 on the text readability, whether the text present on the image is readable0 - 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 purpose based on the quality of 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
  • PDF

Maximum File Size: This API supports an image with a max size of 2MB.

Sample Request & Response

{
  "reference_id": "Manish Gupta is Testing",
  "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": 74.0
                }
            },
            "extractionQuality": "high",
            "score": 74.0,
            "summary": "accept",
            "msg": "done"
        }
    }
}