An Active Contour Method Using Harmonic Mean

2 downloads 0 Views 616KB Size Report
An Active Contour Method Using Harmonic Mean. Amir Razi, Wei-Wei Wang, Xiang-Chu Feng. School of Mathematics and Statistics. Xidian University. Xi'an ...
,(((,QWHUQDWLRQDO&RQIHUHQFHRQ6LJQDODQG,PDJH3URFHVVLQJ

An Active Contour Method Using Harmonic Mean Amir Razi, Wei-Wei Wang, Xiang-Chu Feng School of Mathematics and Statistics Xidian University Xi'an, China e-mail: [email protected]; [email protected]; [email protected] Abstract—Active Contour method has been shown very effective in detecting the contour of region(s)-of-interest(ROI) and is widely used in image processing and computer vision. In this work, we aim to improve the performance of Zhang’s method in detecting boundary of ROIs. Specifically, we will generalize the CV energy functional and give a new special case. The new energy functional penalize the approximation error (of the original image by a constant) weaker than the CV energy functional, which can better preserve the subtle difference between the intensity of ROIs and that of the background, thus can effectively segment images, especially images with low contrast. The resulted two-phase constant approximation is the harmonic mean instead of the arithmetic mean. Based on this, we improve Zhang’s active contour method by using the harmonic mean. We apply the proposed method on synthetic and real images and the segmentation results show that the proposed method is robust to noise and intensity contrast. Additionally, the proposed method is less sensitive than Zhang’s method to parameter selection.

݃ሺȁ‫ܫ׏‬ȁሻ ൌ

߲߶ ߲‫ݐ‬

‫߶׏‬

ൌ ݃ȁ‫߶׏‬ȁ ቀ݀݅‫ ݒ‬ቀȁ‫߶׏‬ȁቁ ൅ ߙቁ ൅ ‫݃׏‬Ǥ ‫߶׏‬ǡ

(3)

where ߙ acts as a balloon force, which is responsible for shrinking or expanding the active contour. The GAC model is effective in locating the contour of ROI if the ROI has well-defined edges. However, the method is inefficient if the boundary of ROI is weak and the balloon force ߙis difficult to design. B. Chan-Vese (CV) Model Chan-Vese (CV) [12] model gives a piecewise constant approximation of Mumford-Shah (MS) [13] problem by minimizing the following energy functional: ‫ ܸܥ ܧ‬ൌ ‫ ݊݅׬‬ሺ‫ܥ‬ሻ ȁ‫ܫ‬ሺ‫ݔ‬ሻ െ ܿͳ ȁʹ ݀‫ݔ‬

INTRODUCTION

൅‫ ݐݑ݋׬‬ሺ‫ܥ‬ሻ ȁ‫ܫ‬ሺ‫ݔ‬ሻ െ ܿʹ ȁʹ ݀‫ݔ‬ǡ‫ א ݔ‬πǡ

Image segmentation aims to partition the domain of an image into disjoint regions so that each region has certain visual meaning. It has been widely used in image processing and computer vision. Recently, the active contour models (ACM) [1], [2-9] which drive a curve towards the contour of the region(s)-of-interest(ROI) through surface evolution and geometric flow, is extensively studied and applied successfully. The level set method proposed by Osher and Sethian [10] is widely used in solving the problems of surface evolution. The most related works are reviewed as follow.

(4)

where c1 and c2 are constant approximations of the original images I inside and outside of the evolving active contour. Introducing a level set function ߶ሺ‫ݔ‬ሻ such that ‫ ܥ‬ൌ ሼ‫߳ݔ‬πǣ ߶ሺ‫ݔ‬ሻ ൌ Ͳሽ , ݅݊‫݁݀݅ݏ‬ሺ‫ܥ‬ሻ ൌ ሼ‫߳ݔ‬πǣ ߶ሺ‫ݔ‬ሻ ൐ Ͳሽ and‫݁݀݅ݏݐݑ݋‬ሺ‫ܥ‬ሻ ൌ ሼ‫߳ݔ‬πǣ ߶ሺ‫ݔ‬ሻ ൏ Ͳሽ, the energy functional in (4) can be rewritten in the following form: ‫ ܸܥ ܧ‬ൌ ‫׬‬8 ȁ‫ܫ‬ሺ‫ݔ‬ሻ െ ܿͳ ȁʹ ‫ܪ‬ሺ߶ሺ‫ݔ‬ሻሻ݀‫ݔ‬ ൅‫׬‬8 ȁ‫ܫ‬ሺ‫ݔ‬ሻ െ ܿʹ ȁʹ Ǥ ሺͳ െ ‫ܪ‬൫߶ሺ‫ݔ‬ሻ൯ሻ݀‫ݔ‬

(5)

where H(¸) is the Heaviside function. For a fixed level set function, the constants c1and c2that minimize the energy functional in (5) are the arithmetic mean intensities of the original image inside and outside the active contour:

A. The GAC Model [11] Let be a bounded open subset of ܴʹ and ‫ܫ‬ǣ ሾͲǡ ܽሿ ൈ ሾͲǡ ܾሿ ՜ ܴʹ be a given image. Let ‫ܥ‬ሺ‫ݍ‬ሻǣ ሾͲǡͳሿ ՜ ܴʹ be a parameterized planar curve in πǡ with the arc length parameter q.The GAC model minimizes the following energy functional:

ܿͳ ሺȰሻ ൌ

ͳ

‫ ܥܣܩ ܧ‬ሺ‫ܥ‬ሻ ൌ ‫݃ Ͳ׬‬൫ห‫ܫ׏‬൫‫ܥ‬ሺ‫ݍ‬ሻ൯ห൯ȁ‫ ܥ‬Ԣ ሺ‫ݍ‬ሻȁ݀‫ݍ‬ǡ(1)

ܿʹ ሺȰሻ ൌ

where ‫ ܫ׏‬is the gradient of image I (over the curve C),‫ ܥ‬Ԣ ሺ‫ݍ‬ሻ is the tangent vector of the curve C. g is an edge indicator function defined by

978-1-5090-2377-6/16/$31.00 ©2016 IEEE

(2)

where ‫ ߪܩ‬is a Gaussian kernel function with ߪ as the standard deviation. The resulted Euler-Lagrange equation with level set formulation can be stated as follows (with a minor modification by introducing a constant velocity ߙ:

Keywords-image segmentation; active contour; chan-vese model; level set, signed pressure force

I.

ͳ ͳ൅ȁ‫ܫכ ߪܩ׏‬ȁʹ

‫׬‬π ‫ܫ‬ሺ‫ݔ‬ሻǤ‫ܪ‬ሺ߶ ሻ݀‫ݔ‬ ‫׬‬π ‫ܪ‬ሺ߶ሻ݀‫ݔ‬

,

‫׬‬π ‫ܫ‬ሺ‫ݔ‬ሻǤሺͳെ‫ܪ‬ሺ߶ሻሻ݀‫ݔ‬ ‫׬‬π ሺͳെ‫ܪ‬ሺ߶ሻሻ݀‫ݔ‬

(6) ,

(7)

Introducing a length and an area term into the energy functional in (5), the resulted Euler-Lagrange equation can be stated as follows:

287

߲߶ ߲‫ݐ‬

‫߶׏‬

ൌ ߜሺ߶ሻ ቂߤ‫ ׏‬ቀȁ‫߶׏‬ȁቁ െ ‫ ݒ‬െ ሺ‫ ܫ‬െ ܿͳ ሻʹ ൅ ሺ‫ ܫ‬െ ܿʹ ሻʹ ቃǡ

instead of the arithmetic mean to give a two-phase approximation of the original image. Then we explain why the harmonic mean is better than the arithmetic mean to use in Zhang’s model if the original image has low contrast. Finally we present our segmentation method. The energy functional in (5) can be written in a general form:

(8)

where ߤ ൒ Ͳǡ O ൒ Ͳ are fixed parameters, with ߤcontrollingsmoothness of the zero level set and increasing the evolving velocity of the level set function;ߜሺǤ ሻ is the Dirac function. is the gradient operator. The CV model has been successfully used in detecting the contour of objects without well-defined edges and even the interior contour of two-phase segmentation with the assumption that each image region is homogeneous. However, the CV model does not work well for the images with inhomogeneous intensity.

ʹ

‫ ܧ‬ൌ ‫ ׬‬ቀˆ൫ ሺšሻ൯ െ ˆሺ…ͳ ሻቁ ሺԄሺšሻሻ†š ʹ

൅‫ ׬‬ቀˆ൫ ሺšሻ൯ െ ˆሺ…ʹ ሻቁ ሺͳ െ ൫Ԅሺšሻ൯ሻ†š

where f is a differentiable, one-to-one function. If we take f to be the identity function, i.e., ˆሺšሻ ൌ š, the above energy reduces to the CV formulation in equation (5), and minimizing equation (5) with respect to c1 and c2 yields the arithmetic mean in equations (6) and (7). If we take f to be ͳ the reciprocal function, i.e., ˆሺšሻ ൌ , then minimizing š equation (11) with respect to c1 and c2 yields the following harmonic mean:

C. Zhang’s Model Based on equations (3) and (8), Zhang et al. [14] propose the following evolution equation for the level set function: ߲Ȱ ߲‫ݐ‬

(9)

ൌ ‫݂݌ݏ‬൫‫ܫ‬ሺ‫ݔ‬ሻ൯ȁ‫׏‬Ȱȁ.

where ‫݂݌ݏ‬൫‫ܫ‬ሺ‫ݔ‬ሻ൯is a region function defined by ‫݂݌ݏ‬൫‫ܫ‬ሺ‫ݔ‬ሻ൯ ൌ

ܿ ൅ܿ ‫ܫ‬ሺ‫ݔ‬ሻെ ͳ ʹ ʹ ǡ ܿ ൅ܿ ݉ܽ‫ ݔ‬ቀቚ‫ܫ‬ሺ‫ݔ‬ሻെ ͳ ʹ ቚቁ

‫ א ݔ‬π

(10)

‫׬‬π ‫ܪ‬ሺ߶ ሻ݀‫ݔ‬

ܿͳ ሺȰሻ ൌ

ʹ

In equation (10), c1 and c2is respectively the mean intensity in side/outside the active contour, and can be computed by the equation (6) and (7). Rewriting equation (9) in the parametric active contours † formulation, we have ൌ ‫݂݌ݏ‬൫‫ܫ‬ሺ‫ݔ‬ሻ൯ܰ , where ܰ is the unit †– normal vector. Then ‫݂݌ݏ‬൫‫ܫ‬ሺ‫ݔ‬ሻ൯ܰ can be explained as asigned pressure force (SPF) defined in [15].The region function •’ˆ൫ ሺšሻ൯ has valuesin the range [-1,1] that are smaller within the region(s)-of-interest(ROI). The role of ‫݂݌ݏ‬൫‫ܫ‬ሺ‫ݔ‬ሻ൯ is modulating the sign of the pressure force using region information so that the contour shrinks when it is outside the object of interest and expands when it is inside the object. In the evolution process of the level set function, Zhang propose to use Gaussian filtering to smooth the level set function. The solution algorithm proposed by Zhang is simpler than GAC and CV model, and it shows better performance than the previous methods. However, when the image has very low contrast, or the intensity of the ROI is very close to that of the background, Zhang’s method fails to detect the weak boundary of the ROI(as show in Figure 2(c)). In this work, we aim to improve the performance of Zhang’s method in detecting weak boundary of ROIs. Specifically, we will generalize the CV energy functional and give a new special case. The new energy functional penalize the approximation error (of the original image by a constant) weaker than the CV energy functional, which can better preserve the subtle difference between the intensity of ROIs and that of the background, thus can effectively segment images with low contrast. II.

(11)

ܿʹ ሺȰሻ ൌ

,

‫׬‬π ሺͳെ‫ܪ‬ሺ߶ሻሻ݀‫ݔ‬ ‫׬‬π

‫ܨܲܵܪ‬൫‫ܫ‬ሺ‫ݔ‬ሻ൯ ൌ

(12)

ͳ Ǥሺͳെ‫ܪ‬ሺ߶ሻሻ݀‫ݔ‬ ‫ܫ‬ሺ‫ ݔ‬ሻ

,

‫ܫ‬ሺ‫ݔ‬ሻെ‫ܪ‬ ݉ܽ‫ ݔ‬ሺȁ‫ܫ‬ሺ‫ݔ‬ሻെ‫ܪ‬ȁሻ

ǡ‫ א ݔ‬π

‫ܪ‬ൌ

ʹܿͳ ܿʹ ܿͳ ൅ܿʹ

(14)

(15)

Replacing the spf(x) in Zhang’s model equation (9) with the HSPF defined in equation (14), we have ൌ ‫ܨܲܵܪ‬൫‫ܫ‬ሺ‫ݔ‬ሻ൯ȁ‫߶׏‬ȁǡ ‫߳ݔ‬πǤ

As did in [6], we initialize the level set function ߶by

288

(13)

where His the harmonic mean ofc1 and c2defined in equations (12) and (13):

߲‫ݐ‬

We will first extend the CV energy functional and give a new special case, which leads to using the harmonic mean,

ͳ Ǥ‫ܪ‬ሺ߶ ሻ݀‫ ݔ‬ ‫ܫ‬ሺ‫ ݔ‬ሻ

where c1 and c2 is respectively the harmonic mean intensity inside/outside the active contour. Because ȁ‫ܫ‬ሺ‫ݔ‬ሻ െ ܿͳ ȁ and ȁ‫ܫ‬ሺ‫ݔ‬ሻ െ ܿʹ ȁ are usually greater than one for inhomogeneous two-phase images while ͳ ͳ ͳ ͳ ቚ െ ቚ andቚ െ ቚare usually less than one, the square ‫ܫ‬ሺ‫ݔ‬ሻ ܿͳ ‫ܫ‬ሺ‫ݔ‬ሻ ܿʹ function enlarges the former ones while reduces the later ones. So CV model penalizes the approximation error much stronger than the errors of the reciprocals. If an image has very low contrast, or the intensity of the ROI is very close to that of the background, then minimizing the CV energy functional essentially results in c1close to c2and thus a very small SPF in Zhang’s model, which makes the active contour almost stationary and can’t evolve to the expected boundary of the ROI. The experiment results in Figure2(c) confirms this observation. Based on the discussion above, we define a new SPF function, called HSPF as follows:

߲߶

THE PROPOSED METHOD

‫׬‬π

(16)

െߩ‫߳ݔ‬πͲ െ ߲πͲ ǡ ߶ሺ‫ݔ‬ǡ ‫ ݐ‬ൌ Ͳሻ ൌ ൝ Ͳ‫߲߳ݔ‬πͲ ǡ  ߩ‫߳ݔ‬π െ πͲ ǡ

Figure 4 shows the detected contour of the ROI “star” in a noisy image. The GAC method is sensitive to noise and fails to detect the contour of the ROI. The proposed method, Zhang’s method and Chan-Vese method are robust to noise and successfully detected the contour of the ROI. On this image, the proposed method takes less iteration and time than Zhang’s method and Chan-Vese method.

(17)

We also use Gaussian filtering to smooth the level set function. The process of level set evolution according to equation (16) is summarized in the following algorithm: Algorithm1HSPF image segmentation Algorithm a. b. c. d. e.

Calculate ܿͳ ሺΦሻ and ܿʹ ሺΦሻ using equation (12) and equation (13), respectively. Develop the level set function according to equation (16). Let Φ ൌ ͳ‹ˆΦ ൐ Ͳǣ ‫݁ݏ݅ݓݎ݄݁ݐ݋‬ǡ ߔ ൌ െͳǤ Regularize the level set function with a Gaussian filter, i.e. =Φ ‫ ߪܩ כ‬Ǥ Check whether the evolution of the level set function has converged. If not, return to stage b.

III.

EXPERIMENTAL RESULT ANALYSIS

The proposed algorithm is implemented using MATLAB 2008 in Windows 7 environment on 2.40 GHz Intel Corei32370M CPU, 2 GB Ram PC. In this sector we applied our proposed technique on different synthetic and real images. The parameter values of σ and α were set according to the requirement of images. Figure 1 illustrates the segmentation results of synthetic and real images by the proposed method. The first row shows the original images with the initial contours. The second row shows the detected contours of ROI by the proposed method. The values of the parameter σ and α are chosen according to the image. The proposed method can successfully detect the contour of interested objects. Figure 2 shows the effectiveness of the proposed method for low contrast images. Figure 2(a) shows the original image with background intensity 70, and two separated objects with intensity 60. It is visually hard to identify the objects from the background. Figure 2(b) shows the initial contour. Figure 2(c) shows the detected contour by Zhang’s method with σ=0.6 and Figure 2(d) shows the detected contour by the proposed method with σ=0.6. Zhang’s method fails to detect the boundary of the objects while the proposed method can detect the exact contours of the objects. This shows that the proposed method is more robust than Zhang’s method to low contrast of intensity. Figure 3 shows the robustness of the proposed method to intensity in homogeneity. The original “bush” image has inhomogeneous intensity on both the ROI and the background. Figure 3 shows the detected contour of the ROI by the proposed method ((a) with σ=1 and α=6), Zhang’s method((b) with σ=1 and α=6), GAC method((c) with σ=1 ). Due to the cluttered background, GAC fails to detect the contour of the ROI by using edge information. The proposed method and Zhang’s method can detect the contour of the ROI even if the image has great inhomogeneous intensity on both the ROI and the background. This shows that the proposed method is robust to intensity in homogeneity. Moreover, to obtain the result, the proposed method takes the less iteration and time than Zhang’s method.

 Figure 1. Detected contours of ROI by the proposed method. The first row shows from left to right the original images with the initial contours. The second row shows detected contours of ROI by the proposed method.

 Figure 2. Segmentation results of an image with very low contrast in intensity. (a) The original image with background intensity 70, and object intensity 60. The intensity contrast between the objects and the background is too low to segment it visually. (b) the initial contour. (c) detected contour by Zhang’s method with σ=0.6. (d) detected contours by the proposed method with σ=0.6.

Figure 5 compares the proposed method and Zhang’s method with different values of σ. The first row shows the detected contour (from left to right) by the proposed method with σ taking a set of increasing values: 0.2,0.5,1,1.5,2 and 2.5. The second row shows the detected contour (from left to right) by Zhang’s method with σ taking the same set of values. The results indicate that the proposed method is less sensitive than Zhang’s method to the choice of the smoothing parameter σ. Figure 6 shows the detected contour of the ROI “synthetic” in a noisy image. The first row shows from left to right the initial contour for the proposed model, Zhang’s method and GAC method. GAC method is sensitive to noise and fails to detect the contour of the ROI. The proposed method and Zhang’s method are robust to noise and

289

successfully detected the contour of the ROI. On this image, the proposed method takes less iteration and time than Zhang’s method and GAC method.

taken by the proposed method, Zhang’s method and GAC method for segmenting some images in Table1. For most images, the proposed method takes less time than others. TABLE I. ITERATIONS AND CPU TIME (IN SECONDS) BY THE PROPOSED METHOD, ZHANG’S METHOD AND GAC METHOD



Figure 3. Segmentation results of an image with intensity in homogeneity. (a) the proposed method, (b) Zhang’s method and (c) GAC method.

 Figure 6. Detected contour of ROI of the Synthetic noisy image, size 201x202 The first row shows from left to right the original image with the initial contour. The second row shows from left to right detected contour of ROI by the proposed method, Zhang’s method and GAC method at σ=1 respectively.

IV.



CONCLUSION

In this work, we generalized the CV energy functional and gave a new special case. The resulted two-phase constant approximation is the harmonic mean instead of the arithmetic mean. Based on this, we improved Zhang’s active contour method by using the harmonic mean. Experiments on synthetic and real images show that the proposed method is robust to noise, intensity contrast, and is less sensitive than Zhang’s method to parameter selection.

Figure 4. Detected contour of ROI of the noisy star image, size 90x98. (a) the proposed method with σ=2, (b) Zhang’s method with σ=2, (c) GAC method with σ=2, and (d) CV method.

ACKNOWLEDGMENT This work was supported by the National Science Foundation of China (No. 61472303, No. 61271294, No. 61379030, No. 61362029) and the Fundamental Research Funds for the Central Universities (NSIY21). REFERENCES [1] [2] [3]



[4]

Figure 5. Detected contours by the proposed method and Zhang’s method with σ taking a set of increasing values: 0.2,0.5,1,1.5,2 and 2.5.

[5]

To show the efficiency of the proposed method, we present the number of iterations and CPU time (in seconds)

290

M. Kass, A. Witkin and D. Terzopoulos, “Snakes: active contour models”, Int. J. Comput. Vision,vol.1(4), pp.321-331, 1987. V. Caselles, R. Kimmel and G. Sapiro, “Geodesic active contours”, International Journal of Computer Vision, vol. 22(1), pp. 61-79, 1997. N. Paragios and R. Deriche, “Geodesic active contours and level sets for detection and tracking of moving objects”, IEEE Transaction on Pattern Analysis and Machine Intelligence, vol. 22 pp. 1-15, 2000. G.P. Zhu, S.Q. Zhang, Q.S. Zeng and C.H. Wang, “Boundary-based image segmentation using binary level set method”, Optical Engineering vol. 46, 2007, 050501 L. A. Vese and T. F. Chan, “A multiphase level set framework for image segmentation using the Mumford–Shah model”, International Journal of Computer Vision, vol. 50, pp. 271-293, 2002.

[6]

C. M. Li, C. Y. Xu, C. F. Gui and M. D. Fox, “Level set evolution without re-initialization: a new variational formulation”, in IEEE Conference on Computer Vision and Pattern Recognition, San Diego, pp.430-436, 2005. [7] J. Lie, M. Lysaker, and X. C. Tai, “A binary level set model and some application to Mumford Shah image segmentation”, IEEE Transaction on Image Processing, vol. 15, pp.1171-1181, 2006. [8] C. M. Li, C. Kao, J. Gore and Z. Ding, “Implicit active contours driven by local binary fitting energy”, in IEEE Conference on Computer Vision and Pattern Recognition, 2007. [9] B. Wang, X. Gao and D. Tao, “A nonlinear adaptive level set for image segmentation”, IEEE Trans. Cybern., vol. 44(3), pp. 418-428, 2014. [10] X.Bresson, S.Esedoglu, P.Vandergheynst, J.P.Thiran and S.Osher, “Fastglobal minimization of the active contour/snake model”, Journal of Mathematical Imaging and Vision, vol. 28(2), pp. 151-167,2007.

[11] V. Caselles, R. Kimmel and G. Sapiro, “Geodesic active contours”, in Processing of IEEE International Conference on Computer Vision 95, Boston, MA, pp.694-699,1995. [12] T. Chan and L. Vese, “Active contours without edges”, IEEE Transaction on Image Processing,vol. 10(2), pp.266-277,2001. [13] D. Mumford and J. Shah, “Optimal approximation by piecewise smooth function and associated variational problems”, Communication on Pure and Applied Mathematics,vol. 42, pp. 577585, 1989. [14] K. Zhang, L. Zhang and H. Song, “Active contours with selective local or global segmentation: a new formulation and level set method”, Image Vis. Comput., vol. 28(4), pp. 668-676, 2010. [15] C. Y. Xu, A. Y. Jr. and J.L. Prince, On the relationship between parametric and geometric active contours, in Processing of 34th Asilomar Conference on Signals Systems and Computers, pp. 483– 489, 2000.

291

Suggest Documents