Method for generating typographical line
First Claim
1. A method for generating typographical line adapted to generating a plurality of typographical lines of a line of printing words in an image, wherein the line of printing words comprises a plurality of printing characters, the method comprising:
- using an optical character recognition device to perform the steps of(a) obtaining the image comprising the printing words;
(b) scanning the line of printing words and labeling a first edge and a second edge of each printing character in the line of printing words;
(c) extracting a first edge reference point of the first edge and a second edge reference point of the second edge of each of the printing characters, respectively;
(d) using a least square method to obtain a first straight line asymptotic to the first edge reference points;
(e) using the first straight line as a first base line to calculate a vertical distance between each of the second edge reference points and the first base line;
(f) using a group converging algorithm to divide the second edge reference points into a first group and a second group according to the vertical distances;
(g) using the least square method to obtain a second straight line and a third straight line asymptotic to the first group and the second group of the second edge reference points, respectively;
(h) using the second straight line or the third straight line obtained from corresponding first group or second group that has the most reference points as a second base line to calculate a vertical distance between each of the first edge reference point and the second base line;
(i) using the group converging algorithm to divide the first edge reference points into a third group and a fourth group according to the vertical distances;
(j) using the least square method to obtain a fourth straight line and a fifth straight line asymptotic to the first edge reference points of the third group and the fourth group, respectively; and
(k) using the second straight line, the third straight line, the fourth straight line and the fifth straight line as the typographical lines of the printing word line.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for generating typographical line is provided. In the present method, an asymptote of an upper or a lower edge of a line of printing words is obtained first. Then, two typographical lines of the other edge of the line of printing words are obtained according to the asymptote. Two typographical lines of the present edge of the line of printing words are obtained based on the previously obtained typographical lines. Finally, the relations of these typographical lines and edge reference points of the line of printing words are used for removing useless typographical lines. Therefore, the typographical lines obtained by the present invention can provide the means of recognizing word direction, large or small character writing, and punctuation marks, so as to increase the efficiency and accuracy of character recognition.
-
Citations
15 Claims
-
1. A method for generating typographical line adapted to generating a plurality of typographical lines of a line of printing words in an image, wherein the line of printing words comprises a plurality of printing characters, the method comprising:
-
using an optical character recognition device to perform the steps of (a) obtaining the image comprising the printing words; (b) scanning the line of printing words and labeling a first edge and a second edge of each printing character in the line of printing words; (c) extracting a first edge reference point of the first edge and a second edge reference point of the second edge of each of the printing characters, respectively; (d) using a least square method to obtain a first straight line asymptotic to the first edge reference points; (e) using the first straight line as a first base line to calculate a vertical distance between each of the second edge reference points and the first base line; (f) using a group converging algorithm to divide the second edge reference points into a first group and a second group according to the vertical distances; (g) using the least square method to obtain a second straight line and a third straight line asymptotic to the first group and the second group of the second edge reference points, respectively; (h) using the second straight line or the third straight line obtained from corresponding first group or second group that has the most reference points as a second base line to calculate a vertical distance between each of the first edge reference point and the second base line; (i) using the group converging algorithm to divide the first edge reference points into a third group and a fourth group according to the vertical distances; (j) using the least square method to obtain a fourth straight line and a fifth straight line asymptotic to the first edge reference points of the third group and the fourth group, respectively; and (k) using the second straight line, the third straight line, the fourth straight line and the fifth straight line as the typographical lines of the printing word line. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
Specification