Introduction to OCR

Optical Character Recognition (OCR) detects and extracts text from images, scanned copies, PDFs, and OFD files, and converts the recognition results into editable text.

OCR provides open APIs, so you can use programming languages such as Python and Java to call OCR APIs to extract text from images. OCR allows you to automate the collection of key data. It helps you build an intelligent service system to improve efficiency. For details about how to obtain APIs, see Optical Character Recognition API Reference.

OCR also provides software development kits (SDKs) for multiple programming languages. For details about how to use SDKs, see Optical Character Recognition SDK Reference.

You can use either of the following methods to call OCR APIs after subscription:

A software tool such as curl or Postman

  1. These are good options if you are more comfortable writing code, HTTP requests, and API calls. For details about how to use the tool, see Using Postman to Call the Passport OCR API.

Software development kit (SDK)

  1. SDKs for Java, Python, and Node.js are available for quick integration. For details about how to use the tool, see Calling the Passport OCR SDK.

General OCR

Function Description

Web Image OCR: Automatically recognizes all characters and their locations in web images, extracts contact information, and provides the information for data mining and post-processing.

Application Scenarios

Electronic documentation archive: Recognizes structured information and extracts signatures and seals for quick review.

Express waybill filling: Recognizes contact information in images and generates express waybills automatically, eliminating the need for manual input.

Contract upload and review: Automatically recognizes structured information and extracts signatures and seals for quick review.

Card OCR

Function Description

  1. Passport OCR
  2. Automatically recognizes all information on a Chinese passport. For other countries' passports, Passport OCR can recognize six to seven key fields based on the machine-readable code, including the name, gender, date of birth, passport number, country code, and date of expiry. Passport information can be accurately recognized even in complex conditions such as low light, tilt, overexposure, and shadow.

  3. Thailand ID Card OCR
  4. Automatically recognizes all information on Thailand ID cards. After an ID card is scanned, information like the ID number, name, and address can be identified even in complex conditions such as low light, tilt, overexposure, and shadow.

  5. Cambodian ID Card OCR
  6. Recognizes text from Cambodian ID card images, including the name, date of birth, sex, and issuance date.

  7. Myanmar ID Card OCR
  8. Automatically recognizes all information on both sides of ID cards. After an ID card is scanned, information like the ID number, name, and address can be identified even in complex conditions such as low light, tilt, overexposure, and shadow.

  9. Myanmar Driving License OCR
  10. Automatically recognizes structured information on Myanmar-issued driving licenses, including the ID number, name, National Registration Card (NRC) number, date of birth, blood type, and validity period.

  11. Chile ID Card OCR
  12. Automatically recognizes the text in a Chile ID card image, including the ID card number, name, nationality, gender, date of birth, and validity period.

  13. Hong Kong ID Card OCR
  14. Recognizes key information on Hong Kong-issued ID cards, including the ID number, Chinese and English names, sex, and date of birth.

  15. Macao Resident ID Card OCR
  16. Recognizes text from Macao resident ID card images, including the ID number, Chinese and English names, sex, and date of birth.

  17. Exit-Entry Permit for Traveling to and from Hong Kong, Macao, and Taiwan OCR
  18. Recognizes text from images of Exit-Entry Permit for Traveling to and from Hong Kong, Macao, and Taiwan, including the Chinese and English names, date of birth, certificate number, issuing authority, and certificate type.

  19. Mainland Travel Permit for Hong Kong, Macao, and Taiwan Residents OCR
  20. Recognizes text from images of Mainland Travel Permit for Hong Kong and Macao Residents and Mainland Travel Permit for Taiwan Residents.

Application Scenarios

  1. Authentication
  2. Invokes APIs to quickly complete real-name authentication for express delivery and mobile phone registration.

  3. Card information recording
  4. Automatically extracts key information from certificates, eliminating the need for manual input.

  5. Identity verification
  6. Checks whether the user is the certificate holder.

OCR FAQs

API & Billing & Subscription

  • How Do I View the API Usage?

    1. Log in to the OCR console.

    2. In the navigation pane on the left, choose Service Monitoring, and view the API usage.

  • Why Is the Actual Number of API Calls Inconsistent with the Record Displayed on the Management Console?

    The OCR console only records the number of successful API calls. The number of failed API calls is not recorded.

    To view the number of failed calls, perform the following operations:

    1. Log in to the management console.

    2. On the console home, choose Optical Character Recognition. The Optical Character Recognition console is displayed.

    3. Click the target service. Click View Monitoring Graph to go to the Cloud Eye console and view detailed service usage such as the number of successful or failed API calls.

  • What Do I Do If the Subscribe Button Is Dimmed?

    Symptom

    After logging in to the OCR console, I cannot subscribe to an OCR service because the Subscribe button is dimmed.

    Possible Causes

    The possible cause is that the current user is an IAM user who does not have the permission to subscribe to the service. An account pays for and owns the resources and has full access permissions for the resources.

    Solution

    Log in to the OCR console using an account and subscribe to OCR.

  • How Do I Select a Region for an OCR Package?

    Resource packages in different regions are isolated. Select a region according to your business requirements. For details about the regions where services are deployed, see Endpoints.

    Determine the service region before purchasing a service package.

  • Can a Package Be Refunded After Being Purchased?

    The package cannot be refunded after being purchased.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more