Local entropy-based transition region extraction and thresholding

Local entropy-based transition region extraction and thresholding

Pattern Recognition Letters 24 (2003) 2935–2941 www.elsevier.com/locate/patrec Local entropy-based transition region extraction and thresholding Chen...

298KB Sizes 0 Downloads 39 Views

Pattern Recognition Letters 24 (2003) 2935–2941 www.elsevier.com/locate/patrec

Local entropy-based transition region extraction and thresholding Chengxin Yan a

a,*

, Nong Sang a, Tianxu Zhang

b

Institute for Pattern Recognition and Artificial Intelligence, Huazhong University of Science and Technology, Wuhan 430074, PR China b Key Laboratory of Ministry of Education for Image Processing and Intelligent Control, Huazhong University of Science and Technology, Wuhan 430074, PR China Received 6 March 2003; received in revised form 21 May 2003

Abstract Transition region based thresholding is a newly developed approach for image segmentation in recent years. Gradient-based transition region extraction methods (G-TREM) are greatly affected by noise. Local entropy in information theory represents the variance of local region and catches the natural properties of transition regions. In this paper, we present a novel local entropy-based transition region extraction method (LE-TREM), which effectively reduces the affects of noise. Experimental results demonstrate that LE-TREM significantly outperforms the conventional G-TREM.  2003 Elsevier B.V. All rights reserved. Keywords: Local entropy; Transition region; Thresholding; Gradient; Segmentation

1. Introduction Image segmentation plays an important role in computer vision. The quality of segmentation will greatly affect the latter feature extraction and target recognition tasks. Thresholding is one of the most important methods in image segmentation. The threshold value will determine the quality of segmentation. Transition region based thresholding is a newly developed segmentation method in recent years. It

*

Corresponding author. E-mail address: [email protected] (C. Yan).

has been successfully used in medical image segmentation (Liang and Le, 2001), recognition of workpieceÕs serial number (Le, 2000), monitor of tool wearing (Ye, 1999) and so on. Gerbrands (1988) demonstrated the existence of transition region for the first time. Zhang and Gerbrands (1991) introduced the transition region into image segmentation, and applied the effective average gradient (EAG) and clip transformation in their method. Groenewald et al. (1993) compared Zhang and Gerbrands (1991)Õs EAG method with Weszka and Rosenfeld (1979)Õs average gradient (AG) method, and proved that EAG is the smooth style of AG. In order to limit the affects of noise, Liang and Le (2001) modified the gradient operator

0167-8655/$ - see front matter  2003 Elsevier B.V. All rights reserved. doi:10.1016/S0167-8655(03)00154-5

2936

C. Yan et al. / Pattern Recognition Letters 24 (2003) 2935–2941

with Gaussian weight. But it is still based on Zhang and Gerbrands (1991)Õs EAG method. Gradient-based methods are widely used in image segmentation, but they have both advantages and limitations (Groenewald et al., 1993). The main disadvantage is that they are much sensitive to noise. The same drawbacks will happen in gradient-based transition region extraction methods (G-TREM), such as those methods mentioned above. In this paper, by analyzing properties of transition regions we present a novel local entropy-based transition region extraction method (LE-TREM). LE-TREM essentially deserted the gradient. Comparing experiments demonstrate that it is robust and effective and significantly outperforms the conventional G-TREM. Section 2 outlines gradient-based methods. In Section 3 we demonstrate the LE-TREM. The performance of LE-TREM is evaluated in Section 4. Section 5 discusses the properties of LE-TREM. The conclusions are in Section 6.

2. Gradient-based transition region extraction methods Typical G-TREM applied the average of gradient and clip transformation of grayscale. Let f ði; jÞ be an image function defined on M  N image size, ði; jÞ 2 S, S represents the integer set of spatial coordinates of the pixels. Let gði; jÞ be the gradient of the image, then the EAG can be defined as (Zhang and Gerbrands, 1991) TG EAG ¼ TP

ð1Þ

where TG ¼

X

gði; jÞ

ð2Þ

i;j2S

is the total sum of the gradient and X TP ¼ 1

ð3Þ

gði;jÞ6¼0

is the total number of pixels with non-zero gradient values.

The clip transformation function is defined as  L if f ði; jÞ P L ð4Þ f L ði; jÞ ¼ f ði; jÞ if f ði; jÞ < L  fL ði; jÞ ¼

f ði; jÞ L

if f ði; jÞ > L if f ði; jÞ 6 L

ð5Þ

Two EAGðLÞ  L curves can be obtained by computing EAG of the clipped image. From these two curves the value of Llow and Lhigh confining the transition region will be determined. Groenewald et al. (1993) proved the existence of Llow > Lhigh (in which condition the transition region cannot be extracted) in EAG method on real images. Liang and Le (2001) improved EAG method and proposed Gaussian weighted EAG to limit the affects of noise. Methods mentioned above are all essentially based on gradient. Gradient-based methods are sensitive to noise and will result in Llow > Lhigh or incorrect Llow and Lhigh thus will finally result in bad quality of segmentation. In fact, gradient-based methods cannot completely describe the properties of the transition region. By analyzing the properties of transition regions, we propose the following LE-TREM.

3. Local entropy-based transition region extraction method 3.1. The main properties of transition regions Transition regions locate between the object and the background. They have the following properties: 1. They have certain width. Whether for step edge or for non-step edge there will sure exist transition regions near edges (Gerbrands, 1988). Transition regions around non-step edges have certain number pixelsÕ width. Transition regions near the step edges have at least one pixelÕs width. Generally in real images, for the error of sampling, even around the step edge there will be several pixelsÕ width. 2. Transition regions cover around the objects. Since edge is the boundary between object and

C. Yan et al. / Pattern Recognition Letters 24 (2003) 2935–2941

background, the extracted transition region should cover around the object. 3. The grayscale in transition region changes frequently. The frequent changes of grayscale bring abundant information to transition regions. Gradient is good for sudden grayscale changes, but not the best measure for frequent grayscale changes. See the following example:

2937

is the probability of grayscale i appears in the image, L is the maximal grayscale, ni is the number of pixels with grayscale i, M  N is the image size. If we define a small neighborhood Xk by window size Mk  Nk within the image, then the entropy of Xk can be written as EðXk Þ ¼ 

L1 X

Pj log Pj

ð8Þ

j¼0

Fig. 1 shows two image neighborhoods. The number in both neighborhoods represents grayscale value. Comparing the two neighborhoods we can see that though the peak gradient of the right neighborhood is larger than that of the left, but the grade changes of the grayscale in the left neighborhood is more frequent than that in the right neighborhood. Transition region in images especially in medical images essentially contains more frequent changes than large sudden changes. From the point of information theory, the left neighborhood contains more information than the right neighborhood does. Entropy can best represent the information containing in the image. Local entropy can best describe the properties of the transition region. Thus we introduce local entropy into transition region extraction. 3.2. Local entropy Following ShannonÕs (Shannon, 1948) definition of entropy, Pun (1980) defined the entropy of an image as E¼

L1 X

Pi log Pi

ð6Þ

i¼0

where Pi ¼

ni M N

Fig. 1. Grayscale changes in different neighborhood.

ð7Þ

where Pj ¼

nj Mk  Nk

ð9Þ

is the probability of grayscale j appears in the neighborhood Xk , nj is the number of pixels with grayscale j in the neighborhood. EðXk Þ is the local entropy of neighborhood Xk . 3.3. Local entropy-based transition region extraction Local entropy is related to the variance of grayscales in the neighborhood. From Eq. (8) we can see that the local entropy is larger for a heterogeneous region but smaller for a homogeneous neighborhood. Hence the transition region will have larger local entropy values than those in nontransition regions of the image. We may define an appropriate neighbor window X and compute its local entropy. When we move the neighbor window pixel by pixel within the image from left to right and top to bottom, we will obtain each pixelÕs local entropy value, or in other words we obtain an entropy image. By appropriate entropy threshold the transition region will then be extracted. The final segmentation threshold will be determined by the peak or mean of the histogram of the transition region (Zhang and Gerbrands, 1991). The algorithm can be summarized as the following steps: Step 1: Given certain neighbor window size and appropriate entropy threshold; Step 2: Compute the local entropy by Eq. (8); Step 3: Extract transition region; Step 4: Obtain the segmentation threshold by transition regionÕs histogram; Step 5: Segment image by threshold.

2938

C. Yan et al. / Pattern Recognition Letters 24 (2003) 2935–2941

A too small window size will result in imprecise estimate of local entropy because of the lack of sampling, while a too large window loses localization (Grazzini et al., 2002). Zimmer et al. (1996) suggested that 7 · 7 to 15 · 15 window size be appropriate. Window size should also be considered with different kinds of images.

The threshold entropy can be determined automatically by the following definition ET ¼ aEðXk Þmax

ð10Þ

where EðXk Þmax is the maximal entropy of the entropy image, a is a coefficient between 0 and 1. In order to extract sufficient pixels for transition re-

Fig. 2. Transition region based segmentation of noisy image by LE-TREM and Weighted-EAG: (a) original bacteria image, (b) bacteria image with 0.05 salt and pepper noise, (c) ground truth image, (d) transition region extracted by Weighted-EAG, (e) segmentation result based on (d), (f) median filter of (e), (g) transition region extracted by LE-TREM, (h) segmentation based on (g), and (i) median filter of (h).

C. Yan et al. / Pattern Recognition Letters 24 (2003) 2935–2941

gion, a is generally between 0.6 and 1. Better or more precise ranges for a can be empirically chosen between 0.8 and 0.9. By this way, Eq. (10) should be computed in step 2. 4. Performance evaluation of LE-TREM

In this section, we will evaluate the performance of LE-TREM by evaluating the segmentation result. There are many methods for segmentation evaluation (Valverde et al., 2001; Yang, 1995; Zhang, 1996). Ultimate measurement accuracy (UMA) of area is a powerful evaluation metric suggested by Zhang (1996). It has wide dynamic evaluating range so it could detect very small variations in segmented images. The relative (normalized) UMA can be defined as jRf  Sf j  100% Rf

use Liang and Le (2001)Õs Weighted-EAG method for G-TREM. Weighted-EAG is also performed on the same test groups as LE-TREM is performed and the RUMA values are also averages in each group. 4.3. Results and discussion

4.1. Evaluating method

RUMAf ¼

2939

ð11Þ

where Rf is the feature value obtained from the reference image, Sf is the feature value obtained from the segmentation result. Feature f can be area, perimeter, form factor and so on. For bacteria image analysis the area of object is an important feature so in the following experiments, we use RUMA of area as evaluating metric.

Fig. 2(a)–(i) give segmentation results of one noise level (noise density is 0.05) obtained separately by Weighted-EAG and LE-TREM. Fig. 3 is the final evaluating curves. From the final evaluating result we can see that 1. The segmentation performance of LE-TREM is better than Weighted-EAG. Form Eq. (11) we know that the lower the RUMA value, the better the segmentation result. In Fig. 3 the evaluation curve of LE-TREM is lower than that of Weighted-EAG, thus the segmentation performance of LE-TREM is better than that of Weighted-EAG. 2. The segmentation performance of LE-TREM is more stable than that of Weighted-EAG. From Fig. 3 we can see that with the increase of noise density, the evaluation curve of Weighted-EAG changes greatly, which means the segmentation quality is greatly affected by noise. On the contrary, the evaluation curve of LE-TREM is more stable, which means the segmentation

4.2. Evaluating experiments We performed our experiments on bacteria images with different level additive salt and pepper noises. Different levels of salt and pepper noises are added to original bacteria image. To cope with the random nature of noise, for each noise level five sample images are generated separately. Thus five test images become one test group. For each group LE-TREM will be performed on these noisy images and then five RUMA values will be obtained. The final RUMA value of the group will be their average. In order to describe the performance of LETREM we compare the segmentation performance of LE-TREM with G-TREM. EAG method may often obtain incorrect Llow or Lhigh value thus we

Fig. 3. Performance curves of LE-TREM and Weighted-EAG.

2940

C. Yan et al. / Pattern Recognition Letters 24 (2003) 2935–2941

Table 1 One group of test data Noise density

0.0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Weighted-EAG

Llow ¼ 0 Lhigh ¼ 22 Threshold ¼ 23 RUMA of A ¼ 0:1320

0 41 42 0.1024

0 81 55 0.0656

0 82 55 0.0608

0 83 84 0.0240

0 84 85 0.0535

0 255 92 0.1861

0 255 92 0.1854

0 255 92 0.1879

LE-TREM

a ¼ 0:88 Threshold ¼ 70 RUMA of A ¼ 0:0153

0.88 70 0.0156

0.88 70 0.0158

0.88 70 0.0127

0.85 70 0.0144

0.84 70 0.0094

0.84 70 0.0104

0.85 70 0.0079

0.85 70 0.0036

performance is more stable and less affected by noise. Table 1 gives one group of test data. From Table 1 we can also see that in LE-TREM the threshold is stable while in Weighted-EAG the threshold changes greatly. 4.4. Segmentation on real images Further experiments are performed here on real infrared images. Fig. 4(a) is an infrared image of a power station. Weighted-EAG and LE-TREM are

performed on Fig. 4(a) separately. Fig. 4(b) is the transition region extracted by Weighted-EAG and Fig. 4(c) is the corresponding segmentation result. From Fig. 4(b) we can see that only small area of the transition region have been extracted and their location deviate from the real objects. Deviation of transition region results in deviation of threshold and finally bad segmentation quality. Fig. 4(d) is the transition region extracted by LE-TREM with 7 · 7 neighbor window. We can see the transition regions have been well extracted and cover around the objects accurately. Fig. 4(e) is the final segmentation obviously better than Fig. 4(c).

Fig. 4. Transition region based segmentation of real infrared image by LE-TREM and Weighted-EAG: (a) original power station infrared image, (b) transition region extracted by Weighted-EAG, (c) segmentation based on (b), (d) transition region extracted by LETREM, and (e) segmentation based on (d).

C. Yan et al. / Pattern Recognition Letters 24 (2003) 2935–2941

5. Properties of the local entropy-based transition region extraction method

2941

will be a promising method for transition region extraction and transition region based segmentation.

From the above scheme we can summarize the properties of LE-TREM as follows: Acknowledgements 1. Robustness. Gradient-based methods are much sensitive to noise. Transition region may hardly be extracted because of Llow > Lhigh or multiple peaks of EAG curve. Local entropy demonstrates the variance of grayscale in local neighborhood. It computes the variance of grayscale, but not the absolute difference. Thus local entropy is a better measure than gradient for transition region extraction and that is the base of our methodÕs robustness. From Fig. 3 we can also see that LE-TREM is more stable and better than Weighted-EAG method. 2. Accuracy. Gradient-based methods will result in deviation of the transition region from the object. Local entropy essentially describes the properties of the transition region. Hence the extracted transition region will surely cover around the object. Accurate transition region will obtain correct segmenting threshold and will finally assure the quality of segmentation. 3. Effectiveness. In our method only local entropy needs to be calculated. The total method is simple but very effective. 4. Generalization. Our method cannot only be applied to medical images but also other source of images.

6. Conclusions In this paper we present a novel local entropybased method for transition region extraction. By analyzing the properties of the transition region we found that local entropy is better than gradient to measure these properties. Gradient-based methods are sensitive to noise and will result in incorrect extraction of transition region and finally bad segmentation result. Local entropy essentially describes the variance of grayscale in transition region. Performance evaluation experiments demonstrate that LE-TREM significantly outperforms the traditional gradient-based method. LE-TREM

This work was supported by the National Natural Science Foundation of PR China (no. 60135020).

References Gerbrands, J.J., 1988. Segmentation of noise images. Ph.D. dissertation, Delft University, The Netherlands. Grazzini, J., Turiel, A., Yahia, H., 2002. Entropy estimation and multiscale processing in meteorological satellite images. In: Proc. of ICPRÕ02, Quebec City (Canada), pp. 11–15. Groenewald, A.M., Barnard, E., Botha, E.C., 1993. Related approaches to gradient-based thresholding. Pattern Recognition Lett. 14, 567–572. Le, N., 2000. Study on recognition technology of workpieceÕs serial number and its practice. Ph.D. dissertation of Shanghai Jiaotong University (in Chinese). Liang, X.J., Le, N., 2001. Transition region algorithm based on weighted gradient operator. Image Recognition Automat. 1, 4–7 (in Chinese). Pun, T., 1980. A new method for gray-level picture thresholding using the entropy of the histogram. Signal Process. 2, 223– 237. Shannon, C.E., 1948. A mathematical theory of communication. Bell System Tech. J. 27, 379–423. Valverde, F.L., Guil, N., Munoz, J., Nishikawa, R., Doi, K., 2001. An evaluation criterion for edge detection techniques in noisy images. In: Proceedings of International Conference on Image Processing, vol. 1, pp. 766 –769. Weszka, J.S., Rosenfeld, A., 1979. Histogram modification for threshold selection. IEEE Trans. Systems Man Cybernet. 9 (1), 38–52. Yang, L.R., 1995. A supervised approach to the evaluation of image segmentation methods. Computer Anal. Image Pattern 970, 759–765. Ye, Y.D., 1999. Study on monitor system of rotary machine tool wearing based on computer vision. Ph.D. dissertation of Shanghai Jiaotong University (in Chinese). Zhang, Y.J., 1996. A survey on evaluation methods for image segmentation. Pattern Recognition 29 (8), 1335–1346. Zhang, Y.J., Gerbrands, J.J., 1991. Transition region determination based thresholding. Pattern Recognition Lett. 12, 13–23. Zimmer, Y., Tepper, R., Akselrod, S., 1996. A two-dimensional extension of minimum cross entropy thresholding for the segmentation of ultrasound images. Ultrasound Med. Biol. 22 (9), 1183–1190.