SYSTEM FOR DETERMINING CORRECTION OF HANDWRITING CHINESE CHARACTERS

Information

  • Patent Application
  • 20240212378
  • Publication Number
    20240212378
  • Date Filed
    December 27, 2022
    a year ago
  • Date Published
    June 27, 2024
    5 months ago
  • Inventors
    • ZHUANG; JIANMING
  • CPC
  • International Classifications
    • G06V30/28
    • G06V30/148
    • G06V30/18
    • G06V30/19
    • G06V30/22
    • G09B19/06
Abstract
A system for determining correction of handwriting Chinese characters is provided. Text features of sampled template Chinese characters are calculated and stored in a feature set database. Then the text features of a handwriting Chinese character to be tested is also calculated. Then the two text features are compared, if they are matched, it is considered that the handwriting Chinese character to be tested has a correct handwriting way for the Chinese character. The result is feedback to the user. Therefore, the faults of the writer can be indicated in time as the user writes a Chinese character. Therefore, it is helpful for learning Chinese. A learner can know whether the Chinese character written now is correct or wrong real time. As a result, learning efficiency is promoted quickly.
Description
FIELD OF THE INVENTION

The present invention is related to determination of handwriting Chinese characters, and in particular to a system for determining correction of handwriting Chinese characters.


BACKGROUND OF THE INVENTION

With the development of China in the world, Chinese characters have become a very popular language and more and more people uses Chinese characters in daily life. Generally, a Chinese character includes at least one component (radical), each component being formed by several strokes. Generally, a Chinese character includes two or more components.


Because there are many different components (radicals) used in Chinese characters, for a foreigner, it is often that he or she may be wrong in writing of Chinese characters due to errors of the components (radicals), or the arrangement of several components in one Chinese character. However, it is difficult for foreigners to identify the errors in writing of the Chinese characters. Therefore, there is an eager demand for a computer recognition way to identify correctness of a Chinese character.


Currently, there are several novel utilities aiming for identification of Chinese characters, while all these methods are based on the strokes, orders of writing, direction arrangements of the Chinese characters, while no method is related to the corrections of the components of the Chinese character.


However, a new learner of Chinese is possible written Chinese characters which exist errors of the components of the Chinese characters. Therefore, there is an eager demand for a software which can calibrate the faults in writing of the Chinese characters real time.


Therefore, the object of the present invention is to provides a novel way for finding errors in the components of Chinese characters as a writer writes Chinese character.


SUMMARY OF THE INVENTION

Accordingly, the object of the present invention is to provide a system for determining correction of handwriting Chinese characters, wherein: in the present invention, the text features 1 to 11 of sampled template Chinese characters are calculated and stored in the feature set database. Then the text features of a handwriting Chinese character to be tested is also calculated. Then the two text features are compared, if they are matched, it is considered that the handwriting Chinese character to be tested has a correct handwriting way for the Chinese character. The result is feedback to the user. Therefore, the faults of the writer can be indicated in time as the user writes a Chinese character. Therefore, the present invention is helpful for learning Chinese. A learner can know whether the Chinese character written now is correct or wrong real time. As a result, learning efficiency is promoted quickly.


To achieve above object, the present invention provides a A system for determining correction of handwriting Chinese characters, including: a Chinese character collector for collecting template Chinese characters which is inputted by handwriting; the components of the template Chinese characters are of correct component structures; a feature classifier connected to the pre-processor for automatically classifying of features of the Chinese characters; that is, to obtain a rectangle frame of each component of a Chinese character and to calculate a mass center of the rectangle frame; then text features of these handwriting Chinese characters are acquired by a program; text features of different handwriting Chinese characters expressing same Chinese character are compared; if for the same Chinese character, the handwriting Chinese characters have same text feature, then this text feature is marked as a necessary text feature of the Chinese character, if not, this text feature is not regarded as a necessary text feature which is neglected; the results from the comparison are stored as a template of the text feature of the Chinese character; a tested handwriting Chinese character collector connected to the feature classifier for collecting handwriting Chinese characters to be tested; the exact external rectangles and mass centers of these handwriting Chinese characters to be tested being calculated, which are inputted to the feature classifier and the text features for these handwriting Chinese characters to be tested are calculated; a feature comparator connected to the feature classifier and the feature set database; the feature comparator acquiring text features of the handwriting Chinese character from the feature classifier; then the feature comparator comparing the text features of a handwriting Chinese character to be tested with the features set of the sampled template Chinese character originally stored in the feature set database are compared; if they are matched completely, it is said that the handwriting Chinese character to be tested is correct, and the result is outputted.





BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 shows the structure of the present invention.



FIG. 2 shows an operation flow of the present invention.



FIG. 3 shows another embodiment of the present invention.





DETAILED DESCRIPTION OF THE INVENTION

In order that those skilled in the art can further understand the present invention, a description will be provided in the following in details. However, these descriptions and the appended drawings are only used to cause those skilled in the art to understand the objects, features, and characteristics of the present invention, but not to be used to confine the scope and spirit of the present invention defined in the appended claims.


Referring to FIGS. 1 and 2, the system of the present invention is illustrated. The present invention relates to the determination of corrections of the components (radicals) of a handwriting Chinese character. In that the components (radicals) of a Chinese character mean basic construction structures which form a Chinese character, for example the Chinese character custom-character containing the components of custom-character and custom-character, or the Chinese character custom-character contains the component of custom-character and custom-character which are basic construction units of a Chinese character.


The present invention includes the following components.


A Chinese character collector 10 serves for collecting template Chinese characters which is inputted by handwriting. The components of the template Chinese characters are of correct component structures. Data enhancing methods are used to cause the template Chinese characters to be extended to various different forms (this is known in the prior art, and thus the details will not be further described herein) (step 210). The Chinese character collector 10 is, for instance, a handwriting input device of a tablet computer. In the present invention, a template Chinese character is detached into different strokes. Each stroke is formed by a plurality of sampling points.


In the present invention, the template Chinese character means a correct Chinese character with correct components and a correct arrangement of these components. The template Chinese character is rendered to have different forms (this is known in the prior art and the details will not be further described herein). A trainer inputs handwriting Chinese characters in a handwriting device, and the system collects these handwriting Chinese characters for standardization and interpolation (these are known in the prior art, and thus the details will not be further described).


A pre-processor 20 is connected to the Chinese character collector 10 for collecting pre-processing collected template Chinese characters. In the present invention, the pre-processing includes the processes of data enhancement, generating a plurality of template Chinese characters based on the collected Chinese characters (this is known in the prior art). The data pre-processing includes standardization, interpolation, etc. of the handwriting Chinese characters (step 220).


A feature classifier 30 is connected to the pre-processor 20 for automatically classifying of features of the Chinese characters. That is, to obtain a rectangle frame of each component of a Chinese character and to calculate a mass center of the rectangle frame (step 230). Then text features of these handwriting Chinese characters are acquired by a program (step 240). Text features (will be defined in the following) of different handwriting Chinese characters expressing same Chinese character are compared. If for the same Chinese character, the handwriting Chinese characters have same text features, then this text feature is marked as a necessary text feature of the Chinese character, if not, this text feature is not regarded as a necessary text feature which is neglected. The results from the comparison are stored as a template of the text feature of the Chinese character.


The feature classification means to analyze one Chinese character to get the text feature of this Chinese character, some of which is necessary and others are unnecessary. The necessary text feature are captured and unnecessary text feature is deserted.


Calculation and selections of text feature of components of Chinese characters are described hereinafter.


Calculation of an Exact External Rectangle.
(1) Calculating an Exact External Rectangle of a Whole Chinese Character.

A Chinese character (including printed or handwriting Chinese characters) has n strokes. Numbers of sampling points of different strokes are not identical. Each Chinese character is expressed by the following sampling points:






P
=

{



line
1

[

(



p
1

(


x
0

,

y
0


)

,

(



p
1

(


x
1

,

y
1


)







]

,










line
2

[

(



p
2

(


x
0

,

y
0


)

,

(



p
2

(


x
1

,

y
1


)







]

,













line
n

[

(



p
n

(


x
0

,

y
0


)

,

(



p
n

(


x
1

,

y
1


)







]

}




Where P expresses the Chinese character, linej expresses the jth stroke of the Chinese character P, pi expresses coordinates of pi in the stroke is xk and yk.


The exact external rectangle box of the Chinese character means a minimum rectangle which can enclose the Chinese character. At first, the linej (Xmin, Xmax, Ymin, Ymax) of each stroke is calculated, and then the extreme values Box (Xmin, Xmax, Ymin, Ymax) at four sides of the exact external rectangle of each the stroke of the Chinese character is calculated, that is:







Box

X


_

max



=

Max

(



line
1



X
max


,


line
2



X
max






line

n



X
max



)








Box

X


_

min



=

Min

(



line
1



X
min


,


line
2



X
min






line

n



X
min



)








Box

Y


_

max



=

Max

(



line
1



Y
max


,


line
2



Y
max






line

n



Y
max



)








Box

Y


_

min



=

Min

(



line
1



Y
min


,


line
2



Y
min






line

n



Y
min



)





Max means maximum value. The exact external rectangle 60 includes the four extreme values Boxx_max, Boxx_min, BoxY-max, and BoxY_min at four sides of the exact external rectangle, as shown in FIG. 3.


(2) Calculating an Exact External Rectangle of a Component of a Chinese Character.

For instance, a Chinese character custom-character is formed by two components custom-character and custom-character, and thus the exact external rectangle for the custom-character and custom-character are calculated individually.


Firstly, the exact external rectangle for custom-character is calculated as following. The extreme values at four sides of the exact external rectangle of the component custom-character is calculated, that is:







Box


X


_

max



=

Max

(



line
1



X
max


,


line
2



X
max






line

4



X
max



)








Box


X


_

min



=

Min

(



line
1



X
min


,


line
2



X
min






line

4



X
min



)








Box


Y


_

max



=

Max

(



line
1



Y
max


,


line
2



Y
max






line

4



Y
max



)








Box


Y


_

min



=

Min

(



line
1



Y
min


,


line
2



Y
min






line

4



Y
min



)





Max means maximum value. The exact external rectangle 61 includes the four extreme values Box custom-character x_max, Box custom-character x_min, Box custom-character Y_max and Box custom-character Y_min at four sides of the exact external rectangle, as shown in FIG. 3.


Secondly, the exact external rectangle for custom-character is calculated as following. The extreme values at four sides of the exact external rectangle of the component custom-character is calculated, that is:







Box


X


_

max



=

Max

(



line
5



X
max


,


line
6



X
max






line

8



X
max



)








Box


X


_

min



=

Min

(



line
5



X
min


,


line
6



X
min






line

8



X
min



)








Box


Y


_

max



=

Max

(



line
5



Y
max


,


line
6



Y
max






line

8



Y
max



)








Box


Y


_

min



=

Min

(



line
5



Y
min


,


line
6



Y
min






line

8



Y
min



)





Max means maximum value. The exact external rectangle 61 includes the four extreme values Box custom-character x_max custom-character Box custom-character x_min custom-character Box custom-character Y_max custom-character Box custom-character Y_minat four sides of the exact external rectangle, as shown in FIG. 3


(B) Calculation of a Mass Center

In the present invention, the mass centers of Chinese characters, components, and strokes are calculated. Firstly, we desire to cause that every stroke has identical density for the sampling points per unit length.


This is because the writing speed of each stroke is not identical so that the density of the sampling points for the unit length is not identical.


The length of each stroke is:







d
n

=




i
=
1

n





(


x
1

-

x

i
-
1



)

2

+


(


y
i

-

y

i
-
1



)

2








Where dn is a sum of the distances from points (x1, y1) to points (xn, yn).


Then the number of sampling points in the stroke is:







N
density

=

[



2


d

n
-
1



+
density


2

density


]






Then





α
=

{






d

i
+
1


-


i
*

d

n
-
1




n
*

(


d

i
+
1


-

d
i


)




,






N
density

*

(

i
+
1

)





i
*
n

-
1







1
,






N
density

*

(

i
+
1

)


<


i
*
n

-
1












{




x
j




=



x
i

*
α

+


x

i
+
1


*

(

1
-
α

)









y
j




=



y
i

*
α

+


y

i
+
1


*

(

1
-
α

)











After above calculation, the stroke could be expressed as:







line
=


p
0

(


x
0

,

y
0


)


,


p
1

(


x
1

,

y
1


)

,


,


p

N
density


(


x

N
density


,

y

N
density



)





Then the mass center M of the stroke is as following:







M
x

=




j
=
1

n


x
j









M
y

=




j
=
1

n


y
j






Then the text feature of the present invention is calculated as following:


(3) Derivation of Text Feature:

In the present invention, the text features of Chinese characters (including template Chinese character and handwriting Chinese character) is acquired as the following way. In the following division of a (pronounced as tin) means to divide an exact external rectangle into four equal lattices which is like the custom-character structure.


Text feature 1: for one component of a Chinese character, an exact external rectangle thereof is equally divided into four equal lattices like a shape of custom-character. For each lattice, if the Chinese character is occupied in that lattices, the lattice is applied with a value of 1, while if not occupied in that lattice, the lattice is applied with a value of 0.


Text feature 2: Based on the division shown in text feature 1, a mass center of an exact external rectangle of a component of a Chinese character is acquired, if the mass center is occupied in a specific one of the four lattice, the lattice is given a value 1, otherwise, the lattice is given a value of 0.


Text feature: 3: For four lattices of a custom-character division of an exact external rectangle of a component of a Chinese character, for a lattice which is occupied by a mass center of the component of the Chinese character, the lattice is given a value of 1, and otherwise, a value of 0 is given.


Text feature 4: For four lattices of a custom-character division of an exact external rectangle of a component of a Chinese character, for every stroke of the component, for the lattices which are occupied by the stroke of the component, the lattices are given a value of 1, otherwise, a value of 0 is given.


Text feature 5, If an exact external rectangle of a component of a Chinese character is in contact with a boundary of the exact external rectangle of the Chinese character, then it is given a value of 1, otherwise a value of 0 is given.


Text feature 6: A vector formed between a mass center of a component of a Chinese character and another mass center of another component of the Chinese character is positioned in a center of a coordinate, then the coordinate is divided into four quadrants (which divides a coordinate into four parts by two vertical axis), or is divided into eight quadrants which divides a coordinate into eight parts by four axis, the angle between two adjacent axis is 45 degrees). For all the quadrants of the coordinate, if the vector is laid in one quadrant, than the quadrant is given with a value of 1, otherwise given a value of 0.


Text feature 7: Whether the exact external rectangles of each two components of a Chinese character is overlapped, if yes, a value of 1 is given, otherwise a value of 0 is given.


Text feature 8: Two exact external rectangles of two components of a Chinese character are arranged to be contacted with the positive x axis and the positive y axis and then an overlapping rectangle is formed by overlapping of the two exact external rectangles, whether a height of this overlapping rectangle is higher than ⅔ of a height of one exact external rectangle with larger height? And a width of this overlapping rectangle is wider than ⅔ of a width of one exact external rectangle with large width? If both are existed, than a value of 1 is given, otherwise a value of zero is given.


Text feature 9: Two exact external rectangles of two components of a Chinese character are arranged to be contacted with the positive x axis and the positive y axis and then an overlapping rectangle is formed by overlapping of the two exact external rectangles. Whether an area of the overlapping exact external rectangular is larger than ⅔ of a small one of the two exact external rectangles, if yes, a value of 1 is given, otherwise, a value of 0 is given. Whether an area of the overlapping exact external rectangular is larger than ⅓ of a large one of the two exact external rectangles, if yes, a value of 1 is given, otherwise, a value of 0 is given.


Text feature 10: A ratio of a height of an exact external rectangle of a component of a Chinese character with respect to a height of an exact external rectangle of another component of the Chinese character is greater than 3 or smaller than ⅓, if yes, a value of 1 is given, otherwise, a value of 0 is given.


Text feature 11: an exact external rectangle of a component of a Chinese character is divided into 9 rectangles of equal area, for the rectangles at left upper side, middle, and right lower side, whether these rectangles exist other components of the Chinese character, if yes, a value of 1 is given, otherwise, a value of 0 is given.


In the present invention, for a specific Chinese character, a plurality of template Chinese characters (for instance, 20) for this specific Chinese character are generated, that is, various handwriting traces of Chinese characters used as samples are generated. The exact external rectangle and mass of the template Chinese character and components of these template Chinese characters are calculated in advance. Then above 11 text features are calculated for these template Chinese characters. If for a text feature, if all template Chinese characters have the same values, it is considered that this Chinese character own this feature. About 11 text features are calculated for these template Chinese characters. The text features owned by these template Chinese characters are formed as a feature set of these template Chinese characters (step 250). All the feature sets of various sampled Chinese characters are stored in a feature set database 35 (step 260).


A tested handwriting Chinese character collector 40 is connected to the feature classifier 30 for collecting handwriting Chinese characters to be tested (step 310). The exact external rectangles and mass centers of these handwriting Chinese characters to be tested are calculated (step 320), which are inputted to the feature classifier 30 and the text features 1 to 11 above said for these handwriting Chinese characters to be tested are calculated.


A feature comparator 50 is connected to the feature classifier 30 and the feature set database 35. The feature comparator 50 acquires text features 1 to 11 of the handwriting Chinese character from the feature classifier 30. Then the feature comparator 50 compares the text features of a handwriting Chinese character to be tested with the features set of the sampled template Chinese character originally stored in the feature set database 35 are compared. If they are matched completely, it is said that the handwriting Chinese character to be tested is correct (step 400), and the result is outputted (step 410).


Advantages of the present invention are that: in the present invention, the text features 1 to 11 of sampled template Chinese characters are calculated and stored in the feature set database. Then the text features of a handwriting Chinese character to be tested is also calculated. Then the two text features are compared, if they are matched, it is considered that the handwriting Chinese character to be tested has a correct handwriting way for the Chinese character. The result is feedback to the user. Therefore, the faults of the writer can be indicated in time as the user writes a Chinese character. Therefore, the present invention is helpful for learning Chinese. A learner can know whether the Chinese character written now is correct or wrong real time. As a result, learning efficiency is promoted quickly.


The present invention is thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the present invention, and all such modifications as would be obvious to one skilled in the art are intended to be included within the scope of the following claims.

Claims
  • 1. A system for determining correction of handwriting Chinese characters, including: a Chinese character collector for collecting template Chinese characters which is inputted by handwriting; the components of the template Chinese characters are of correct component structures;a feature classifier connected to the pre-processor for automatically classifying of features of the Chinese characters; that is, to obtain a rectangle frame of each component of a Chinese character and to calculate a mass center of the rectangle frame; then text features of these handwriting Chinese characters are acquired by a program; text features of different handwriting Chinese characters expressing same Chinese character are compared; if for the same Chinese character, the handwriting Chinese characters have same text feature, then this text feature is marked as a necessary text feature of the Chinese character, if not, this text feature is not regarded as a necessary text feature which is neglected; the results from the comparison are stored as a template of the text feature of the Chinese character;a tested handwriting Chinese character collector connected to the feature classifier for collecting handwriting Chinese characters to be tested; the exact external rectangles and mass centers of these handwriting Chinese characters to be tested being calculated, which are inputted to the feature classifier and the text features for these handwriting Chinese characters to be tested are calculated;a feature comparator connected to the feature classifier and the feature set database; the feature comparator acquiring text features of the handwriting Chinese character from the feature classifier; then the feature comparator comparing the text features of a handwriting Chinese character to be tested with the features set of the sampled template Chinese character originally stored in the feature set database are compared; if they are matched completely, it is said that the handwriting Chinese character to be tested is correct, and the result is outputted.
  • 2. The system for determining correction of handwriting Chinese characters, as claimed in claim 1, wherein a pre-processor is connected to the Chinese character collector for collecting pre-processing collected template Chinese characters, wherein the pre-processing includes processes of data enhancement, generating a plurality of template Chinese characters based on the collected Chinese characters; standardization and interpolation. of the handwriting Chinese characters.
  • 3. The system for determining correction of handwriting Chinese characters as claimed in claim 1, wherein feature classifier analyzes one Chinese character to get the text features of this Chinese character, some of the text features are necessary and others are unnecessary; necessary text features are captured and unnecessary text features are deserted.
  • 4. The system for determining correction of handwriting Chinese characters as claimed in claim 1, wherein calculation of an exact external rectangle includes calculation of a whole Chinese character and components of the Chinese character.
  • 5. The system for determining correction of handwriting Chinese characters as claimed in claim 1, wherein mass centers of Chinese characters, components, and strokes are calculated.
  • 6. The system for determining correction of handwriting Chinese characters as claimed in claim 1, wherein the feature classifier causes every stroke to have identical density for the sampling points per unit length; in that the length of each stroke is:
  • 7. The system for determining correction of handwriting Chinese characters as claimed in claim 1, wherein then the text feature is calculated as following: text feature 1: for one component of a Chinese character, an exact external rectangle thereof is equally divided into four equal lattices like a shape of m; for each lattice, if the Chinese character is occupied in that lattices, the lattice is applied with a value of 1, while if not occupied in that lattice, the lattice is applied with a value of 0;text feature 2: based on the division shown in text feature 1, a mass center of an exact external rectangle of a component of a Chinese character is acquired, if the mass center is occupied in a specific one of the four lattice, the lattice is given a value 1, otherwise, the lattice is given a value of 0;text feature 3: for four lattices of a division of an exact external rectangle of a component of a Chinese character, for a lattice which is occupied by a mass center of the component of the Chinese character, the lattice is given a value of 1, and otherwise, a value of 0 is given;text feature 4: for four lattices of a division of an exact external rectangle of a component of a Chinese character, for every stroke of the component, for the lattices which are occupied by the stroke of the component, the lattices are given a value of 1, otherwise, a value of 0 is given;text feature 5: if an exact external rectangle of a component of a Chinese character is in contact with a boundary of the exact external rectangle of the Chinese character, then it is given a value of 1, otherwise a value of 0 is given;text feature 6: a vector formed between a mass center of a component of a Chinese character and another mass center of another component of the Chinese character is positioned in a center of a coordinate, then the coordinate is divided into four quadrants (which divides a coordinate into four parts by two vertical axis), or is divided into eight quadrants which divides a coordinate into eight parts by four axis, the angle between two adjacent axis is 45 degrees); for all the quadrants of the coordinate, if the vector is laid in one quadrant, than the quadrant is given with a value of 1, otherwise given a value of 0;text feature 7: whether the exact external rectangles of each two components of a Chinese character is overlapped, if yes, a value of 1 is given, otherwise a value of 0 is given;text feature 8: two exact external rectangles of two components of a Chinese character are arranged to be contacted with the positive x axis and the positive y axis and then an overlapping rectangle is formed by overlapping of the two exact external rectangles, whether a height of this overlapping rectangle is higher than ⅔ of a height of one exact external rectangle with larger height? and a width of this overlapping rectangle is wider than ⅔ of a width of one exact external rectangle with large width? if both are existed, than a value of 1 is given, otherwise a value of zero is given;text feature 9: two exact external rectangles of two components of a Chinese character are arranged to be contacted with the positive x axis and the positive y axis and then an overlapping rectangle therebetween is formed by overlapping of the two exact external rectangles; whether an area of the overlapping exact external rectangular is larger than ⅔ of a small one of the two exact external rectangles, if yes, a value of 1 is given, otherwise, a value of 0 is given; whether an area of the overlapping exact external rectangular is larger than ⅓ of a large one of the two exact external rectangles, if yes, a value of 1 is given, otherwise, a value of 0 is given;text feature 10: a ratio of a height of an exact external rectangle of a component of a Chinese character with respect to a height of an exact external rectangle of another component of the Chinese character is greater than 3 or smaller than ⅓, if yes, a value of 1 is given, otherwise, a value of 0 is given; andtext feature 11: an exact external rectangle of a component of a Chinese character is divided into 9 rectangles of equal area, for the rectangles at a left upper side, a middle, and a right lower side, whether these rectangles exist other components of the Chinese character, if yes, a value of 1 is given, otherwise, a value of 0 is given.Wherein for a specific Chinese character, a plurality of template Chinese characters for this specific Chinese character are generated, that is, various handwriting traces of Chinese characters used as samples are generated; the exact external rectangle and mass of the template Chinese character and components of these template Chinese characters are calculated in advance; then above 11 text features are calculated for these template Chinese characters; if for a text feature, if all template Chinese characters have the same values, it is considered that this Chinese character own this feature; about 11 text features are calculated for these template Chinese characters; the text features owned by these template Chinese characters are formed as a feature set of these template Chinese characters; and all the feature sets of various sampled Chinese characters are stored in the feature set database.