8.3.4 Voter Identity Card Extraction

This topic provides the information about the payload details for voter identity card extraction service.

VoterID card Details Extraction module extracts details in the Voter ID Card like Name, First Name, Last Name, Gender, Date of Birth and, ID No. along with the image metadata information like Image DPI, Resolution, and Size. Currently, we provide support for Voter IDs of various countries listed below:
  • INDIA

All the details in the license are extracted using "/extractInformation" API.

Brief of Working:

It takes "country", "document type" and "Base64 encoded image" of the Voter ID as input. It internally generates processed text from the Identity document and extracts details like Name, First Name, Last Name, Gender, DOB, and ID No. Along with the document details, it also gives image metadata information like Image DPI, Resolution and Size. The output is represented in JSON format.

Input Request:

"/extractInformation" API -
  • For a single image: Base64 encoded image, Country, Document Type (“voterid" in this case).
  • For multiple images: Array of the Base64 encoded images, Country, Document Type ("voterid" in this case).
Sample Input Request:

{
   "country": "IND",
   "docType": "voterid", "docBase64s": [
     "------base64 encoded image	"
  ]
}

Output Response:

The output for "/extractInformation" API is the extracted details in the JSON format given below:

Sample Output Response:

{
    "documentDetails": [
        {
            "ImageInfo": {
                "file_size": "236.93 KB",
                "image_dpi": "300",
                "image_resolution": "317x500",
                "information": "Image DPI is proper. File size is proper."
            },
            "dateOfBirth": "15/2/1985",
            "dateOfExpiry": "",
            "dateOfIssue": "",
            "docType": "VOTERID",
            "firstName": "PREM",
            "gender": "M",
            "identificationNumber": "GDN0225185",
            "issuedCountry": "INDIA",
            "issuingAuthority": "",
            "lastName": "RAJ THAKUR",
            "name": "PREM RAJ THAKUR"
        }
    ]
}

Note:

Even if Country and DocType are not provided in the input request, the service tries to extract the Country Name and Document Type automatically. In case, if it is not able to extract it returns an exception/ error. This means either the quality of the document is not enough to extract all the details or resolution is poor.
Things to be taken care of:
  • Make sure the base64 encoded image string of the input image is correct.
  • Document Type provided in the input should be "voterid" only
  • Specify the country name correctly for accurate extraction of details