# US 2021/0334602 A1 · Method and Apparatus for Recognizing Text Content and Electronic Device

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

- Number: US 2021/0334602 A1
- Document ID: US20210334602A1
- Status: Published application
- Kind: A1
- Application number: 17/172,031
- Filed: 2021-02-09
- Published: 2021-10-28
- Earliest claimed: 2020-04-28
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science and Technology Co., Ltd.
- Inventors: Shanshan Liu; Chengquan Zhang; Xuan Li; Mengyi En; Hailun Xu; Xiaoqiang Zhang
- Web page: https://patentgrep.com/patent/US20210334602A1

## CPC

- G06V 30/414: Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F 18/2178: {based on feedback of a supervisor}
- G06V 30/2504: {Coarse or fine approaches, e.g. resolution of ambiguities or multiscale approaches}
- G06V 2201/02: Recognising information on displays, dials, clocks
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present application discloses a method and an apparatus for recognizing text content, and an electronic device, and relates to a text recognition technique in the field of computer technology. The specific implementation is as follows: acquiring a dial picture; detecting at least one text centerline and a bounding box corresponding to each text centerline in the dial picture; and recognizing text content in each line of text in the dial picture based on the at least one text centerline and the bounding box corresponding to each text centerline.

## Claims

### Claim 1

A method for recognizing text content, applied to an electronic device, comprising:
acquiring a dial picture;
detecting at least one text centerline and a bounding box corresponding to each text centerline in the dial picture; and
recognizing text content in each line of text in the dial picture based on the at least one text centerline and the bounding box corresponding to each text centerline.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the recognition of the text content in each line of text in the dial picture based on the at least one text centerline and the bounding box corresponding to each text centerline comprises:
acquiring a text feature of at least one sampling point corresponding to a target line of text in the dial picture based on a centerline of a target text and a bounding box corresponding to the centerline of the target text, wherein the target line of text is located in the bounding box corresponding to the centerline of the target text, and the centerline of the target text is any one of the at least one text centerline;
serializing the text feature of the at least one sampling point to obtain a target text feature sequence;
performing supervised learning on the target text feature sequence through a preset loss function; and
decoding the target text feature sequence after performing the supervised learning to obtain the text content of the target line of text.

### Claim 3 (depends on 2)

The method according to claim 2, wherein before the serializing the text feature of the at least one sampling point, the method further comprises performing background suppression processing on the text feature of the at least one sampling point; and
the serialization of the text feature of the at least one sampling point comprises serializing the text feature of the at least one sampling point obtained after performing the background suppression processing.

### Claim 4 (depends on 1)

The method according to claim 1, wherein before the detection of the at least one text centerline and the bounding box corresponding to each text centerline in the dial picture, the method further comprises:
performing multi-scale feature processing on picture features of the dial picture to obtain a dial picture with multi-scale features.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the acquisition of the dial picture comprises:
performing multi-scale feature processing on picture features of a captured picture of a dashboard to obtain a captured picture with multi-scale features when receiving the captured picture of the dashboard;
performing feature classification and regression processing on the captured picture with the multi-scale features to determine a dial area in the captured picture; and
outputting a picture of the dial area as the dial picture.

### Claim 6 (depends on 1)

The method according to claim 1, wherein before the detection of the at least one text centerline and the bounding box corresponding to each text centerline in the dial picture, the method further comprises:
pre-processing the dial picture, the pre-processing comprising cropping the dial picture to a preset size, and performing mean subtraction processing on the dial picture.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the dial picture includes an image of an area where a dial of the dashboard is located in a captured picture, and the dial refers to an area where a display screen of a dashboard is located.

### Claim 8

An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor;
wherein the memory has instructions stored thereon and executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform a method for recognizing text content, applied to the electronic device, comprising:
acquiring a dial picture;
detecting at least one text centerline and a bounding box corresponding to each text centerline in the dial picture; and
recognizing text content in each line of text in the dial picture based on the at least one text centerline and the bounding box corresponding to each text centerline.

### Claim 9 (depends on 8)

The electronic device according to claim 8, wherein the recognition of the text content in each line of text in the dial picture based on the at least one text centerline and the bounding box corresponding to each text centerline comprises:
acquiring a text feature of at least one sampling point corresponding to a target line of text in the dial picture based on a centerline of a target text and a bounding box corresponding to the centerline of the target text, wherein the target line of text is located in the bounding box corresponding to the centerline of the target text, and the centerline of the target text is any one of the at least one text centerline;
serializing the text feature of the at least one sampling point to obtain a target text feature sequence;
performing supervised learning on the target text feature sequence through a preset loss function; and
decoding the target text feature sequence after performing the supervised learning to obtain the text content of the target line of text.

### Claim 10 (depends on 9)

The electronic device according to claim 9, wherein before the serializing the text feature of the at least one sampling point, the method further comprises performing background suppression processing on the text feature of the at least one sampling point; and
the serialization of the text feature of the at least one sampling point comprises serializing the text feature of the at least one sampling point obtained after performing the background suppression processing.

### Claim 11 (depends on 8)

The electronic device according to claim 8, wherein before the detection of the at least one text centerline and the bounding box corresponding to each text centerline in the dial picture, the method further comprises:
performing multi-scale feature processing on picture features of the dial picture to obtain a dial picture with multi-scale features.

### Claim 12 (depends on 8)

The electronic device according to claim 8, wherein the acquisition of the dial picture comprises:
performing multi-scale feature processing on picture features of a captured picture of a dashboard to obtain a captured picture with multi-scale features when receiving the captured picture of the dashboard;
performing feature classification and regression processing on the captured picture with the multi-scale features to determine a dial area in the captured picture; and
outputting a picture of the dial area as the dial picture.

### Claim 13 (depends on 8)

The electronic device according to claim 8, wherein before the detection of the at least one text centerline and the bounding box corresponding to each text centerline in the dial picture, the method further comprises:
pre-processing the dial picture, the pre-processing comprising cropping the dial picture to a preset size, and performing mean subtraction processing on the dial picture.

### Claim 14 (depends on 8)

The electronic device according to claim 8, wherein the dial picture includes an image of an area where a dial of the dashboard is located in a captured picture, and the dial refers to an area where a display screen of a dashboard is located.

### Claim 15

A non-transitory computer-readable storage medium having computer instructions stored thereon, which are used to realize a method for recognizing text content, applied to the electronic device, comprising:
acquiring a dial picture;
detecting at least one text centerline and a bounding box corresponding to each text centerline in the dial picture; and
recognizing text content in each line of text in the dial picture based on the at least one text centerline and the bounding box corresponding to each text centerline.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the recognition of the text content in each line of text in the dial picture based on the at least one text centerline and the bounding box corresponding to each text centerline comprises:
acquiring a text feature of at least one sampling point corresponding to a target line of text in the dial picture based on a centerline of a target text and a bounding box corresponding to the centerline of the target text, wherein the target line of text is located in the bounding box corresponding to the centerline of the target text, and the centerline of the target text is any one of the at least one text centerline;
serializing the text feature of the at least one sampling point to obtain a target text feature sequence;
performing supervised learning on the target text feature sequence through a preset loss function; and
decoding the target text feature sequence after performing the supervised learning to obtain the text content of the target line of text.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium according to claim 16, wherein before the serializing the text feature of the at least one sampling point, the method further comprises performing background suppression processing on the text feature of the at least one sampling point; and
the serialization of the text feature of the at least one sampling point comprises serializing the text feature of the at least one sampling point obtained after performing the background suppression processing.

### Claim 18 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein before the detection of the at least one text centerline and the bounding box corresponding to each text centerline in the dial picture, the method further comprises:
performing multi-scale feature processing on picture features of the dial picture to obtain a dial picture with multi-scale features.

### Claim 19 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein the acquisition of the dial picture comprises:
performing multi-scale feature processing on picture features of a captured picture of a dashboard to obtain a captured picture with multi-scale features when receiving the captured picture of the dashboard;
performing feature classification and regression processing on the captured picture with the multi-scale features to determine a dial area in the captured picture; and
outputting a picture of the dial area as the dial picture.

### Claim 20 (depends on 15)

The non-transitory computer-readable storage medium according to claim 15, wherein before the detection of the at least one text centerline and the bounding box corresponding to each text centerline in the dial picture, the method further comprises:
pre-processing the dial picture, the pre-processing comprisings cropping the dial picture to a preset size, and performing mean subtraction processing on the dial picture.
