How to recognize MRZ code under OCR

This article introduces the syntax and examples of RecognizePassport MRZ code recognition under the category of character recognition (ocr).

 

Function description
The recognition ability of passport MRZ code can detect the entered passport MRZ image and output 11 information, including: type, country code, passport number, name, nationality, birthday, gender, start date, end date, machine verification code 1, machine verification code 2, which is convenient for subsequent information extraction and certificate verification.

 

Access guidelines
1. Register an AliCloud account: Open the AliCloud official website, click Register Now in the upper right corner of the AliCloud official website, and complete the account registration according to the operation prompts.
2. Subscription ability: Please make sure you have subscribed to the text recognition service. If you have not subscribed to the service, please subscribe immediately.
3. Create AccessKey: Please make sure you have created AccessKey. If you are using a sub-account AccessKey, you need to give AliyunVIAPIFullAccess permission to the sub-account. For specific operations, see RAM authorization.
4. Online debugging (optional): You can view the complete call sample code and SDK dependency information through the online debugging capability of OpenAPI Explorer, or download the complete project.
5. Development access steps:

  • Select the SDK language you want to access in the SDK overview.
  • Find the SDK package with AI category of character recognition (ocr) in the SDK document of the corresponding language for installation.
  • The sample code provided in the reference document shall be called after appropriate modification.

 

Input limit

  • Image format: JPEG, PNG, JPG.
  • Image size: no more than 10 MB.
  • Resolution: There is no limit on resolution, but too high resolution may cause API reasoning time timeout, which is 5 seconds.
  • The URL address cannot contain Chinese characters.

Debugging
You can run this interface directly in the OpenAPI Explorer to avoid the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
× How can I help you?