# US 2022/0292293 A1 · Character recognition method and apparatus, electronic device, and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0292293 A1
- Document ID: US20220292293A1
- Status: Published application
- Kind: A1
- Application number: 17/378,536
- Filed: 2021-07-16
- Published: 2022-09-15
- Earliest claimed: 2021-03-11
- Assignees: Beijing Xiaomi Mobile Software Co., Ltd.; Beijing Xiaomi Pinecone Electronics Co., Ltd.
- Applicants: Beijing Xiaomi Mobile Software Co., Ltd.; Beijing Xiaomi Pinecone Electronics Co., Ltd.
- Inventors: Dong WANG
- Web page: https://patentgrep.com/patent/US20220292293A1

## CPC

- G06V 10/25: Determination of region of interest [ROI] or a volume of interest [VOI]
- G06V 20/40: in video content (extracting overlay text G06V20/62; video retrieval G06F16/70; processing of video elementary streams in video servers H04N21/234; processing of video elementary streams in video clients H04N21/44)
- G06T 7/13: Edge detection
- G06V 10/98: Detection or correction of errors, e.g. by rescanning the pattern or by human intervention; Evaluation of the quality of the acquired patterns
- G06V 20/635: {Overlay text, e.g. embedded captions in a TV programme}
- G06V 30/1444: {Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields}
- G06V 30/147: {Determination of region of interest}
- G06V 30/148: Segmentation of character regions
- G06V 30/164: Noise filtering
- G06V 30/1801: {Detecting partial patterns, e.g. edges or contours, or configurations, e.g. loops, corners, strokes or intersections (extracting features by contour coding G06V30/182)}
- G06V 30/262: using context analysis, e.g. lexical, syntactic or semantic context
- G06V 30/41: Analysis of document content (recognition of printed characters based on code marks G06V30/224)
- G06V 30/10: Character recognition
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A method, apparatus, electronic device, and storage medium for character recognition are provided. The method may perform image processing on an acquired original image to obtain a region to be recognized. The region may include a character. The method may determine an area ratio of the region to be recognized on the original image. The method may determine an angle between the region to be recognized and a preset direction. The method may determine a character density of the region to be recognized. The method may perform character recognition on the character in the region to be recognized in response to determining that the area ratio is greater than a ratio threshold, the angle is less than an angle threshold, and the character density is less than a density threshold.

## Claims

### Claim 1

A method for character recognition, comprising:
performing image processing on an acquired original image to obtain a region to be recognized, wherein the region comprises a character;
determining an area ratio of the region to be recognized on the original image;
determining an angle between the region to be recognized and a preset direction;
determining a character density of the region to be recognized; and
performing character recognition on the character in the region to be recognized in response to determining that the area ratio is greater than a ratio threshold, the angle is less than an angle threshold, and the character density is less than a density threshold.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining a first average gray value of at least one pixel in the region to be recognized and a second average gray value of at least one pixel in a preset region extending outwards from the region to be recognized; and
determining a binarization threshold according to the first average gray value and the second average gray value;
wherein performing character recognition on the character in the region to be recognized comprises:
performing binarization processing on the region to be recognized according to the binarization threshold, and
performing character recognition on the character in the region to be recognized subjected to the binarization processing.

### Claim 3 (depends on 1)

The method of claim 1, wherein determining the area ratio of the region to be recognized on the original image comprises:
determining a maximum inscribed rectangle of the region to be recognized;
determining an area of the region to be recognized according to an area of the maximum inscribed rectangle; and
determining the area ratio of the region to be recognized on the original image according to the area of the region to be recognized.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
determining a height and width of the region to be recognized;
wherein performing character recognition on the character in the region to be recognized in response to determining that the area ratio is greater than the ratio threshold, the angle is less than the angle threshold, and the character density is less than the density threshold comprises:
performing character recognition on the character in the region to be recognized in response to determining that the height is greater than a height threshold and/or the width is greater than a width threshold, the area ratio is greater than the ratio threshold, the angle is less than the angle threshold, and the character density is less than the density threshold.

### Claim 5 (depends on 1)

The method of claim 1, wherein determining the character density of the region to be recognized comprises:
determining a character count of the region to be recognized; and
determining the character density of the region to be recognized according to the character count.

### Claim 6 (depends on 5)

The method of claim 5, wherein determining the character count of the region to be recognized comprises:
projecting the region to be recognized to a set direction to obtain a projected region, wherein the set direction is a row direction of the character in the region to be recognized;
determining a pixel density distribution of the projected region; and
determining the character count of the region to be recognized according to the pixel density distribution.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
extracting a frame image corresponding to a present frame extraction period from a video to be processed as the original image according to the frame extraction period.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
determining the frame extraction period according to a total length of the video to be processed.

### Claim 9 (depends on 1)

The method of claim 1, wherein performing character recognition on the character in the region to be recognized comprises:
performing optical character recognition (OCR) on the character in the region to be recognized to obtain first character information; and
performing error correction processing on the first character information to obtain second character information.

### Claim 10 (depends on 4)

The method of claim 4, wherein determining the character density of the region to be recognized comprises:
determining a character count of the region to be recognized; and
determining the character density of the region to be recognized according to the character count.

### Claim 11

An apparatus, comprising:
one or more processors; and
a non-transitory computer-readable storage medium storing instructions executable by the one or more processors;
wherein the one or more processors are configured to:
perform image processing on an acquired original image to obtain a region to be recognized, wherein the region comprises a character;
determine an area ratio of the region to be recognized on the original image;
determine an angle between the region to be recognized and a preset direction;
determine a character density of the region to be recognized; and
perform character recognition on the character in the region to be recognized in response to the area ratio being greater than a ratio threshold, the angle being less than an angle threshold, and the character density being less than a density threshold.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the one or more processors are further configured to:
determine a first average gray value of at least one pixel in the region to be recognized and a second average gray value of at least one pixel in a preset region extending outwards from the region to be recognized; and
determine a binarization threshold according to the first average gray value and the second average gray value;
wherein the one or more processors configured to perform character recognition on the character in the region to be recognized are further configured to:
perform binarization processing on the region to be recognized according to the binarization threshold, and
perform character recognition on the character in the region to be recognized subjected to the binarization processing.

### Claim 13 (depends on 11)

The apparatus of claim 11, wherein the one or more processors are further configured to:
determine a maximum inscribed rectangle of the region to be recognized;
determine an area of the region to be recognized according to an area of the maximum inscribed rectangle; and
determine the area ratio of the region to be recognized on the original image according to the area of the region to be recognized.

### Claim 14 (depends on 11)

The apparatus of claim 11, wherein the one or more processors are further configured to:
determine a height and width of the region to be recognized;
wherein the one or more processors configured to perform character recognition on the character in the region to be recognized in response to the area ratio being greater than the ratio threshold, the angle being less than the angle threshold, and the character density being less than the density threshold are further configured to:
perform the character recognition on the character in the region to be recognized responsive to that the height is greater than a height threshold and/or the width is greater than a width threshold, the area ratio is greater than the ratio threshold, the angle is less than the angle threshold, and the character density is less than the density threshold.

### Claim 15 (depends on 11)

The apparatus of claim 11, wherein the one or more processors are further configured to:
determine a character count of the region to be recognized; and
determine the character density of the region to be recognized according to the character count.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the one or more processors are further configured to:
project the region to be recognized to a set direction to obtain a projected region, wherein the set direction is a row direction of the character in the region to be recognized;
determine a pixel density distribution of the projected region; and
determine the character count of the region to be recognized according to the pixel density distribution.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the one or more processors are further configured to:
extract a frame image corresponding to a present frame extraction period from a video to be processed as the original image according to the frame extraction period.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein the one or more processors are further configured to:
determine the frame extraction period according to a total length of the video to be processed.

### Claim 19 (depends on 11)

The apparatus of claim 11, wherein the one or more processors are further configured to:
perform optical character recognition (OCR) on the character in the region to be recognized to obtain first character information; and
perform error correction processing on the first character information to obtain second character information.

### Claim 20

A non-transitory computer-readable storage medium storing instructions for execution by a computing device having one or more processors, wherein the instructions, when executed by one or more processors, cause the computing device to perform acts comprising:
performing image processing on an acquired original image to obtain a region to be recognized, wherein the region comprises a character;
determining an area ratio of the region to be recognized on the original image;
determining an angle between the region to be recognized and a preset direction;
determining a character density of the region to be recognized; and
performing character recognition on the character in the region to be recognized in response to determining that the area ratio is greater than a ratio threshold, the angle is less than an angle threshold, and the character density is less than a density threshold.
