An Improved Character Segmentation Algorithm ... - Semantic Scholar

Report 6 Downloads 171 Views
1496

JOURNAL OF NETWORKS, VOL. 9, NO. 6, JUNE 2014

An Improved Character Segmentation Algorithm Based on Local Adaptive Thresholding Technique for Chinese NvShu Documents Yangguang Sun College of Computer Science, South-Central University for Nationalities, Key Laboratory of Education Ministry for Image Processing and Intelligent Control, Huazhong University of Science and Technology, Wuhan 430074, China Email: [email protected]

Zhihua Cai State Key Laboratory of Software Engineering, Wuhan University, College of Computer Science, South-Central University for Nationalities, Wuhan 430072, China Email: [email protected]

Abstract—For the structural characteristics of Chinese NvShu character, by combining the basic idea in LLT local threshold algorithm and introducing the maximal betweenclass variance algorithm into local windows, an improved character segmentation algorithm based on local adaptive thresholding technique for Chinese NvShu documents was presented in this paper. Because of designing the corresponding correction parameters for the threshold and using secondary search mechanism, our proposed method could not only automatically obtain local threshold, but also avoid the loss of the character image information and improve the accuracy of the character image segmentation. Experimental results demonstrated its capability to reduce the effect of background noise, especially for Chinese NvShu character images with uneven illumination and low contrast. Index Terms—Local Adaptive; NvShu; Character Image; Image Segmentation

I.

INTRODUCTION

With the advent of the information age and the loss of ethnic diversity in Chinese minorities, the protections and rescue excavations for their language and cultures have become a hot topic in the computer science and other related fields by using the way of digital information. Chinese NvShu is the most gender-conscious language in the world, which is created and used only by women. Its italic writing system reflects women’s collective wisdom at the cultural level. As the exclusive female language in the world, Chinese NvShu is divided by gender, which neither belong to any nationality nor rely on any religion. It has the important value to research on women's culture, human character, and the origin and development of human civilization [1]. Currently, there exist many problems in the procedure of protecting the ancient literatures of Chinese NvShu because of corrosion aging and serious loss, so that it has important urgency and practical significance for rescue excavations on Chinese NvShu culture using the digital

© 2014 ACADEMY PUBLISHER doi:10.4304/jnw.9.6.1496-1501

information technology. As one of key technologies in image processing, image segmentation is an important base of image understanding, image analysis and image recognition,which has attracted many attentions and is applied in a variety of corresponding fields [2]. During the heritance and transform of ancient literatures, there exist unavoidablly the degradation and damage in varying degrees because of its age and poor preservation, so that a stronger anti-noise capability and robustness should be required in the corresponding character image segmentation algorithms. Thus this provides the necessary foundation for the subsequent character recognition and other digital information processing. Although there are a lot of works addressing how to implement image segmentation for objects of intrest, it is still a challenging problem in image processing. Image segmentation algorithms with various different types were proposed in the past years. Especially, those algorithms based on thresholding technique have been successfully applied in different fields due to its simple implementation process and lower computational complexity [3]. Depending on its range of action in the image, segmentation algorithms based on thresholding technique could be divided into global and local thresholding algorithms. Thresholds obtained in the global thresholding algorithms only could result from the pixel gray information of the whole image, but the correlation of gray information between adjacent pixels could not be considered in the grayscale image. Therefore, these algorithms is suitable for a kind of image included with the relatively clear difference between the target and the background, for example the maximum between-class variance algorithm is a classical image segmentation method based on global image information [4]. However, due to the influence of objective conditions and artificial actions, the problems about image color loss and degradation are common phenomena and cause uneven illumination and high noise for the character images in

JOURNAL OF NETWORKS, VOL. 9, NO. 6, JUNE 2014

ancient literatures, which limit to a great extent the application of global thresholding algorithms. By using local gray information between adjacent pixels in grayscale image, thresholds in local thresholding algorithms could be obtained in each local regions according to certain algorithm rules [5, 6]. Kamel and Zhao [7] proposed LLT (Logical Level Technique) algorithm based on the local information of an image. Compared with other local thresholding algorithms, this algorithm has strong adaptability and high efficiency, but there exist two important parameters that need to be manually set on the basis of experience. Yang and Yan [8] developed the logical level technique and proposed a method which can adaptively calculate the threshold value, but the threshold is yet a global parameter. By utilizing multiple window sizes in the windows operation and the geometric features of blueprint images, an adaptive logical thresholding method was presented in [9] for the binarization of blueprint images. Ntirogiannis [10] proposed an adaptive logical level technique by guiding adaptive stroke width detection to identify locally the stroke width and introducing an adaptive local parameter to improve the overall performance. However, the calculated adaptively threshold value in the above improved algorithms is yet a global parameter, which leads to the limitation in these applications in low quality image. For the structural characteristics of Chinese NvShu character, by combining the basic idea in LLT local threshold algorithm and introducing the maximal between-class variance algorithm into local windows, an improved character segmentation algorithm based on local adaptive thresholding technique for Chinese NvShu documents was presented in this paper. Because of designing the corresponding modify parameters for the threshold and using secondary search mechanism, our proposed method could not only automatically obtain local threshold, but also avoid the loss of the character image information and improve the accuracy of the character image segmentation. Experimental results demonstrated its capacity to reduce the effect of background noise, especially for Chinese NvShu character images with uneven illumination and low contrast. The remainder of this paper is organized as follows: In Section 2, the basic principle of LLT algorithm is briefly introduced. The proposed method is described in Section 3. Experimental results and analyses are shown in Section 4, and the conclusion is presented in Section 5. II.

THE BASIC PRINCIPLE OF LLT ALGORITHM

Logical level technique proposed by Kamel and Zhao is developed on the basis of analysing integrated function algorithm [11]. It is based on the idea of comparing the gray level or its smoothed gray level of the processed pixel with some local averages in the neighborhoods about a few other neighboring pixels. The local averages are employed such that this method is not sensitive to noise.

© 2014 ACADEMY PUBLISHER

1497

We assumed that the range of the stroke width in a character image is set as [0, w] , where w is the maximum stroke width. According to LLT algorithm, the distance between the processed pixel and the center of its neighboring window is the stroke width w , and the size of neighboring windows is (2w  1)  (2w  1) . Suppose that the gray value of a processed pixel G at coordinates ( xG , yG ) in an image is defined by a function

f ( xG , yG ) , and the pixels Gi (i  0,1, 2, ,7) shown in Fig. 1 are denoted as eight adjacent pixels in the neighborhood centered at pixel G . This algorithm processes each pixel by simultaneously comparing its gray level or its smoothed gray level with four local averages of the neighboring windows centered at four points Gi , Gi , Gi1 , Gi1 described in (2). The gray level of the processed pixel is compared with four symmetrical windows which are similar to the boundary restriction of a straight line of stroke width. If the gray value of the center pixel G is less than that of the above four local averages at least T gray level, the pixel G is considered as a pixel included in the character region. Mathematically, by setting ti  L(Gi ) (Gi) L(Gi 1 ) L(Gi1 ) , this algorithm can be described as follows: 1, if 3i  0 [ti ]istrue b( x, y)   otherwise 0, 1, L(Gi )   0,

AVE (Gi )  f ( xG , yG )  T AVE (Gi )  f ( xG , yG )  T

(1)

(2)

where Gi  G(i  4) mod8 ,(i  0,1, 2, ,7) , the local average of in a neighboring windows is defined as: AVE ( P) 

 

 w i  w  w j  w

f ( xP  i , y P  j )

(2w  1) 2

(3)

Here, 1 and 0 represent character and background of the resulting binary image in (1) respectively. The global parameter T is a predetermined parameter, and is not good enough for images with changing background noise, because a global threshold is difficult or even impossible to be set for historical document images. III.

PROPOSED MODEL

In this section, a novel local adaptive thresholding method was proposed to implement Chinese NvShu character segmentation for the structural characteristics of Chinese NvShu character, which can automatically obtain local threshold, but also avoid the loss of the character image information and improve the accuracy and robustness of the character image segmentation. Furthermore, the implementation and parameter settings of our method are also described.

1498

A. Structural Characteristics of Chinese NvShu Character Chinese NvShu is the most gender-conscious language in the world, which is created and used only by women. Its italic writing system reflects women’s collective wisdom at the cultural level. As the exclusive female language in the world, Chinese NvShu is divided by gender, which neither belong to any nationality nor rely on any religion. It is not only feature in the social function and historical heritage, but Chinese NvShu character is very distinctive [12]. Moreover, Chinese NvShu character is originated from Chinese character and has the varieties of Chinese Character, but it is simplified and improved in the process of its development, and has the following main features: 1) font overall tilt with the diamond structure; 2) dot strokes transformed from relatively short strokes; 3) the transformed neat lines strokes, only horizontal and vertical strokes with relatively short length could be retained, other strokes are transformed into oblique strokes with declining long lines. Moreover, stroke widths are transformed into the feature with uniform thickness. Therefore, strokes of Chinese Nvshu character only include four types, namely dot, vertical, oblique and arc, and its fonts are overall tilt with the diamond structure, which consist in unique characteristics of Chinese Nvshu character. B. Nvshu Character Segmentation Based on Local Adaptive Thresholding Technique From the basic principles of LLT algorithm, this technique processes each pixel by simultaneously comparing its gray level or its smoothed gray level g ( x, y) with four local averages AVE (Gi ) in the neighboring windows centered at four points Gi , Gi , Gi1 , Gi1 . According to the definition of the four center points, they are divided into two pairs of diametric opposites which consist of two adjacent pixels, namely Gi and Gi1 , Gi and Gi1 is each adjacent, Gi and Gi , Gi1 and Gi1 is each diametric opposites. For the structural characteristics of Chinese NvShu character, its strokes are only made up of four types (dot, vertical, oblique and arc) and mainly include vertical, oblique and arc. Meanwhile, its fonts are overall tilt with the diamond structure. Typical arcs in character images and selection of a local window are shown in Fig. 1. Therefore, if the three consecutive pixels Gi , Gi1 and Gi2 in the neighbor-hood centered at pixel G are used as a basis for judgement of the characters to substitute for those pixels with symmetrical structure in traditional LLT algorithm, the improved algrithm could more conform to the structural characteristics of Chinese NvShu character. Suppose that the maximum stroke width of characters in an image is denoted as w , the size of neighboring windows is (2w  1)  (2w  1) . By defining L(Gi ) as Eq.(3) and setting ti  L(Gi ) L(Gi 1 ) L(Gi  2 ) , the corresponding logic expression b( x, y) in image character pixels could be described as:

© 2014 ACADEMY PUBLISHER

JOURNAL OF NETWORKS, VOL. 9, NO. 6, JUNE 2014

1, if 7i  0 [ti ] is ture b( x, y)   otherwise 0,

(4)

In this paper, the secondary search mechanism was used in the implementation process of the proposed algorithm and shown in Fig. 2. By setting two stroke width variables w1 and w2 , and assuming that the maximum stroke width of characters is w2 and twice the width of w1 , we have w  w2 . As can be seen in Fig. 2, if

b( x, y)  1 , the next pixel will be proceeded; if b( x, y)  0 , we will replace the maximum stroke width of characters w with w1 , then repeat the above process to implement the character segmentation again. By using the secondary search mechanism, we can effectively avoid missing the image information from the segmented characters, and further improve the accuracy of Chinese Nvshu character segmentation.

(a) characteristics of arcs

(b) three adjacent points

Figure 1. Typical arcs in character images and selection of a local window

Figure 2. The flow chart for implementation of the proposed algorithm

In the implementation process of the LLT algorithm, the threshold T is a predetermined parameter, and the choice of its value directly affects the final character segmentation results. However, a single global threshold T is very difficult to meet the needs of different practical

JOURNAL OF NETWORKS, VOL. 9, NO. 6, JUNE 2014

1499

applications, especially the problem of image segmentation under complex background is difficult to deal with. Therefore, according to the distribution characteristic of pixel intensity in a current local window and using the maximal between-class variance algorithm, a local threshold could be obtained adaptively in the current local window. Here, the local threshold chosen is true when images are in a dark background. Because the contrast between background and object in dark images is usually low, and the threshold should be consequently low. But it does not accord with cases that where the contrast between background and object can be low in bright images. In such cases, the calculated local threshold will be unreasonably large and give a false result. Furthermore, by introducing a correction parameter  to dynamically adjust the local threshold, the adaptability and robustness of the proposed algorithm is further improved. Suppose that the threshold Totsu is a local threshold obtained adaptively in a current local window by using the maximal between-class variance algorithm, the threshold T could be dynamically adjusted by a correction parameter and calculated by:

T  Totsu  

(5)

where the value range of the parameter  is [0,1] . Its value of the parameter in this paper is set to 0.5. In addition, the stroke width in a character image determines the size of the processed local window, so this has a direct influence on the accuracy and timeconsuming. However, Chinese NvShu character has the structural characteristics with uniform thickness, which greatly reduces the influence from the character stroke width in the proposed algorithm and further improves the adaptability and accuracy. C. Parameter Settings The stroke width w is one of important parameters in the process of implementation, and has a direct influence on the accuracy and time- consuming. If the stroke width chosen is too large, excessive pixels are included in the local window, which could affect the accuracy of the algorithm. Conversely, if the stroke width chosen is too small, excessive local windows will appear, which leads to increase computational complexity and reduce computing speed. Usually, for the same Nvshu character image, the stroke width has a relatively constant range. Chinese NvShu character has uniform thickness because of its structural characteristics. Therefore, it is easy to estimate the stroke width in a given Chinese NvShu character image, which further improves the adaptability. IV.

EXPERIMENTS AND ANALYSIS

To examine the feasibility and robustness of our model, Chinese NvShu character images with different typical characteristics were selected in our experiments, such as high noise, uneven illumination and similar contrast. Compared with traditional OTSU method based on automatic threshold selection, the potential of our model was further demonstrated. In the following experiments, © 2014 ACADEMY PUBLISHER

the stroke width w in a given Chinese NvShu character image was obtained by estimateing the maximum value of its stroke width, and local adaptive threshold T was automatically chosen according to local image features. A. Nvshu Character Segmentation with Complex Noises In this section, we studied the anti-noise capability of the proposed method and showed comparative results on two classical types of noise, namely Gaussian noise and speckle noise. Our method was compared against traditional OTSU method based on automatic threshold selection. All experiments were carried out on the same gray-level image by adding noises with different intensity shown in Fig. 3. The three gray-level images shown in the first row of Fig.3 (a)-(c) were corrupted by Gaussian noise with zero mean and standard deviations ranging from 0.006, 0.008 and 0.01 respectively, while the three gray-level images shown in the first row of Fig. 3 (d)-(f) were corrupted by speckle noise defined as uniformly distributed random noise with zero mean and variance ranging from 0.02, 0.04 and 0.06 respectively. The second row of Fig. 3 (a)-(f) present the corresponding results from traditional OTSU method respectively. Results for Chinese NvShu character segmentation using our method were shown in the last row of Fig. 3(a)-(f). As can be seen from Fig. 3, the traditional OTSU method suffered severe problems: they failed in images with high noise. Moreover, the worse results were shown with the increase of the noise strength. However, our method is robust to different types of noise with different intensity, and the perfect results could be successfully obtained as shown in Fig. 3. Furthermore, the accuracy measurements of Fig. 3 listed in Table I with the accuracy Rc demonstrated that there are not large decreases on the measure of the accuracy although the noise levels increased in our method (i.e., Rc  ( N Inside  NObject ) NObject 100% , the relative deviation between the number of segmented inside pixels N Inside and the total number of character pixels NObject ). Results in Fig. 3 and Table I show that the proposed method copes quite well with the two types of noise and has capability to reduce the effect of background noise. B. NvShu Character Segmentation with Uneven Illumination In the next experiment two Chinese NvShu character images with uneven illumination shown in Fig. 4 were chosen to demonstrate the robustness of our method. As can be seen from Fig. 4(a)-(d), the light distribution of the two images has the characteristics of high brightness in center region and low brightness in surrounding region, especially for the character image shown in Fig. 4(d). The corresponding results using traditional OTSU method were presented in Fig. 4(b)-(e) respectively. Figure 4(c)(f) present the corresponding results using our method respectively. For the traditional OTSU method, only the center region was obtained, while the characters near the surrounding region were not segmented. However, our

1500

JOURNAL OF NETWORKS, VOL. 9, NO. 6, JUNE 2014

(a)

(b)

(c)

(d)

(e)

(f)

Figure 3. Character Segmentation with different noises. First row (from left to right): Gaussian noise with zero mean and standard deviations 0.006, 0.008 and 0.01, and speckle noise with zero mean and variance 0.02, 0.04 and 0.06 respectively; Second row: the corresponding results from traditional OTSU method; Last row: the corresponding results using our method

TABLE I.

OTSU Method Our Method

(a)

(d)

(b)

(e)

COMPARATIVE RESULTS ON IMAGES WITH DIFFERENT NOISES (%) Gaussian noise 0.01 0.008

0.006

Speckle noise 0.06 0.04

0.02

N Inside

7680

6112

5495

25976

25003

19084

Rc (%)

74.35

38.75

24.74

489.69

467.61

333.24

N Inside

4530

4510

4495

4519

4508

4550

Rc (%)

2.84

2.38

2.04

2.588

2.34

3.29

(c) (b)

(c)

(d)

(e)

(f)

(f)

Figure 4. Character segmentation with uneven illumination. (a) and (d) show two NvShu character images with uneven illumination;(b) and (e) show corresponding results using traditional OTSU method; (c) and (f) show corresponding segmented character images using our method

© 2014 ACADEMY PUBLISHER

(a)

Figure 5. Character segmentation with low contrast. (a) and (d) show two NvShu character images with low contrast; (b) and (e) show corresponding results using traditional OTSU method; (c) and (f) show corresponding segmented character images using our method

JOURNAL OF NETWORKS, VOL. 9, NO. 6, JUNE 2014

method not only avoids the loss of the character image information, but also improves the accuracy and robustness of the character image segmentation. Experimental results further demonstrated its capability to overcome the effect of uneven illumination on character image segmentation. C. NvShu Character Segmentation with Low Contrast Two NvShu character images with low contrast shown in Fig.5 were chosen in our experiments. Meanwhile, the characters shown in Fig. 5(a) have different stroke widths, while Fig. 5(d) has yet the high noises and uneven illumination. The corresponding results using the traditional OTSU method were presented in Fig. 5(b)-(e) respectively. Figure 5(c)-(f) present the corresponding results using our method. As can be seen from Fig. 5, the satisfying segmented characters can be obtained by using the proposed method compared with the traditional OTSU method. It has been further demonstrated that our method has the capability to reduce noise sensitivity and overcome the problem of character segmentation with uneven illumination and low contrast. V.

CONCLUSIONS

In this paper, a novel local adaptive thresholding method was proposed to implement Chinese NvShu character segmentation for the structural characteristics of Chinese NvShu character. By introducing the maximal between-class variance algorithm into local windows and using secondary search mechanism, the proposed method could not only automatically obtain local threshold, but also avoid the loss of the character image information and improve the accuracy of the character image segmentation. Experimental results demonstrated its capability to reduce noise sensitivity and improve the robustness, especially for Chinese NvShu character images with uneven illumination and low contrast. ACKNOWLEDGMENT This work is supported by the National Natural Science Foundation of China (60672057), the Natural Science Foundation of South-Central University for Nationalities (YZY10006), the Open Foundation of Key Laboratory of Education Ministry of China for Image Processing and Intelligence Control (200906), Academic Team of South-Central University for Nationalities (XTZ10002), the Science and Technique Research Guidance Programs of Hubei Provincial Department of Education of China (B20110802), “the Fundamental Research Funds for the Central Universities”, SouthCentral University for Nationalities (CZY12007, CTZ12023), and the Open Foundation of State Key Laboratory of Software Engineering (SKLSE20120934), the Natural Science Foundation of Hubei Province of China (2012FFB07404). The authors would also like to thank the anonymous reviewers for their valuable comments and constructive suggestions, which helped improve the quality of this paper.

© 2014 ACADEMY PUBLISHER

1501

REFERENCES [1] R. Z. Peng, Y. M. Wang and Q. L. Zhu, “Women's Script in Jiangyong and World Cultural Heritage”, Journal of Jiangxi Science and Technology Normal University, no. 4, pp. 57-59, August 2011. [2] N. R. Pal and S. K. Pal, “A review on image segmentation techniques,” Pattern Recognition, vol. 26, no. 9, pp. 12771294, September 1993. [3] H. Zhang, J. E. Fritts andS. A. Goldman, “Image segmentation evaluation: A survey of unsupervised methods,” Computer Vision and Image Understanding, vol. 110, no. 2, pp. 260-280, May 2008. [4] N. OTSU, “A threshold selection method from gray-level histograms.” IEEE Transaction on System, Man and Cybernetics, vol. 9, no. 1, pp. 62-66, January 1979. [5] O. D. Trier and A. K. Jain, “Goal-Directed evaluation of binarization methods,” IEEE Transaction, Pattern Analysis and Machine Intelligence, vol. 17, no. 12, pp. 1191-1201. December 1995. [6] M. R. Farrahi and C. Mohamed, “A multi-scale framwork for adaptive binarization of degraded document images,” Pattern Recognition, vol. 43, no. 11, pp. 2186-2198, January 2010. [7] M. Kamel and A. G. Zhao, ”Extraction of binary character/ graphics images from grayscale document images, ” Graphics Models and Image Processing, vol. 55, no. 3, pp. 203-217, May 1993. [8] Y. B. Yang and H. Yan, “An adaptive logical method for binarization of degraded document images,” Pattern Recognition, vol. 33, no. 5, pp. 787-807, May 2000. [9] M. S. Zhao, “Image thresholding technique based on fuzzy partition and entropy maximization,” University of Sydney, Doctor of Philosophy, pp. 16-33, 2004. [10] K. Ntirogiannis, B. Gatos and I. Pratikakis, “A modified adaptive logical level binarization technique for historical document images,” In: Proc of 10th International Conference on Document Analysis and Recognition, 2009, pp. 1171- 1175. [11] J. M. White and G. D. Rohrer, “Imager segmentation for optical character recognition and other applications requiring character image extraction,” IBM Journal of Research and Development, vol. 27, no. 4, pp. 400-411, July 1983. [12] Z. M. Xie, “The features and classification of the Chinese Female scripts,” The World Literature Criticism, vol. 65, no. 1, pp. 250-254, January 2007.

Yangguang Sun received the M.Sc. degree in computational mathematics, and the Ph.D. degree in pattern recognition intelligence system, from the Huazhong University of Science and Technology, China, in 2005 and 2009, respectively. He is currently a lecturer in the College of Computer Science, SouthCentral University for Nationalities, China. His current research interests are image processing, computer vision, and route planning. Zhihua Cai received his B.S. degree in computer science and technology from South-Central University for Nationalities (SCUEC) in 2011. Now, he is pursuing his M.S. degree in computer science and technology at SCUEC. His current research interests are image processing and computer vision.