To make an analysis on the quality of fingerprint images, use the operation check_nfiq, which will check according to the ISO/IEC 29794-4 norm, which aims to improve the performance of biometric analysis performed automatically by machines. Thus, verifying the quality of the fingerprint biometrics that are being sent intensifies the functioning of the system.

For the request body, insert the base64 string representing the fingerprint image you wish to verify, as shown in the example below:

{
  "Check": {
    "Image": "SUkqABaNAQCAP4AQOCQWDQeEQmFQ..."
  }
}

For the header, just insert the content type and your subscription key, replacing <API-KEY> in the example below:

{
  'Content-Type': 'application/json',
  'Ocp-Apim-Subscription-Key': '<API-KEY>'
}

Lastly, for the request, insert as parameters the specification that it’s a POST method, theURL, the header, and the body, as in the following example, written in Python, but that can be seen in several other programming languages in our documentation:

import http.client
import json

conn = http.client.HTTPSConnection("hml-api.biopassid.com")
payload = json.dumps({
  "Check": {
    "Image": "SUkqABaNAQCAP4AQOCQWDQeEQmFQ..."
  }
})
headers = {
  'Content-Type': 'application/json',
  'Ocp-Apim-Subscription-Key': '<API-KEY>'
}
conn.request("POST", "/quality/check_nfiq", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

If you receive the code 200 (OK), this means your request was completed successfully. The system response will be an integer value from 1 to 5 representing the quality of the image sent, where the lower the value, the better is the quality. The response from the given example can be seen below:

"NFIQ": {
    "Quality": 2
}