CN1238816C - Font recogtnizing method based on single Chinese characters - Google Patents

Font recogtnizing method based on single Chinese characters Download PDF

Info

Publication number
CN1238816C
CN1238816C CN 03119130 CN03119130A CN1238816C CN 1238816 C CN1238816 C CN 1238816C CN 03119130 CN03119130 CN 03119130 CN 03119130 A CN03119130 A CN 03119130A CN 1238816 C CN1238816 C CN 1238816C
Authority
CN
China
Prior art keywords
character
wavelet
sigma
classification
recognition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 03119130
Other languages
Chinese (zh)
Other versions
CN1437162A (en
Inventor
丁晓青
陈力
刘长松
彭良瑞
方驰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN 03119130 priority Critical patent/CN1238816C/en
Publication of CN1437162A publication Critical patent/CN1437162A/en
Application granted granted Critical
Publication of CN1238816C publication Critical patent/CN1238816C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Character Discrimination (AREA)

Abstract

The present invention relates to a letterform recognition method on the basis of single Chinese characters, which belongs to the field of Chinese character letterform recognition. The present invention is characterized in that the method is a letterform recognition method which uses wavelet conversion and has nothing to do with texts. In the method, the convolution processing of discrete information is carried out through a corresponding discrete filter of scale functions and wavelet functions according to a selected layer number J, the J layer wavelet conversion of an original image is carried out, and 3J+1 subimages are obtained; then, the subimages are divided into subblocks, the weight sum of an absolute value of a wavelet coefficient of each subblock is used as a characteristic, and after the shaping processing of the characteristic is carried out, the wavelet characteristic of the original image is obtained; then, a letterform recognition characteristic is extracted from the wavelet characteristic through linear discriminant analysis; finally, the letterform recognition characteristic is exercised and recognized through a secondary classifier of a gauss model. The average recognition rate of the present invention can achieve 97.35%.

Description

Character recognition method based on single Chinese character
Technical field
Character recognition method based on single Chinese character belongs to the Chinese Character Font Recognition technical field.
Background technology
In the automatic processing procedure of document, font information is the important evidence of printed page analysis, understanding and recovery, also helps to realize the high-performance character recognition system.At first, Chinese character recognition system not only wants accurately to discern the character of Chinese character, also want to recover original page format, and the recovery of page format has comprised the recovery of font information.Secondly, because the text of different piece often uses different font (using different fonts as title, summary and text) in the space of a whole page, font information can be used for assisting printed page analysis and understanding.The 3rd, owing to the simplicity of monomer character recognition with respect to the character recognition of many bodies, the monomer character recognition system has higher discrimination and better robustness than the body of manying character recognition system.If can access the font information of Chinese character to be identified, just can discern by enough monomer character recognition systems, obtain the better recognition performance.
The font information of Chinese character to be obtained automatically, the Character Font Recognition technology must be used.Character Font Recognition technology in the current document is applied to alphabetic literals such as English mostly, these technology have been used the more distinctive attributes of alphabetic literal, for example the position of baseline, whether the space length between each letter, the coupling of some language high frequency vocabulary, the methods such as histogram of word length in the serif, same word are arranged.Because the characteristics of these technology and alphabetic literal are in conjunction with tight, and there are not these characteristics in Chinese character, makes these technology can't be applied to the Character Font Recognition of Chinese character.The Character Font Recognition technology that can be applied to Chinese character in the document is considerably less, has the scholar to use Gabor wave filter texture feature extraction, and Chinese character is carried out Character Font Recognition.The character block that the process object of this method is made up of a plurality of Chinese characters can't be discerned the font of single Chinese character.In fact, the Character Font Recognition research of also not carrying out at present at single Chinese character.And in actual applications, have at least two kinds of situations to discern to the font of single Chinese character: the first, in order to emphasize some content, certain the several word in sentence are often represented with different fonts.The second, in some cases, can't obtain more character and be used for forming a character block (for example some has only the title of several words; And in form identification, some table entries usually has only several Chinese characters, even has only a Chinese character).
Character Font Recognition can be divided into two classes: the Character Font Recognition that text is relevant and the Character Font Recognition of text-independent.The Character Font Recognition that text is relevant is meant has known the character information of pending Chinese character when carrying out Character Font Recognition, and has used these information in the Character Font Recognition process.The Character Font Recognition of text-independent is meant when carrying out Character Font Recognition, and does not know the character information of pending Chinese character.For a Chinese character image, font information is embodied on the attribute and the mutual relationship between each stroke of stroke itself.When carrying out the Character Font Recognition of single Chinese character,, just mean and know basic distribution and the mutual relationship which stroke and these strokes are arranged in this Chinese character if know the character of Chinese character; If do not know the character of Chinese character, then to the existence of some stroke in the Chinese character whether and mutual relationship have no priori, in this case, the difficulty of Character Font Recognition is very big.
The present invention has realized under the text-independent situation, to the Character Font Recognition of single Chinese character.The present invention has used wavelet character identification font, processing to as if single Chinese character, these all are unexistent in the present every other document.
Summary of the invention
The present invention can analyze single Chinese character image under the situation of priori in that character is not had, and obtains the font information of this character.We at first utilize wavelet transformation to obtain wavelet character, use linear discriminant analysis (LDA) to extract the Character Font Recognition feature then from wavelet character, and carry out Character Font Recognition with the MQDF sorter.The present invention consists of the following components: wavelet character extracts, eigentransformation, classifier design.
1. wavelet character extracts
During the relevant Character Font Recognition of research text, research object is the identical Chinese character different fonts is represented under, and its difference only is embodied on the font, so extracts the Character Font Recognition aspect ratio and be easier to.But what the present invention considered is the Character Font Recognition of text-independent, and the character priori of Chinese character is not required, and our research object is the different Chinese character under different fonts is represented.In this case, primary difference is the difference between the kinds of characters, and the difference between the font is on the back burner.How to extract the feature that can effectively reflect the font difference in this case, be the basis of Character Font Recognition system.
Wavelet transformation is a kind of transform method of signal Processing, can carry out the local analysis to signal.And wavelet transformation can import multiresolution analysis very naturally.Because wavelet transformation has above characteristics, we carry out wavelet transformation to character picture, extract the Character Font Recognition feature then on changing image.
We begin to introduce wavelet transformation from multiresolution analysis (MRA).In MRA, make { V j, j ∈ Z is L 2(R 2) on sequence of subspaces, and satisfy the condition of MRA, wherein Z is a set of integers.φ () is the unidimensional scale function, definition Φ (x, y) ≡ φ (x) φ (y), then each subspace V jBy orthonormal basis { 2 -jΦ 2j(x-2 -jN, y-2 -jM) }, (n, m) ∈ Z 2Open into, in the formula Φ 2 J ( x , y ) ≡ 2 2 j Φ ( 2 j x , 2 j y ) . Make { O j, j ∈ Z is L 2(R 2) on sequence of subspaces, and satisfy O jBe V jAt V J+1In the orthogonal complement space, i.e. V J+1=V j O jMake () be the one dimension wavelet function of corresponding scaling function φ (), we are defined as follows three functions:
Ψ (1)(x,y)≡φ(x)·(y)
Ψ (2)(x,y)≡(x)·φ(y) (1)
Ψ (3)(x,y)≡(x)·(y)
And definition Ψ 2 J ( i ) ≡ 2 2 j Ψ ( i ) ( 2 j x , 2 j y ) , Subspace O then jOpen by following orthonormal basis:
{ 2 - j Ψ 2 j ( 1 ) ( x - 2 - j n , y - 2 - j m ) , 2 - j Ψ 2 j ( 2 ) ( x - 2 - j n , y - 2 - j m ) ,
2 - j Ψ 2 j ( 3 ) ( x - 2 - j n , y - 2 - j m ) } , ( n , m ) ∈ Z 2
To two dimensional image f (m x, n y) when carrying out MRA, in resolution 2 jUnder (j≤0), image is projected to SPACE V jAnd O jIn, at this moment image f is broken down into following four number of sub images:
A 2 j f = { < f ( x , y ) , &phi; 2 j ( x - 2 - j n ) &phi; 2 j ( y - 2 - j m ) > }
Figure C0311913000072
In the following formula, n and m are integer,<, the computing of expression scalar product, &phi; 2 j ( x ) &equiv; 2 j &phi; ( 2 j x ) ,
Figure C0311913000076
If write as the convolution form, these four images are:
A 2 j f = ( ( f ( x , y ) * &phi; 2 j ( - x ) &phi; 2 j ( - y ) ) ( 2 - j n , 2 - j m ) ) ( n , m ) &Element; Z 2
Figure C0311913000078
Figure C03119130000710
Scaling function φ () can regard a low-pass filter as, and wavelet function () can regard Hi-pass filter, then an A as 2jF is in resolution 2 to image f jAn estimation under (j≤0), D 2j (1)F, D 2j(2) f and D 2j (3)F is that image f is in resolution 2 jDetails under (j≤0).
Because the image of actual treatment is not an ideal image, its resolution is limited, and we regard real image as ideal image (infinite resolution is arranged) in resolution 2 0Under estimation, promptly original image is considered as A 20F.If the size of original image is N * N, then in resolution 2 j(j≤0) size of each subimage down is 2 jN * 2 jN.
When image is analyzed, at first at highest resolution 2 0Down image is decomposed, obtain 2 -14 number of sub images A under the resolution 2-1F, D 2-1 (1)F, D 2-1 (2)F and D 2-1 (3)F (decomposition result is shown in Fig. 4 a, and the computation process of decomposition is referring to " embodiment " part of back).Further decompose subimage A then 2-1F obtains 2 -24 number of sub images under the resolution (shown in Fig. 4 b), we can continue to decompose A 2-2F and this process of continuing.By above decomposition method, for any positive integer J, original image is represented by following 3J+1 number of sub images:
A 2 - J f , ( D 2 j ( 1 ) f ) - J &le; j &le; - 1 , ( D 2 j ( 2 ) f ) - J &le; j &le; - 1 , ( D 2 j ( 3 ) f ) - J &le; j &le; - 1 - - - ( 4 )
The wavelet transformation of following formula two dimensional image (also claiming wavelet decomposition).By choosing different scaling functions and wavelet function, just can realize different wavelet transformations.From the explanation of front (also can with reference to figure 4) as can be seen, if original image (is A 20F) size is N * N, then A 2-JThe size of f is 2 -JN * 2 -JN, D 2j (1)F, D 2j (2)F and D 2j (3)The size of f respectively is 2 jN * 2 jN ,-J≤j≤-1.
In the present invention, we are the input character image normalization 48*48 size at first.Then normalized image is carried out wavelet transformation.We select the Spline2 small echo (to it is to be noted that the technology of the present invention is not limited to the Spline2 small echo.On most of small echos, the technology of the present invention can both achieve satisfactory results.Here selecting the Spline2 small echo, is for taking all factors into consideration speed and recognition performance.The scaling function and the wavelet function of Spline2 small echo are seen Fig. 5), carry out three layers of wavelet transformation (being the J=3 in the formula (4)), obtain 10 number of sub images A 2-3F, D 2-1 (1)F, D 2-1 (2)F, D 2-1 (3)F, D 2-2 (1)F, D 2-2 (2)F, D 2-2 (3)F, D 2-3 (1)F, D 2-3 (2)F, D 2-3 (3)F.We extract the wavelet feature from this ten number of sub images.D 2-1 (1)F, D 2-1 (2)F and D 2-1 (3)This three number of sub images of f is the 24*24 size, and we are divided into 6*6 sub-piece to each subimage, and the weighted sum of adding up each sub-piece neutron deficiency coefficient absolute value obtains 36 dimensional features, and three number of sub images obtain 108 dimensional features altogether.D 2-2 (1)F, D 2-2 (2)F and D 2-2 (3)F three number of sub images are the 12*12 size, and we are divided into 4*4 sub-piece to each subimage, and the weighted sum of adding up each sub-piece neutron deficiency coefficient absolute value obtains 16 dimensional features, and three number of sub images obtain 48 dimensional features altogether.A 2-3F, D 2-3 (1)F, D 2-3 (2)F and D 2-3 (3)F four number of sub images are the 6*6 size, and we directly use the absolute value of wavelet coefficient as feature, and each subimage obtains 36 dimensional features, and four number of sub images are totally 144 dimensional features.Comprehensive above three Partial Feature, we obtain the 108+48+144=300 dimensional feature.Because follow-up eigentransformation and MQDF sorter are all based on Gaussian distribution, the feature of extraction is more near Gaussian distribution, and model error is just more little, and system performance is just high more.For improving characteristic distribution, make it more near Gaussian distribution, we carry out shaping with Box-Cox transfer pair feature, and formula is as follows:
In the following formula, α is the parameter of Box-Cox conversion, and value 0.7 among the present invention.Every dimensional feature is all carried out with up conversion, just obtain the initial wavelet character of 300 dimensions.
2. eigentransformation
Though the initial wavelet character that extracts previously can reflect the difference between different fonts, also comprise information a lot of and that Character Font Recognition is irrelevant.These information can be disturbed the result of Character Font Recognition, reduce the performance of Character Font Recognition, therefore need carry out eigentransformation, remove this part information as far as possible.We use linear discriminant analysis technology (LDA) to carry out eigentransformation, and purpose is that primitive character is carried out conversion, effectively extract the best information of Character Font Recognition, remove as far as possible simultaneously and the irrelevant information of Character Font Recognition, improve the distribution of feature simultaneously.
If { { V i (k), 1≤i≤N k, 1≤k≤C} is the set of wavelet character vector, V in the formula i (k)Expression belongs to the initial wavelet character vector of i sample extraction of known k classification, N kThe number of samples of representing k classification, C are represented the classification number.Calculate the average of each classification and the average of all categories with following formula:
&mu; k = 1 N k &Sigma; i = 1 N k V i ( k ) - - - ( 5 )
&mu; = 1 C &Sigma; k = 1 C &mu; k - - - ( 6 )
Divergence matrix S in the compute classes then wWith the between class scatter matrix S b:
S w = 1 C &Sigma; k = 1 C ( 1 N k &Sigma; i = 1 N k ( V i ( k ) - &mu; k ) ( V i ( k ) - &mu; k ) T ) - - - ( 7 )
S b = 1 C &Sigma; k = 1 C ( &mu; k - &mu; ) ( &mu; k - &mu; ) T
We choose | (S b+ S w)/S w| as optimizing criterion, promptly ask for linear transformation W, make Maximum.Transformation matrix W is that n * m ties up matrix, and n is the primitive character dimension, and m is the intrinsic dimensionality after the conversion.
We are to matrix S w -1(S b+ S w) carry out eigenwert and proper vector decomposition, obtain eigenwert { γ i, i=1,2 ..., n} (eigenwert big or small descending sort according to value) and proper vector { ξ i, i=1,2 ..., n}.Form matrix W=[ξ with preceding m proper vector 1, ξ 2.., ξ m], then W meets the matrix of a linear transformation that requires previously.The formula of feature selecting is as follows:
Y=W T·V (8)
In the following formula, V is initial wavelet character vector, and Y is through the proper vector after the conversion.
3. classifier design
The present invention has used the modified quadratic classifier MQDF at Gauss model.Here introduce standard quadratic classifier QDF earlier, the decision function of QDF is:
g k ( Y ) = &Sigma; i = 1 m ( ( Y - &mu; k ) T &zeta; i ( k ) ) 2 &lambda; i ( k ) + &Sigma; i = 1 m log &lambda; i ( k ) - - - ( 9 )
In the following formula, Y is the proper vector of input, and m is an intrinsic dimensionality, μ kRepresent the mean vector of k classification, ζ i (k)Be i proper vector of the covariance matrix of k classification, λ i (k)Be i eigenwert of the covariance matrix of k classification.When input Y is discerned, classify with following criterion:
Y is classified as p classification, if g p ( Y ) = min 1 &le; k &le; C g k ( Y ) . (C is the classification number in the formula)
In actual applications, since inaccurate to the estimation of the little eigenwert of eigenwert numerical value, cause the performance of QDF to descend.Estimate inaccurate adverse effect to classification performance for reducing little eigenwert, we use improved quadratic classifier MQDF.MQDF replaces with pre-determined constant too small eigenwert, and its discriminant function is as follows:
g k ( Y ) = &Sigma; i = 1 l ( ( Y - &mu; k ) T &zeta; i ( k ) ) 2 &lambda; i ( k ) + &Sigma; i = l + 1 m ( ( Y - &mu; k ) T &zeta; i ( k ) ) 2 &lambda; + &Sigma; i = 1 l log &lambda; i ( k ) + &Sigma; i = l + 1 m log &lambda; - - - ( 10 )
In the following formula, Y, m, μ j, ζ i (k), λ i (k)Identical with the implication in the formula (9), l is the positive integer less than m, and λ is a constant.L and λ are empirical parameter, are determined by experiment.At a minute time-like, input Y is divided into and makes formula (10) get the classification of minimum value.
The invention is characterized in:
At first, it is a kind of character recognition method of single Chinese character of the text-independent that utilizes wavelet character.It contains following steps successively:
(1) extracts wavelet character with small wave converting method.
(1.1) according to selected J (number of plies), with the discrete filter of corresponding scaling function and wavelet function correspondence to original image A 20F is f (m x, n y) (back is represented with f), carry out J layer wavelet transformation, obtain the 3J+1 number of sub images, be expressed as follows:
A 2 - J f , ( D 2 j ( 1 ) f ) - J &le; j &le; - 1 , ( D 2 j ( 2 ) f ) - J &le; j &le; - 1 , ( D 2 j ( 3 ) f ) - J &le; j &le; - 1
If original image A 20The size of f is N * N, then A 2-JThe size of f is 2 -JN * 2 -JN, D 2j (1)F, D 2j (2)F and D 2j (3)The size of f respectively is 2 jN * 2 jN ,-J≤j≤-1.
(1.2) from the 3J+1 number of sub images, extract the wavelet feature:
Begin to end to j=-J from j=-1, by layer each subimage is divided into the sub-piece of some, the weighted sum of adding up each sub-piece neutron deficiency coefficient absolute value obtains one-dimensional characteristic that should sub-piece.The feature that all sub-piece of each layer are tried to achieve makes up, and obtains original image f (x, total wavelet feature y).
(1.3) repair with Box-Cox transfer pair feature, make it near Gaussian distribution:
y = x &alpha; - 1 &alpha; , if&alpha; &NotEqual; 0 ln ( x ) , if&alpha; = 0
α is the parameter of Box-Cox conversion, establishes α=0.7, and every dimensional feature is all carried out obtaining initial wavelet character with up conversion.
(2) eigentransformation.Extract the Character Font Recognition feature with linear discriminant analysis LDA from initial wavelet character, to improve characteristic distribution, improve recognition performance, it contains following steps successively:
(2.1) calculate the average μ of each classification with following formula kAnd the average μ of all categories:
&mu; k = 1 N k &Sigma; i = 1 N k V i ( k ) , &mu; = 1 C &Sigma; k = 1 C &mu; k
Wherein, V i (k)Be the initial wavelet character vector of i sample extraction belonging to k classification, N kThe number of samples of representing k classification, C are represented the classification number.
(2.2) with divergence matrix S in the following formula compute classes wWith the between class scatter matrix S b:
S w = 1 C &Sigma; k = 1 C ( 1 N k &Sigma; i = 1 N k ( V i ( k ) - &mu; k ) ( V i ( k ) - &mu; k ) T )
S b = 1 C &Sigma; k = 1 C ( &mu; k - &mu; ) ( &mu; k - &mu; ) T
(2.3) to matrix S w -1(S b+ S w) carry out eigenwert and proper vector decomposition, obtain the eigenwert { γ of big or small descending sort according to value i, i=1,2 ..., n} and proper vector { ξ i, i=1,2 ..., n}.
(2.4) form matrix of a linear transformation W=[ξ with preceding m proper vector 1, ξ 2..., ξ m]
(2.5) obtain proper vector after conversion, represent with Y:
Y=W T·V
Wherein V is initial wavelet character vector.
(3) carry out Character Font Recognition with improving second order sorter MQDF.
(3.1) training process:
(3.1.1) at first extract initial wavelet character, obtain the m dimensional feature through after the conversion.To each classification k, add up its average μ with following formula k' and the covariance matrix ∑ k:
&mu; k &prime; = 1 N k &Sigma; i = 1 N k Y i ( k )
&Sigma; w = 1 N k &Sigma; k = 1 N k ( Y i ( k ) - &mu; k &prime; ) &CenterDot; ( Y i ( k ) - &mu; k &prime; ) T
Wherein, Y i (k)Be the proper vector of wavelet character vector after the LDA conversion of i sample extraction belonging to k classification of known class, N kThe number of samples of representing k classification.
(3.1.2) to the covariance matrix ∑ of each classification kCarry out eigenwert and proper vector and decompose, obtain the eigenwert { λ of big or small descending sort according to value i (k), i=1,2 ..., m} and proper vector { ζ i (k), i=1,2 ..., m}
(3.1.3) substitution value of C-l eigenwert of eigenwert numerical value minimum in the calculating descending sort:
&lambda; = 1 C &Sigma; k = 1 C &lambda; l + 1 ( k )
Wherein, l is the positive integer less than m, is determined by experiment.In this patent, the m value is 256.
(3.1.4) the λ that obtains previously, μ k', k=1,2 ..., C, ζ i (k), k=1,2 ..., C, i=1,2 ..., m, λ i (k), k=1,2 ..., C, i=1,2 ..., l stores in the identification library file, uses for follow-up identification.
(3.2) identifying:
(3.2.1) calculate the decision function g of each classification with following formula k(Y):
g k ( Y ) = &Sigma; i = 1 l ( ( Y - &mu; k &prime; ) T &zeta; i ( k ) ) 2 &lambda; i ( k ) + &Sigma; i = l + 1 m ( ( Y - &mu; k &prime; ) T &zeta; i ( k ) ) 2 &lambda; + &Sigma; i = 1 l log &lambda; i ( k ) + &Sigma; i = l + 1 m log &lambda;
Wherein, l is the positive integer less than m, and λ is a constant.L is determined by experiment, value 224.The see before eigentransformation of face of the see before training process of face of the calculating of λ, the calculating of Y.
(3.2.2) Shu Ru image is divided into and makes g k(Y) get the classification of minimum value.
In in the foregoing step (1) (1.1) step, it contains following steps successively:
(1.1.1) use the discrete filter H that obtains according to scaling function in the horizontal direction respectively and the discrete filter G that obtains according to wavelet function to original image A 20F carries out convolution, and filtering image is carried out subsampling in the horizontal direction handle, and promptly per two samples only keep one, obtain two number of sub images; Again this two number of sub images is carried out convolution with discrete filter H and G respectively in vertical direction, and make subsampling in a manner described and handle, obtain four number of sub images, i.e. A 2-1F, D 2-1 (1)F, D 2-1 (2)F, D 2-1 (3)F.
(1.1.2) again to image A 2-1F (1.1.1) set by step decomposes, and obtains A 2-2F, D 2-2 (1)F, D 2-2 (2)F, D 2-2 (3)F.
(1.1.3) according to above step, be performed until selected level J, obtain A 2-JF, D 2j (1)F, D 2j (2)F, D 2j (3)F.The small echo that we use is the Spline2 small echo, and it according to the discrete filter H that scaling function obtains is
Figure C0311913000123
Figure C0311913000131
The discrete filter G that obtains according to wavelet function is
Experimental results show that average recognition rate of the present invention is 97.35%, is very gratifying.
Description of drawings
The training process of Fig. 1 Character Font Recognition system.
The identifying of Fig. 2 Character Font Recognition system.
One deck wavelet decomposition of Fig. 3 image, among the figure, G/H represents to carry out convolution with G/H in level or vertical direction, and 2 ↓ 1 are illustrated in level or vertical direction is carried out subsampling, and promptly per two samples keep a sample.
The wavelet decomposition example of Fig. 4 two dimensional image, (a) A 20The one-level of f is decomposed, (b) A 20The secondary of f decomposes.
The scaling function and the wavelet function of Fig. 5 Spline2 small echo, (a) scaling function, (b) wavelet function.
The process flow diagram that the initial wavelet character of Fig. 6 extracts.
Fig. 7 asks for the process flow diagram of transformation matrix W.
The image of Fig. 8 character " " and the image behind the wavelet transformation.
The wavelet image synoptic diagram of Fig. 9 character " ".
Embodiment
When realizing the Character Font Recognition system of Chinese word character character, at first obtain discerning the storehouse, just can discern the font of single Chinese character then according to the identification storehouse by training.The training process of system as shown in Figure 1, identifying is as shown in Figure 2.
The input of system is the single Chinese character image that is normalized to 48*48.The cutting of Chinese character image and normalization part do not comprise in the present invention, are not elaborated.
Below the detailed various piece of introducing system:
1. wavelet character extracts
We at first carry out wavelet transformation to character picture, extract wavelet character then on the image after the conversion.In front in the introduction of summary of the invention, we by the agency of wavelet transformation.The wavelet transformation of two dimensional image can be used formula (3) expression.We use the wavelet transformation of fast wavelet transform calculating character image, and concrete steps are as follows:
1) at first, obtains discrete filter H, obtain discrete filter G according to wavelet function () according to scaling function φ ().The present invention uses the Spline2 small echo (to it is to be noted that the technology of the present invention is not limited to the Spline2 small echo.On most of small echos, the technology of the present invention can both achieve satisfactory results.Here selecting the Spline2 small echo, is for taking all factors into consideration speed and recognition performance), corresponding H is G is
Figure C0311913000134
We regard the original character image of input as A 20F.
2) as shown in Figure 3, use filters H and G in the horizontal direction respectively to image A 20F carries out convolution, and filtering image is carried out subsampling in the horizontal direction handle (per two samples only keep one), obtains two number of sub images.Again this two number of sub images is carried out convolution with filters H and G respectively in vertical direction, and four filtering images are carried out subsampling in vertical direction handle (per two samples only keep one), obtain four number of sub images, i.e. A 2-1F, D 2-1 (1)F, D 2-1 (2)F, D 2-1 (3)F.
3) to image A 2-1F (2) set by step decomposes, and obtains A 2-2F, D 2-2 (1)F, D 2-2 (2)F, D 2-2 (3)F.
4) to image A 2-2F (2) set by step decomposes, and obtains A 2-3F, D 2-3 (1)F, D 2-3 (2)F, D 2-3 (3)F.
By above step, we have obtained the wavelet transformation of input character image.Below we extract wavelet character on the image after the conversion.The original character image is the 48*48 size, the D after the decomposition 2-1 (1)F, D 2-1 (2)F, D 2-1 (3)F is 24*24, D 2-2 (1)F, D 2-2 (2)F, D 2-2 (3)F is 12*12, A 2-3F, D 2-3 (1)F, D 2-3 (2)F, D 2-3 (3)F is the 6*6 size.
For D 2-1 (1)F, D 2-1 (2)F, D 2-1 (3)These three images of f, we are divided into 6*6 sub-piece to each image, and each sub-piece is the 4*4 size, and is more stable for making feature, and we expand to the 6*6 size to each sub-piece, and the center is constant, and the overlapping of two row (or row) pixel is promptly arranged between adjacent sub-blocks.Weighted sum with a sub-piece neutron deficiency coefficient absolute value of following formula statistics obtains one-dimensional characteristic:
z = &Sigma; ( x , y ) &Element; B | f ( x , y ) | &CenterDot; exp ( - 0.15 * ( ( x - x center ) 2 + ( y - y center ) 2 ) ) - - - ( 11 )
In the following formula, B refers to certain height piece zone, x CenterAnd y CenterBe the geometric center coordinate of sub-piece B, (x y) is (x, pixel value y), just wavelet coefficient in the wavelet image to f.During the sub-piece of computed image outermost, the outermost one circle pixel of our expanded images (concrete extended mode: the peripheral circle pixel that increases of image, except that four bights, each increases the value of pixel newly and gets adjacent (these adjacent finger 4 connections, 4 pixels that are each pixel and upper and lower, left and right are adjacent) former pixel value, adjacent (these adjacent finger 8 connections that the pixel value in four bights is got, 8 pixels that are each pixel and upper and lower, left and right, upper left, upper right, lower-left, bottom right are adjacent) former pixel value), all be the 6*6 size to guarantee each sub-piece.Each sub-piece is carried out above calculating, and each image obtains 36 dimensional features, and three images obtain 108 dimensional features altogether.
For D 2-2 (1)F, D 2-2 (2)F, D 2-2 (3)These three images of f, we are divided into 4*4 sub-piece to each image, and each sub-piece is the 3*3 size, and is more stable for making feature, and we expand to the 5*5 size to each sub-piece, and the center is constant, and the overlapping of two row (or row) pixel is promptly arranged between adjacent sub-blocks.Weighted sum with a sub-piece neutron deficiency coefficient absolute value of formula (12) statistics obtains one-dimensional characteristic.For guaranteeing that each sub-piece all is the 5*5 size, we expand original image with the method identical with the front.Through above calculating, each image obtains 16 dimensional features, and three images obtain 48 dimensional features altogether.
z = &Sigma; ( x , y ) &Element; B | f ( x , y ) | &CenterDot; exp ( - 0 . 30 * ( ( x - x center ) 2 + ( y - y center ) 2 ) ) - - - ( 12 )
A 2-3F, D 2-3 (1)F, D 2-3 (2)F and D 2-3 (3)F four number of sub images are the 6*6 size, and we directly use the absolute value of wavelet coefficient as feature, and each subimage obtains 36 dimensional features, and four number of sub images are totally 144 dimensional features.
Comprehensive above three Partial Feature, we obtain the 108+48+144=300 dimensional feature.Because follow-up eigentransformation and MQDF sorter are all based on Gaussian distribution, the feature of extraction is more near Gaussian distribution, and model error is just more little, and system performance is just high more.For improving characteristic distribution, make it more near Gaussian distribution, we carry out shaping with Box-Cox transfer pair feature, and formula is as follows:
y = x &alpha; - 1 &alpha; , if&alpha; &NotEqual; 0 ln ( x ) , if&alpha; = 0 - - - ( 13 )
In the present invention, the value of getting α is 0.7.Process is with up conversion, and the feature that we extract is called initial wavelet character.The process flow diagram of feature extraction is seen Fig. 6.
2. eigentransformation
After obtaining the initial wavelet character of 300 dimensions, need ask for transformation matrix W, initial wavelet character is carried out conversion, obtain final feature.The concrete steps of asking for W are as follows:
1) calculates the average of each classification and the average of all categories with formula (5) and formula (6).
2) with divergence matrix S in formula (7) compute classes wWith the between class scatter matrix S b
3) to matrix S w -1(S b+ S w) carry out eigenwert and proper vector decomposition, obtain eigenwert { γ i, i=1,2 ..., n} (eigenwert big or small descending sort according to value) and proper vector { ξ i, i=1,2 ..., n}.Form matrix W=[ξ with preceding 256 proper vectors 1, ξ 2..., ξ 256], then W is exactly the matrix of a linear transformation that will ask for.
After obtaining transformation matrix W, can ask for final feature with formula (8).Final 256 dimensions that are characterized as.
Ask for the process flow diagram of transformation matrix W and see Fig. 7.
3. training process
Training process as shown in Figure 1.At first extract 300 dimension wavelet characters, obtain 256 dimensional feature vector Y after the conversion.To each classification, add up its average and covariance matrix then with following formula:
&mu; k &prime; = 1 N k &Sigma; i = 1 N k Y i ( k ) - - - ( 14 )
&Sigma; k = 1 N j &Sigma; i = 1 N k ( Y i ( k ) - &mu; k ) &CenterDot; ( Y i ( k ) - &mu; k ) T - - - ( 15 )
In the following formula, Y i (k)The proper vector of representing i training sample extraction of k classification, N kBe the training sample number of k classification, μ kThe average of representing k classification, ∑ kThe covariance matrix of representing k classification.
Covariance matrix to each classification carries out eigenwert and proper vector decomposition, obtains eigenwert { λ i (k), i=1,2 ..., 256} (eigenwert big or small descending sort according to value) and proper vector { ζ i (k), i=1,2 ..., 256}, λ i (k)It is ∑ kI eigenwert, ζ i (k)It is ∑ kI proper vector.
We calculate parameter lambda in the MQDF sorter with following formula:
&lambda; = 1 C &Sigma; k = 1 C &lambda; 225 ( k ) - - - ( 16 )
In the following formula, λ 225 (k)The expression ∑ kThe 225th eigenwert, C represents the classification number.λ will be used in the MQDF sorter of identifying, can further specify at further part.
The λ that obtains above, μ k', k=1,2 ..., C, ζ i (k), k=1,2 ..., C, i=1,2 ..., 256, λ i (k), k=1,2 ..., C, i=1,2 ..., 224 store in the identification library file, use for identifying.
4. identifying
Identifying as shown in Figure 2.At first extract 300 dimension wavelet characters, obtain 256 dimensional feature vector Y after the conversion.We discern the font of input Chinese character with the MQDF sorter.The decision function of MQDF sorter is seen formula (10).We calculate the g of each classification with this formula j(Y), classifying rules is as follows:
Y is classified as p classification, if g p ( Y ) = min 1 &le; k &le; C g k ( Y ) . (C is the classification number in the formula)
Calculate g with formula (10) i(Y) time, l value 224, λ calculates with formula (16) in training process.All parameters that need all read from the identification library file.
We are the identifying that example illustrates font with character " ".
I) input character " " is shown in the left figure among Fig. 8, through the image behind three grades of wavelet transformations shown in the right figure among Fig. 8.Three grades of wavelet transformations obtain ten number of sub images, as shown in Figure 9.Be clear expression, each subimage among Fig. 9 surrounds with a rectangle frame.
Ii) extract the initial wavelet character of 300 dimensions with method shown in Figure 6.
After iii) using formula (8) to carry out eigentransformation, obtain 256 dimension recognition features.(transformation matrix obtains in training process.)
Iv) to each classification, with the value of formula (10) computational discrimination function.Obtain C discriminant score (C is the classification number) altogether.(all parameters in the formula (10) obtain in training process.)
V) in the C that an obtains discriminant score, get minimum discriminant score, its corresponding class is exactly final recognition result.
For verifying validity of the present invention, we have carried out following experiment:
Test sample book collects and comprises 7 kinds of fonts: the Song typeface, imitation Song-Dynasty-style typeface, black matrix, regular script, lishu, the tablet of Wei Dynasty, garden body.Every kind of font comprises 3755 different Chinese characters (GB first-level Chinese characters collection).With preceding 3000 characters training, back 755 test alphabetics, experimental result is as follows:
The Song typeface Imitation Song-Dynasty-style typeface Black matrix Regular script Lishu The tablet of Wei Dynasty The garden body
The Song typeface 97.88% 1.32% 0.00% 0.26% 0.00% 0.13% 0.40%
Imitation Song-Dynasty-style typeface 2.12% 95.63% 0.00% 1.32% 0.00% 0.13% 0.79%
Black matrix 0.13% 0.00% 99.21% 0.13% 0.00% 0.26% 0.26%
Regular script 1.06% 3.31% 0.40% 94.04% 0.00% 0.66% 0.53%
Lishu 0.00% 0.00% 1.46% 0.00% 97.88% 0.66% 0.00%
The tablet of Wei Dynasty 0.00% 0.00% 0.26% 0.00% 1.32% 98.41% 0.00%
The garden body 1.06% 0.00% 0.40% 0.00% 0.00% 0.13% 98.41%
On average 97.35%
The process object of considering us as the single Chinese character of not knowing character information, and above discrimination is very gratifying.
In sum, the present invention can discern the font of single Chinese character under the prerequisite that does not have the character priori.The present invention has obtained excellent recognition result in experiment, have very application prospects.

Claims (3)

1. based on the character recognition method of single Chinese character, its characteristics are, it is a kind of character recognition method of single Chinese character of the text-independent that utilizes wavelet character, and it contains following steps successively:
(1) extract wavelet character with small wave converting method:
(1.1) represent the number of plies according to selected J, with the discrete filter H and the G of corresponding scaling function and wavelet function correspondence, to original image A 20F is f (m x, n y), wherein, m x, n yBe respectively image f (m x, n y) coordinate in length and breadth, the back is represented with f, carries out J layer wavelet transformation, obtains the 3J+1 number of sub images, is expressed as follows:
A 2 - j f , ( D 2 j ( 1 ) f ) - J &le; j &le; - 1 , ( D 2 j ( 2 ) f ) - J &le; j &le; - 1 , ( D 2 j ( 3 ) f ) - J &le; j &le; - 1
If original image A 20The size of f is N * N, then A 2-JThe size of f is 2 -JN * 2 -JN, D 2j (1)F, D 2j (2)F and D 2j (3)The size of f respectively is 2 jN * 2 jN ,-J≤j≤-1;
(1.2) from the 3J+1 number of sub images, extract the wavelet feature:
Begin to end from j=-1 to j=-J, each subimage is divided into the sub-piece of some by layer, add up the weighted sum of each sub-piece neutron deficiency coefficient absolute value, obtain one-dimensional characteristic that should sub-piece, the feature that all sub-piece of each layer are tried to achieve makes up, and obtains total wavelet feature of original image f;
(1.3) repair with Box-Cox transfer pair feature x, make it near Gaussian distribution:
Figure C031191300002C2
α is the parameter of Box-Cox conversion, establishes α=0.7, and every dimensional feature is all carried out obtaining initial wavelet character with up conversion;
(2) eigentransformation is extracted the Character Font Recognition feature with linear discriminant analysis LDA from wavelet character, to improve characteristic distribution, improve recognition performance, and it contains following steps successively:
(2.1) calculate the mean vector μ of each classification of known class with following formula kAnd the mean vector μ of all categories:
&mu; k = 1 N k &Sigma; i = 1 N k V i ( k ) , &mu; = 1 C &Sigma; k = 1 C &mu; k
Wherein, V i (k)Be the wavelet character vector of i sample extraction belonging to k classification, N kThe number of samples of representing k classification, C are represented the classification number;
(2.2) with divergence matrix S in the following formula compute classes wWith the between class scatter matrix S b:
S w = 1 C &Sigma; k = 1 C ( 1 N k &Sigma; i = 1 N k ( V i ( k ) - &mu; k ) ( V i ( k ) - &mu; k ) T )
S b = 1 C &Sigma; k = 1 C ( &mu; k - &mu; ) ( &mu; k - &mu; ) T
(2.3) to matrix S w -1(S b+ S w) carry out eigenwert and proper vector decomposition, obtain the eigenwert { γ of big or small descending sort according to value i, i=1,2 ..., n} and proper vector { ξ i, i=1,2 ..., n);
(2.4) form matrix of a linear transformation W=[ξ with preceding m proper vector 1, ξ 2..., ξ m]
(2.5) obtain proper vector after linear discriminatory analysis LDA conversion, represent with Y:
Y=W T·V
Wherein V is the initial wavelet character vector of original image;
(3) carry out Character Font Recognition with improving second order sorter MQDF;
(3.1) training process:
(3.1.1) at first extract the wavelet character of known class original image,,, add up its average μ with following formula to each classification k through obtaining the m dimensional feature after the linear discriminant analysis LDA conversion k' and the covariance matrix ∑ k:
&mu; k &prime; = 1 N k &Sigma; i = 1 N k Y i ( k )
&Sigma; k = 1 N k &Sigma; i = 1 N k ( Y i ( k ) - &mu; k &prime; ) &CenterDot; ( Y i ( k ) - &mu; k &prime; ) T
Wherein, Y i (k)The proper vector of wavelet character vector after linear discriminatory analysis LDA conversion for i sample extraction belonging to k classification;
(3.1.2) to the covariance matrix ∑ of each classification kCarry out eigenwert and proper vector and decompose, obtain the eigenwert { λ of big or small descending sort according to value i (k), i=1,2 ..., m} and proper vector { ζ i (k), i=1,2 ..., m}
(3.1.3) substitution value of C-l eigenwert of eigenwert numerical value minimum in the calculating descending sort:
&lambda; = 1 C &Sigma; k = 1 C &lambda; l + 1 ( k )
Wherein, l is the positive integer less than m, and the m value is 256;
(3.1.4) the λ that obtains previously, μ k', k=1,2 ..., C, ζ i (k), k=1,2 ..., C, i=1,2 ..., m, λ i (k), k=1,2 ..., C, i=1,2 ..., l stores in the identification library file, uses for follow-up identification;
(3.2) identifying:
(3.2.1) calculate treating after linear discriminatory analysis LDA conversion and know the decision function g of classification original image wavelet character vector Y each classification with following formula k(Y):
g k ( Y ) = &Sigma; i = 1 l ( ( Y - &mu; k &prime; ) T &zeta; i ( k ) ) 2 &lambda; i ( k ) + &Sigma; i = l + 1 m ( ( Y - &mu; k &prime; ) T &zeta; i ( k ) ) 2 &lambda; + &Sigma; i = 1 l log &lambda; i ( k ) + &Sigma; i = l + 1 m log &lambda;
Wherein, λ is a constant, the see before training process of face of the calculating of λ, the see before eigentransformation of face of the calculating of Y;
(3.2.2) waiting to know the classification original image is divided into and makes g k(Y) get the classification of minimum value.
2. the character recognition method based on single Chinese character according to claim 1 is characterized in that: in the step of (1.1) in the described step (1), it contains following steps successively:
(1.1.1) use the discrete filter H that obtains according to scaling function in the horizontal direction respectively and the discrete filter G that obtains according to wavelet function to original image A 20F carries out convolution, and filtering image is carried out subsampling in the horizontal direction handle, and promptly per two samples only keep one, obtain two number of sub images; Again this two number of sub images is carried out convolution with discrete filter H and G respectively in vertical direction, and make subsampling in a manner described and handle, obtain four number of sub images, i.e. A 2-1F, D 2-1 (1)F, D 2-1 (2)F, D 2-1 (3)F;
(1.1.2) again to image A 2-1F (1.1.1) set by step decomposes, and obtains A 2-2F, D 2-2 (1)F, D 2-2 (2)F, D 2-2 (3)F;
(1.1.3) according to above step, be performed until selected level J, obtain A 2-JF, D 2j (1)F, D 2j (2)F, D 2j (3)F.
3. the character recognition method based on single Chinese character according to claim 2 is characterized in that: described small echo is the Spline2 small echo, and it according to the discrete filter H that scaling function obtains is The discrete filter G that obtains according to wavelet function is
Figure C031191300004C3
CN 03119130 2003-03-14 2003-03-14 Font recogtnizing method based on single Chinese characters Expired - Fee Related CN1238816C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 03119130 CN1238816C (en) 2003-03-14 2003-03-14 Font recogtnizing method based on single Chinese characters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 03119130 CN1238816C (en) 2003-03-14 2003-03-14 Font recogtnizing method based on single Chinese characters

Publications (2)

Publication Number Publication Date
CN1437162A CN1437162A (en) 2003-08-20
CN1238816C true CN1238816C (en) 2006-01-25

Family

ID=27634500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 03119130 Expired - Fee Related CN1238816C (en) 2003-03-14 2003-03-14 Font recogtnizing method based on single Chinese characters

Country Status (1)

Country Link
CN (1) CN1238816C (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100338621C (en) * 2005-04-07 2007-09-19 上海交通大学 Eigenvalue error compensation on limited sample collection and parameter distribution correcting method
CN100536523C (en) * 2006-02-09 2009-09-02 佳能株式会社 Method, device and storage media for the image classification
JP5253788B2 (en) * 2007-10-31 2013-07-31 富士通株式会社 Image recognition apparatus, image recognition program, and image recognition method
CN101216890B (en) * 2008-01-09 2011-02-16 北京中星微电子有限公司 A color image segmentation method
US8391613B2 (en) * 2009-06-30 2013-03-05 Oracle America, Inc. Statistical online character recognition
CN101901344B (en) * 2010-08-13 2012-04-25 上海交通大学 Method for detecting character image local feature based on corrosion method and DoG operator
CN108932454A (en) * 2017-05-23 2018-12-04 杭州海康威视系统技术有限公司 A kind of character recognition method based on picture, device and electronic equipment
CN107844740A (en) * 2017-09-05 2018-03-27 中国地质调查局西安地质调查中心 A kind of offline handwriting, printing Chinese character recognition methods and system
CN109409373A (en) * 2018-09-06 2019-03-01 昆明理工大学 A kind of character recognition method based on image procossing

Also Published As

Publication number Publication date
CN1437162A (en) 2003-08-20

Similar Documents

Publication Publication Date Title
CN1459761A (en) Character identification technique based on Gabor filter set
CN110210413B (en) Multidisciplinary test paper content detection and identification system and method based on deep learning
CN1278280C (en) Method and device for detecting image copy of contents
CN100440250C (en) Recognition method of printed mongolian character
US8249343B2 (en) Representing documents with runlength histograms
CN1828632A (en) Object detection apparatus, learning apparatus, object detection system, object detection method
CN1625741A (en) An electronic filing system searchable by a handwritten search query
CN1226696C (en) Explanatory and search for handwriting sloppy Chinese characters based on shape of radicals
CN1177407A (en) Method and system for velocity-based head writing recognition
CN1818927A (en) Fingerprint identifying method and system
CN1752992A (en) Character recognition apparatus, character recognition method, and character recognition program
CN1504961A (en) Method and apparatus for extracting feature vector used for face recognition and retrieval
JP2001167131A (en) Automatic classifying method for document using document signature
CN1238816C (en) Font recogtnizing method based on single Chinese characters
CN1894703A (en) Pattern recognition method, and device and program therefor
CN1834992A (en) Detecting an orientation of characters in a document image
CN1737824A (en) Set up the method and apparatus of deterioration dictionary
CN1811793A (en) Automatic positioning method for characteristic point of human faces
CN1251130C (en) Method for identifying multi-font multi-character size print form Tibetan character
CN1091905C (en) Construction method of data base for writing identifying system
CN113065396A (en) Automatic filing processing system and method for scanned archive image based on deep learning
CN1916940A (en) Template optimized character recognition method and system
CN1310182C (en) Method, device and storage medium for enhancing document, image and character recognition
CN1129331A (en) Character recognition method and apparatus based on 0-1 pattern representation of histogram of character image
CN1549192A (en) Computer identification and automatic inputting method for hand writing character font

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20060125

Termination date: 20130314