Huawei Cloud Optical Character Recognition(OCR): A Comprehensive Guide

Muhammet Berke OZTURK
Huawei Developers
Published in
5 min readJul 10, 2023

--

Introduction to Huawei Cloud Optical Character Recognition(OCR): A Comprehensive Guide

cover image

Introduction

Hello, everyone. This article is about Huawei Cloud Optical Character Recognition service. We are going talk about What is OCR, How can we use it, what for, and its features. After you read this article, you will be able to use Huawei Cloud OCR service and convert your images to text. Let’s hop on to it!

What is OCR?

Optical character recognition is known as OCR. OCR is a technique that transforms printed or scanned documents into editable text for searching and editing. The system works by identifying the characters in an image and then converting them into text that a computer can understand. OCR is helpful for many different purposes, including scanning ancient books and enabling text search in PDF files. Both card and general OCR are supported by OCR. We can transform text in photos into legible and usable text files using general OCR. Card OCR helps us identify cards and passports and digitizes the text on them so that it can be read by machines.

Supported features

General OCR-supported features are like below;

  • Web Image OCR

How can we use this feature in our daily lives and jobs?

  • Electronic documentation archive
  • Express waybill filling
  • Contract upload and review

For Card OCR-supported features and use cases are given below;

  • Passport OCR
  • Thailand ID Card OCR
  • Cambodian ID Card OCR
  • Myanmar ID Card OCR
  • Myanmar Driving License OCR
  • Chile ID Card OCR
  • Hong Kong ID Card OCR
  • Macao Resident ID Card OCR
  • Exit-Entry Permit for Traveling to and from Hong Kong, Macao, and Taiwan OCR
  • Mainland Travel Permit for Hong Kong, Macao, and Taiwan Residents OCR
Passport OCR sample

With the use of these Card OCR technologies, text on cards can be transformed into text that computers can read. recognizes the information on the card automatically, allowing us to use these texts for the jobs we want. More details on these OCR types are available on the Huawei Cloud Support page.

What are the application scenarios for Card OCR?

  • Authentication
  • Card information recording
  • Identity verification

There are some things we should be careful about when we are using Huawei Cloud OCR service. Here are some of them;

  • Only images in PNG, JPG, JPEG, BMP, or TIFF format can be recognized.
  • No side of the image can be smaller than 15 or larger than 8,192 pixels.
  • The information page to be recognized must occupy more than 25% of the image, and the entire page must be displayed in the image.
  • The passport in the image can be moderately distorted, but the aspect ratio cannot be distorted by more than 10%.
  • Images can be rotated to any angle to optimize recognition results.
  • Passports from specific countries can be recognized by extracting information based on the machine-readable code
  • You should avoid using images that have low brightness and dark color types. Accuracy might be low.

Billing

Pay-per-Use:

The default billing mode is this. The amount you are charged depends on how many API calls you make to the OCR service. Pay as you go is the payment method. Only successful API calls will result in billing. As a result, you just pay for what the API request costs.

Pay-per-Package:

The discount offered by this billing option is greater than the pay-per-use option. A bundle costs a single amount and is good for a whole year. Any quota that isn’t used after the package expires will be void. Packages are charged fees in the following priority order: free > pay per package > pay per use. Packages can be combined, and if more than one is bought, deductions are made according to regulations based on the creation, validity, and expiration times of the individual packages.

If you want to calculate how much you need to pay for using OCR, you can use Price Calculator.

OCR Console page

How to purchase and use OCR for your needs?

  • If you don’t already have a Huawei Cloud account, create one by visiting this link.
  • Visit this link to access the Huawei Cloud console.
  • From the navigation bar, open the OCR console page. Get the OCR service you require by subscribing. Visit Package Management > Purchase a package. Depending on user needs, multiple package choices are available to choose from on the OCR buying page. Depending on how you plan to use OCR, pick the appropriate bundle.

Note: OCR is only available in the regions given below for now;

  • CN North-Beijing4
  • CN East-Shanghai1
  • CN South-Guangzhou
  • Choose the preferred time period for the package validity (one month or one year).
  • Complete the payment procedure based on your preferred payment method, which includes methods such as online banking, Alipay, WeChat Pay, and credit card.
  • Follow the instructions to download the OCR SDK and integrate it into your application code.
  • Call the OCR API to recognize text from images.
  • Analyze the OCR results and process them based on your business requirements.

You can use O&M Services with OCR service together to manage your API Calls.

The related services you can use together with OCR are given below;

  • Identity and Access Management (IAM) You can use it for user authentication and access to OCR
  • Cloud Eye Service (CES) You can see the metrics of your API Calls. Use these metrics to monitor OCR usage.
  • Object Storage Service (OBS) OBS is a secure cloud storage service of Huawei Cloud. OCR APIs involve a lot of data processing. You can use OBS to improve processing efficiency by batch processing data on the cloud.

Data protection

  • Huawei Cloud OCR promises that your data is not written to disks, and your data is deleted immediately after the recognition results are returned to you.
  • OCR uses HTTPS and Huawei Cloud API Gateway (APIG) to ensure full-link security during data transmission. APIG supports both TLS 1.1 and 1.2. TLS 1.2 is recommended because it is more secure.

Conclusion

In this article, we have provided an introduction to what OCR is and guided you through the process of using it. Understanding and using OCR is making your daily and formal life much easier. We encourage you to explore this service further and try out a few practice exercises.

References

https://console-intl.huaweicloud.com/

https://www.comidor.com/wp-content/uploads/2022/08/ocr-55-e1661521818617-1024x569.png

--

--