Proceedings of 2008 IEEE International Symposium on IT in Medicine and Education
The Application of Gabor Filter in Chinese Writer Identification Luo Wei, Wang Feng, Zhang Dexian, Yang Zhixiao, Zhao Zhiyan, Sui Fei Henan University of Technology, Zhengzhou, 450001, China
[email protected]
Abstract Writer identification is a technique that aims to decide the identity of writers according to the handwriting styles. In this paper, the whole handwriting is considered as a texture image. A two-dimensional Gabor filter for extracting texture features of Chinese handwritings is designed and tested, which is a key step in the writer identification project. Test results show the filter can efficiently reflect the feature information of handwritings and it’s valid for the whole Chinese writer identification project. The method used in this paper has good robustness and is suitable for practical use.
1. Introduction The Chinese character has the properties of large vocabulary, complex structure and lots of similar characters. It doesn’t like the English words which only constructed by 26 letters. Human beings have the ability to identify which characters are written by someone and which are written by someone else, though we also feel confused sometimes. Nowadays, it’s very necessary to make deep researches on writer identification with the help of computers. According to the considered object and the way of extracting features, writer identification methods can be classified as two categories: text independent and text dependent methods[5]. Text dependent method is to check a person’s handwriting with two or more text materials with the same contents. It’s very relevant with the writing’s contents and we can utilize font, word position, distribution of strokes orientation, strokes arrangement as its characteristics. Some text dependent methods have been wildly used, such as orthogonal transform, histogram method, standard template transform, higher-order moments correlation, orientation index histogram and strokes matching, etc. In text independent writer identification, we can not utilize the same features as the text dependent method. So it’s much more difficult.
In this paper, we process handwritings as texture images. A two-dimensional orthogonal Gabor filter is researched and designed to extract the writing’s texture information, which is a kind of reflection of frequency information of the handwritings.
2. The Gabor filter A Gabor filter is a linear filter whose impulse response is defined by a harmonic function multiplied by a Gaussian function. Because of the multiplication convolution property (Convolution theorem), the Fourier transform of a Gabor filter's impulse response is the convolution of the Fourier transform of the harmonic function and the Fourier transform of the Gaussian function. g ( x , y ;T ,I ,V ,J ) exp(
x'2 J 2 y '2 x' )cos(2S I ) O 2V 2
(1)
where x ' x cos T y sin T
and y ' x sin T y cos T In equation (1), Ȝ represents the wavelength of the cosine factor, valid values are real numbers equal to or greater than 2. In order to prevent the occurrence of undesired effects at the image borders, the wavelength value should be smaller than one fifth of the input image size. ș represents the orientation of the normal to the parallel stripes of a Gabor function, valid values are real numbers between 0 and 360. Valid values of phase offset ij are real numbers between -180 and 180. The values 0 and 180 correspond to center-symmetric 'center-on' and 'center-off' functions, respectively, while -90 and 90 correspond to anti-symmetric functions. All other cases correspond to asymmetric functions. The parameter Ȗ, called more precisely the spatial aspect ratio, specifies the ellipticity of the support of the Gabor function. For Ȗ = 1, the support is circular. For Ȗ < 1 the support is elongated in orientation of the parallel stripes of the function. As in
üüüüüüüüüüüüüüüüüü 978-1-4244-2511-2/08/$25.00 ©2008 IEEE
360
Authorized licensed use limited to: IEEE Xplore. Downloaded on February 25, 2009 at 08:29 from IEEE Xplore. Restrictions apply.
Proceedings of 2008 IEEE International Symposium on IT in Medicine and Education
our experiment, the Ȗ is a constant value. We set its default value Ȗ = 0.5. The half-response spatial frequency bandwidth b (in octaves) of a Gabor filter is related to the ratio ı/Ȝ, where ı and Ȝ are the standard deviation of the Gaussian factor of the Gabor function and the preferred wavelength, respectively, as follows: b
V S lo g 2 O V S O
ln 2 2 ln 2 2
V 1 ln2 2 b 1 x O S 2 2b 1
(2)
template character, and then eliminate the blank columns from rows. Since the blank rows are no contribution to the texture analysis, in contrast, it will influence the features extraction, we ought to remove them from the denoised image. In order to compare texture in the same level, we must do normalization. Reference [1] has raised 3 normalization ways and we adopt the method of matching barycenter. Image (b) in figure 3 shows the normalization result.
The value of ı cannot be specified directly. It can only be changed through the bandwidth b. The bandwidth value must be specified as a real positive number. The default value is 1, in which case ı and Ȝ are connected as follows: ı = 0.56Ȝ. The smaller the bandwidth is, the larger ı is.
3. Writing’s texture extraction with Gabor filter
(a)
(b)
(c)
(d)
Before extracting the texture features, we should make effective preprocessing steps on images, such as denoise, normalization, segmentation and combination, etc. The whole procedure of writer identification is shown in the Figure 1 below.
Figure 1. the flow block of computer-aided writer identification We first use the most optimal threshold to evaluate the noise threshold, as mentioned in reference [3], but the result is not very satisfied. To reach the desired effect, we projected the characters on the horizon and select an optimal threshold to remove the noise base on the projected value, then we adopt median filter to remove the remaining noise. According to many experiments, we eventually select the window size 5×3 as the optimal size of the filter under the consideration of denoise and smooth. The upper processing steps are shown in figure 2.
From the horizontal projection image, we can get the average character height. Considering that the gap between characters is different due to human’s writing behavior, so we can’t adopt the same way to calculate the average character width as getting the height. In this paper we first estimate the length of row according to the character height and the size of
Figure 2. (a) Original image, (b) Image processed using most optimal threshold, (c) Horizonal projected image, (d) Image processed with most optimal threshold and 5×3 median filter
(a)
(b)
Figure 3. (a) Binary image after removing blank rows and columns, splicing and cutting(744×960) (b) normalized binary image(256×256) In order to obtain as much training sample data, we segment the size 256 ×256 binary image into four size 128×128 sub-images and, then take two-dimensional multilayer Gabor filter to extract its frequency information in 4 different orientations as ș is equivalent to 0o, 45o, 90o and 135o and in each orientation we
361
Authorized licensed use limited to: IEEE Xplore. Downloaded on February 25, 2009 at 08:29 from IEEE Xplore. Restrictions apply.
Proceedings of 2008 IEEE International Symposium on IT in Medicine and Education
sample 6 wavelength values. Under consideration of retaining high frequency , we select 2, 4, 8, 16, 32 and 64 as its wavelengths because the high central frequency to delicate texture and low central frequency corresponds to coarse texture. Together we can acquire 24 Gabor channels. The standard deviation ı of the Gaussian factor determines the effective size of the surrounding pixels in which weighted summation takes place and inversely proportional to central frequency. Figure 4 is the Gabor response of (b) in figure 3. As we have just mentioned the original 256×256 segments into four 128×128 sub-images, we take its mean and variance as its features.
4. Conclusions In this paper, a kind of two dimensional Gabor filter is designed and successfully applied in extracting Chinese handwriting’s feature information. Test results show the Gabor filter designed in this paper can effectively extract the texture information of Chinese handwritings and the method used in this paper has good robustness and is suitable for practical need. In the process of writer identification, extracting one aspect feature is not valid enough to reflect someone’s writing behavior. The next question of us is how to organize the different features in order to obtain more correct results. And also we try to design some classifiers to compare the identification results and decide which one is the best optimal classifier.
Acknowledgements Figure 4. the size 128×128 image filtered in direction 0o with wavelength in 2, 4, 8, 16, 32, and 64 and in direction 45o with wavelength in 2, 4, 8, 16, 32 and 64. Table 1 is the feature values of one sub-image in direction 0o with 6 different wavelengths. In the same way we can acquire other features from other three directions. So we can acquire 48 feature values from one sub-image. We considered the 48 features as one vector. From our experiments, we find the Euclid distance in sub-images from one original image is very small, but the distance is bigger in different sub-images which come from different original image. So we can adopt these data as its valid features in the sequence classifier design. Table 1. mean and variance in direction 0o with different wavelengths Wavelength mean variance Wavelength mean variance
2 0.1229 0.0668 16 0.0813 0.0132
4 0.0897 0.0358 32 0.0755 0.0113
8 0.0882 0.0220 64 0.0697 0.0131
This work is supported by the National Key Technologies R&D Program (NKTRDP) of Henan Province under Grant No. 0424220025.
References [1] Liu chenglin, Dai Ruwei, Liu Yingjian.Modified Wigner distribution and application to writer identification, Journal of Computers, 1997, 20(11), pp.1018-1023(in Chinese) [2] ZHU Yong, TAN Tie-Niu, WANG Yun-Hong.WRITER IDENTIFICATION BASED ON TEXTURE ANALYSIS.Journal of Automation.2001,27(2), pp.230-234(In Chinese) [3] Linlin Shen, Li Bai. MutualBoost learning for selecting Gabor features for face recognition. Pattern Recognition Letters. 27(2006), pp. 1758-1767 [4]P.Kruizinga,N.Petkov and S.E.Grigorescu.Comparison of texture features based on Gabor filters.In: Proceedings of the 10th International Conference on Image Analysis and Processing.1999,pp.142-147 [5] Ville Kyrki, Joni-Kristian Kamarainen, Heikki Kalviainen. Simple Gabor feature space for invariant object recognition. Pattern Recognition Letters. 25(2004), pp.311-318
362
Authorized licensed use limited to: IEEE Xplore. Downloaded on February 25, 2009 at 08:29 from IEEE Xplore. Restrictions apply.