Image Quality
Introduction
This API provides an easy and efficient way to optimize image quality for patrons on your platform.The Image Quality API endpoint is one of many available to developers, allowing for automated analysis of image files to assess their quality based on various parameters such as blur, brightness, compression quality, and text quality.API is designed to provide an easy and efficient way to access and manipulate images for patron verification purposes.
Sample CURL
curl --request POST \
--url https://signzy.tech/api/v2/patrons/...patronID.../imagequality \
--header 'Accept: */*' \
--header 'Accept-Language: en-US,en;q=0.8' \
--header 'Authorization: <Access-Token>' \
--header 'content-type: application/json' \
--data '{"essentials":{"files":["...url of the file..."],"qualityParameter":"all | blur | brightness | compressionQuality | textQuality"}}'Parameter | Type | Description |
|---|---|---|
patronID | Path Parameter | A unique identifier for the patron whose image quality needs to be adjusted. |
Access-Token | Header Parameter | An authentication token obtained from Signzy.tech. |
Accept | Header Parameter | The response format that the client can accept. This can be set to any MIME type, but using "/" is recommended. |
Accept-Language | Header Parameter | The preferred language for the response text. |
content-type | Header Parameter | The format of the request body. Set this to "application/json" to use JSON format. |
files | Body Parameter | The URL of the image file to be adjusted. The value should be a string containing the file URL. |
qualityParameter | Body Parameter | The quality parameter to be adjusted for the image. This can be one of the following values: "all", "blur", "brightness", "compressionQuality", or "textQuality". |
Sample API Response
"essentials": {
"files": ["...url..to..file.." ]
},
"id": "5baXXXX",
"patronId": "5a9XXXX",
"result": {
"qualityScores": {
"sharpness": {
"score": "0 to 1",
"valid": "yes | no"
},
"brightness": {
"score": "0 to 1",
"valid": "yes | no"
},
"compressionQuality": {
"score": "0 to 1",
"valid": "yes | no"
},
"textQuality": {
"score": "0 to 1",
"valid": "yes | no"
}
},
"extractionQuality": "veryLow | low | medium | high",
"summary": "accept | reject",
"score": "0 to 1",
"msg": "done"
}
}Parameter | Description |
|---|---|
essentials | An object containing the file URL of the image to be adjusted. |
id | The ID of the request made. |
patronId | The ID of the patron whose image was adjusted. |
result.qualityScores.sharpness.score | A score between 0 and 1 representing the sharpness quality of the image. A higher score indicates better sharpness. |
result.qualityScores.sharpness.valid | A flag indicating whether the sharpness quality score is valid. If set to "yes", the score is valid, otherwise, it is invalid. |
result.qualityScores.brightness.score | A score between 0 and 1 representing the brightness quality of the image. A higher score indicates better brightness. |
result.qualityScores.brightness.valid | A flag indicating whether the brightness quality score is valid. If set to "yes", the score is valid, otherwise, it is invalid. |
result.qualityScores.compressionQuality.score | A score between 0 and 1 representing the compression quality of the image. A higher score indicates better compression quality. |
result.qualityScores.compressionQuality.valid | A flag indicating whether the compression quality score is valid. If set to "yes", the score is valid, otherwise, it is invalid. |
result.qualityScores.textQuality.score | A score between 0 and 1 representing the text quality of the image. A higher score indicates better text quality. |
result.qualityScores.textQuality.valid | A flag indicating whether the text quality score is valid. If set to "yes", the score is valid, otherwise, it is invalid. |
result.extractionQuality | A string indicating the quality of image extraction from the patron document. The possible values are "veryLow", "low", "medium", and "high". A higher extraction quality score indicates better extraction quality. |
result.summary | A string indicating whether the image was accepted or rejected based on the adjusted quality parameters. If set to "accept", the image is accepted, otherwise, it is rejected. |
result.score | A score between 0 and 1 representing the overall quality of the image after adjustment. A higher score indicates better quality. |
result.msg | A message indicating whether the request was successful. If set to "done", the request was successful. |