Identity Scanner
Identity Scanner is a Zia AI-driven component that enables you to perform secure identity checks on individuals and documents by scanning and processing various ID proofs or official documents. It is a comprehensive suite that incorporates multiple functionalities divided into two major categories- E-KYC and Document Processing.
Aadhaar
The AADHAAR model is a part of the Document Processing feature that enables you to process Indian Aadhaar cards as identity proof documents. This enables you to extract fields of data from an Indian Aadhaar card using an advanced OCR technology. The response will return the parameters recognized from the Aadhaar card, along with confidence scores for each recognition that determine their accuracy.
You must provide the path to the image files of the front and back of the Aadhaar card using the keys aadhaarFront and aadhaarBack, as shown in the code below.
You can temporarily pass the languages as shown in the code below. You must pass English and the relevant regional language. For example, if you are from Tamil Nadu, you must pass tam and eng as the languages. You can check the list of languages and language codes from the API documentation.
Allowed file formats: .jpg, .jpeg, .png, .bmp, .tiff, .pdf
File size limit: 15 MB
Note: The variables should be declared only in following order: aadhaarFront, aadhaarBack, languageCode
The response contains the parameters recognized in the Aadhaar card such as the card holder’s name, address, gender, Aadhaar card number assigned to respective keys. The response also shows a confidence score in the range of 0 to 1 for each of the recognized values.
Ensure the following packages are imported:
copyimport com.zc.component.ml.ZCContent; import com.zc.component.ml.ZCLine; import com.zc.component.ml.ZCML; import com.zc.component.ml.ZCParagraph; import java.io.File;
copyFile aadhaarFront = new File("/Users/amelia-421/Desktop/myAadhaar1.jpg"); //Specify the file path of the front side image of the Aadhaar card File aadhaarBack = new File("/Users/amelia-421/Desktop/myAadhaar2.jpg"); //Specify the file path of the back side image of the Aadhaar card String languageCode = "eng,tam"; //Set the languages ZCContent ocrContent = ZCML.getInstance().getContentForAadhaar(aadhaarFront,aadhaarBack,languageCode); //Call getContent() with the file object to get the detected text in ZCContent object //To get individual paragraphs List paragraphs = ocrContent.getParagraphs(); for(ZCParagraph paragraph : paragraphs) { //To get individual lines in the paragraph List paraLines = paragraph.lines; for(ZCLine line : paraLines) { //To get individual words in the line String words = line.words; String text = line.text; //Raw line text } String text = paragraph.text; //Returns the raw paragraph text } String text = ocrContent.text; //Returns the raw image text
Last Updated 2024-01-04 12:37:42 +0530 +0530
Yes
No
Send your feedback to us