Patent ID: 11893767
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 11:
12. A text recognition apparatus, comprising:
at least one processor; and
one or more memories coupled to the at least one processor and storing programming instructions for execution by the at least one processor to cause the apparatus to:
obtain a to-be-detected image;
determine a target text detection area in the to-be-detected image, wherein the target text detection area comprises target text in the to-be-detected image, the target text detection area is a polygonal area, the polygonal area comprises m vertex pairs, m is a positive integer greater than 2, and each of the m vertex pairs comprises two vertices including a vertex located on one side of the target text and another vertex located on another side of the target text, so that m vertices are located on one side of the target text, and other m vertices are located on another side of the target text;
correct the polygonal area to m−1 rectangular areas to obtain a corrected target text detection area based on the m vertex pairs; and
perform text recognition on the corrected target text detection area to determine the target text, and output the target text,
wherein the determining of the target text detection area in the to-be-detected image comprises:
determining a plurality of candidate center points in the to-be-detected image and a vertex pair corresponding to each of the plurality of candidate center points, wherein each of the plurality of candidate center points is associated with a confidence level indicating likelihood of the associated candidate center point being a center point in the target text detection area in a text height direction; and
determining, based on the confidence level of each of the plurality of candidate center points, center points forming a center line of the target text detection area, wherein the center line passes though all pieces of text in the target text detection area.