An Improved Active Contour Model Based on Local Information

Abstract

In view of the problem that the local active contour model is difficult to achieve image segmentation accurately and quickly, an improved image segmentation method based on Local Image Fitting (LIF) is proposed. Firstly, the local median is used as the fitting center of the curve to enhance the robustness of the model to noise. Secondly, a minimized Laplacian of gaussian energy (Log) term is introduced, and the Log operator is used to smooth the image and enhance the edges of the image. Finally, the minimized Log energy term is combined with the LIF, which together drives the curve to the boundary. Experimental results show that the Precision rate, Recall rate and Dice Similarity Coefficient of this model are closest to 1. Compared with other main region-based models, the image segmentation accuracy of this method is significantly higher than that of other algorithms, which improves the anti-noise performance and image segmentation speed.

Share and Cite:

Chen, W.Q., Liu, C.J. and Pan, B. (2021) An Improved Active Contour Model Based on Local Information. Open Access Library Journal, 8, 1-10. doi: 10.4236/oalib.1107187.

1. Introduction

Image segmentation is still a challenging work at present; it has great significance for the understanding and analysis of images. Active contour model is a very successful image segmentation method, which is divided into parametric active contour model [1] [2] [3] [4] and geometric active contour model [5] - [10]. The difference between the two lies in whether the curve is constructed by using the parametric equation of display or the implicit equation of level set method.

Currently, the Piecewise Constant (PC) model [11] based on global information (often referred to as C-V model), Region-Scalable Fitting (RSF) model [12] and Local Image Fitting (LIF) model [13] based on local information are the three types of models most widely used. In C-V model, the gray level of the target and background is assumed to be constant. Due to over-reliance on the global average, this assumption will lead to the wrong segmentation of the evolution curve in the segmentation of the image with uneven gray level. The variable intensity fitting RSF model based on the local area of the image overcomes the deficiency of the global model in the segmentation of non-uniform gray scale images. However, it can be seen from the segmentation results that the over-dependence on the local information of the image makes it more sensitive to the initialization and noise. The Local Image Fitting (LIF) model proposed by Zhang et al. [13] is also a model using local information for curve evolution. Compared with RSF model, the convolution calculation efficiency of LIF model is higher, but it also has the disadvantage of being sensitive to initialization.

On the basis of the above models, the researchers put forward many improved models. Liu et al. [14] proposed a ternary variational level set model including gradient regularization and function regularization based on C-V, and designed an alternate minimization algorithm to solve the model effectively. Based on the RSF model, the fitting center is defined in the Local Pre-Fitting (LPF) energy model of Ding et al. [15], which greatly improves the curve evolution rate. Han et al. [16] proposed a new Global Weighted Function (GWSPF) and a new Locally Weighted SPF (LWSPF) active contour model. Gao et al. [17] proposed a robust convex active contour model for texture segmentation, which has good robustness to complex textures.

Based on LIF model, an improved active contour model is proposed in this paper. First, we replace the mean value of the LIF model with the median intensity of the local area as the fitting center to enhance the robustness to noise. Secondly, the energy equation about the LOG operator is established to minimize it, which can enhance the edge information while smoothing the uniform region. Finally, the minimized Log energy term is combined with the LIF term to drive the curve to the boundary. The experimental results show that the segmentation accuracy and speed of the proposed model are significantly improved and the segmentation effect is good.

2. Background

2.1. RSF Model

Let Ω R 2 , for a given image I ( x , y ) : Ω R , The closed contour C is constructed by the level set function ϕ : Ω R ,

In order to make full use of local image information, Li et al. [12] constructed the following energy function:

E R S F ( f 1 , f 2 , ϕ ) = λ 1 [ K σ ( x y ) | I f 1 | 2 H ε ( ϕ ( y ) ) d y ] d x + λ 2 [ K σ ( x y ) | I f 2 | 2 ( 1 H ε ( ϕ ( y ) ) ) d y ] d x (1)

In Equation (1), K σ is the Gaussian kernel function, σ controls the size of the kernel function.

K σ = 1 ( 2 π ) n / 2 σ n e | x 2 | / 2 σ 2 (2)

f 1 , f 2 is the mean intensity inside and outside the locally approximated curve, and the expression is as follows:

f 1 ( x ) = K σ ( x ) [ H ε ( ϕ ) I 0 ( x ) ] K σ ( x ) H ε ( ϕ ) f 2 ( x ) = K σ ( x ) [ ( 1 H ε ( ϕ ) ) I 0 ( x ) ] K σ ( x ) ( 1 H ε ( ϕ ) ) (3)

H ε ( ϕ ) is the smooth approximation function of Heaviside function H ( ϕ ) , δ ε ( ϕ ) is Dirac function, ε is a constant.

H ε ( ϕ ) = 1 2 [ 1 + 2 π arctan ( ϕ ε ) ] δ ε ( ϕ ) = 1 π ε ε 2 + ϕ 2 (4)

In general, λ 1 = λ 2 = 1 , the curve evolution equation obtained through curve evolution theory is as follows:

ϕ t = δ ε ( ϕ ) K σ ( | I f 1 ( x ) | 2 | I f 2 ( x ) | 2 ) (5)

Since the kernel function K σ , f 1 , f 2 is the weighted average of the intensity of the image in the Gaussian window inside and outside the curve, the high-precision segmentation of the image with uneven intensity can be achieved. However, if the initial contour is not set properly, the evolution rate of the curve may drop sharply and eventually fall into the local minimum. This means that different positions of the initial contour may lead to different segmentation results, and inappropriate initial contour may lead to segmentation failure.

2.2. Local Image Fitting (LIF) Model

Zhang et al. [13] also used the local information of the image to propose a LIF model, and the energy functional is defined as follows:

E L I F ( m 1 , m 2 , ϕ ) = 1 2 Ω | I 0 I L F I | 2 d x (6)

I L F I is defined as follows:

I L F I = m 1 H ε ( ϕ ) + m 2 ( 1 H ε ( ϕ ) ) (7)

where m 1 ( x ) , m 2 ( x ) is calculated as follows:

{ m 1 ( x ) = a v e r a g e ( I 0 ( x ) ( { x Ω | ϕ < 0 } W k ( x ) ) ) m 2 ( x ) = a v e r a g e ( I 0 ( x ) ( { x Ω | ϕ > 0 } W k ( x ) ) ) (8)

Finally, its evolution equation is as follows:

ϕ t = δ ε ( ϕ ) ( I I L F I ) ( m 1 m 2 ) (9)

In LIF model, m 1 ( x ) and m 2 ( x ) can be viewed as the average of the image strength in the window. Thus, m 1 ( x ) and m 2 ( x ) are the same as f 1 ( x ) and f 2 ( x ) in the RSF model. By introducing local image information, LIF model can segment images with uneven intensity, calculating only two reels at a time, which is half of that of RSF model, so the calculation cost is lower. However, with the introduction of localization information, the model becomes more sensitive to the location of the initial contour and is prone to fall into the local minimum.

2.3. LOGF Model

Ding et al. [18] proposed an optimized Laplacian of gaussian (Log) energy for the sensitivity of the local information active contour model to the initial contour. Its model is as follows:

E L o g ( L ( x , y ) ) = Ω g ( | I | ) × L 2 + ( 1 g ( | I | ) ) × ( L C × Δ ( G σ I ) ) 2 d x d y (10)

where C is a constant, Δ ( G σ I ) is Laplacian of gaussian, defined as Equation (11).

Δ ( G σ I ) = ( 2 G σ ( x , y ) x 2 + 2 G σ ( x , y ) y 2 ) I (11)

E L o g is the energy function of the Log of image, when E L o g declines, g ( | I | ) × L 2 will drive L to 0, which helps to smooth the regions. When approaching the target edge, ( 1 g ( | I | ) ) × ( L C × Δ ( G σ I ) ) 2 will drive L to close to Δ ( G σ I ) , when C > 1, it can enhance the target edges.

Its evolution equation is as follows:

L t = g ( | I | ) L ( 1 g ( | I | ) ) ( L C L ) (12)

3. The Proposed Model

In the LIF model, the fitting center is represented by the gray mean of images inside and outside the evolution curve. This method has poor robustness to noise points, and when there are many noise points in the image, the gray mean cannot accurately reflect the change of gray level of the image. In order to solve this problem, this paper uses the median value of grayscale of images inside and outside the evolution curve instead. When there are noise points in the image, the median value can guarantee the accuracy of the fitting center and better reflect the gray level change of the image area. The fitting center can be defined as:

{ f 1 ( x ) = m e d ( I 0 ( x ) ( { x Ω | ϕ < 0 } W k ( x ) ) ) f 2 ( x ) = m e d ( I 0 ( x ) ( { x Ω | ϕ > 0 } W k ( x ) ) ) (13)

In Equation (13), med() is the median operator. Because the noise point belongs to the mutation pixel point, it will have a great influence on the result when calculating with the mean value. However, the calculation of median does not need to calculate the specific values of all pixel points, so the median is more robust to noise points. Figure 1 shows the segmentation effect of the LIF model based on Equation (8) and Equation (13) on noisy images.

In Figure 1, (A) is the original image containing noise, (B) is the segmentation result based on Equation (8), and (C) is the segmentation result based on Equation (13). As can be seen from Figure 1, the segmentation results of LIF model based on Equation (8) show some small segmentation points, and the smoothness of the curve is not good, while the segmentation results based on Equation (13) are better.

Next, we propose the following model:

E = ω Ω L O H ε ( ϕ ) d x + 1 2 Ω | I I n | 2 d x (14)

I n = f 1 H ε ( ϕ ) + f 2 ( 1 H ε ( ϕ ) ) (15)

where f 1 , f 2 are calculated in Equation (13), L O is calculated by Equation (16).

L n + 1 = L n + Δ t 1 ( g ( | I | ) L n ( 1 g ( | I | ) ) ( L n C L n ) ) (16)

In order to make the curve evolve more stably and quickly, the length constraint term L ( ϕ ) and distance regularization term P ( ϕ ) are introduced into the model, L ( ϕ ) keeps the curve smooth, and P ( ϕ ) keeps the steady evolution of the level set function without the need for re-initialization.

L ( ϕ ) = μ Ω δ ε ( ϕ ) | ϕ | d x d y (17)

P ( ϕ ) = Ω 1 2 ( | ϕ | 1 ) 2 d x d y (18)

The final evolution equation is as follows:

ϕ t = δ ε ( ϕ ) ( I I n ) ( f 1 f 2 ) + ω δ ε ( ϕ ) L O + u δ ε ( ϕ ) d i v ( ϕ | ϕ | ) + v ( 2 ϕ d i v ( ϕ | ϕ | ) ) (19)

In this paper, the finite difference method is used to solve the differential Equation (19), the central difference method is used to approximate the partial derivatives in the spatial domain, and the forward difference method is used to approximate the partial derivatives in the time domain. The discrete form of Equation (19) is:

ϕ i , j n + 1 = ϕ i , j n + Δ t ( A i , j + B i , j + C i , j ) (20)

Figure 1. Comparison of LIF models based on Equation (8) and Equation (13).

where A i , j , B i , j and C i , j are calculated as follows:

{ A i , j = δ ε ( ϕ ) ( [ I f 1 H ε ( ϕ ) f 2 ( 1 H ε ( ϕ ) ) ] ( f 1 f 2 ) ) B i , j = ω δ ε ( ϕ ) L O C i , j = u δ ε ( ϕ ) ( ϕ i , j | ϕ i , j | ) + v ( 2 ϕ i , j d i v ( ϕ i , j | ϕ i , j | ) ) (21)

The segmentation steps of the above model can be summarized as the following steps:

Step 1: Initialize ϕ ( x , y , t = 0 ) = 0 , and set parameters.

Step 2: Calculate L O according to Equation (16), Calculate f 1 , f 2 according to Equation (13).

Step 3: Update ϕ according to Equation (20).

Step 4: Judge whether the curve evolution is stable. If so, stop iteration and update the contour to obtain segmentation results. If you are not satisfied, go to Step 2.

In addition, we used precision rate P, recall rate R and DICE Similarity Coefficient DSC [19] to quantitatively evaluate the performance of the model.

{ P = N ( S g S m ) N ( S m ) R = N ( S g S m ) N ( S g ) D S C = 2 N ( S g S m ) N ( S g ) N ( S m ) (22)

where S g represents the ground truth, and S m represents the area where the model solves. The closer the value of P is to 1, the better the image split. At P = 1 , it is stated that the solved area is the same as the real area, and the split result is the best. The same is true for R and DSC, where only approximately close to 1 represents the better segmentation effect.

4. Experimental Results and Analysis

In order to verify the validity of this algorithm, this section gives the model mentioned in this article and the image segmentation experimental results of this model. In this model, ϕ 0 is set to a small constant function ϕ 0 = c 0 . When calculating L O , Δ t 1 = 0.05 , C = 5 , number of iterations n = 100 . When evolving the curve ϕ : c 0 = 1 ; u = 0.001 × 255 × 255 ; v = 2 ; ε = 3 ; Δ t = 0.1 , ω = 15 . The window size of K σ is k = 3 , and the standard deviation is σ = 2 . These parameters can be adjusted for different images.

The four original images in Figure 2 were segmented by different methods, and the segmentation results were shown in Figures 3-6. By Figures 3-6 shows, this method can effectively the original image is divided into different areas, image segmentation and edge smooth, verified the effectiveness of the method of image segmentation, and many mistakes occur in contrast method dividing point, lead to loss of some important information, obtained the “split” or “under segmentation results. The model obtained ideal segmentation results for all four images, followed by LOGF model, which correctly segmented three images, while LIF and RSF model had poor effect.

In order to objectively evaluate the segmentation quality of each model, we present the ground truth of four images, as shown in Figure 7.

Table 1 statistics the number of iterations, Equation (22) is used to solve the precision rate, recall rate and DSC by combining our results of the four images with the ground truth. As can be seen from Table 1, P, R and DSC of the model in this paper are all above 90%. P, R and DSC reached 99%.

Table 2 shows the segmentation time of each model for the four images. As for image (A), the RSF model took the most time, 0.9212 s, and the LIF and LOGF take very close, while the time of our model is 0.3853 s, which was less than half of the LOGF. For image (B) and (C), RSF still takes the most time, while the model in this paper takes the least time. As for image (D), the model in this paper used the least segmentation time, which is 0.5853 s, followed by LIF model, LOGF, and 0.9275 s for RSF model, and our model takes 63% of the time that the RSF model takes. Compared with the other three models, the segmentation time of the four images in this model is reduced and the segmentation speed is improved.

Figure 2. Original images.

Figure 3. Image segmentation results of RSF.

Figure 4. Image segmentation results of LIF.

Figure 5. Image segmentation results of LOGF.

Figure 6. Image segmentation results of our model.

Figure 7. Ground truth.

Table 1. The iteration times and segmentation accuracy of the model in this paper for Figure 2.

Table 2. Comparison of time consumption by each model (\s).

In conclusion, the proposed model can better balance the effect of image segmentation and the efficiency of image segmentation, and compared with the other three models, the proposed model can accurately perform image segmentation while meeting the requirements of image segmentation efficiency. According to the final segmentation result, the required running time and the number of iterations, it can be seen that the model in this paper has good segmentation effect and unique advantages in the accuracy and speed of the algorithm.

5. Conclusion

In view of the traditional active contour, model in the zone of partial information is sensitive to initial contour, segmentation and segmentation accuracy rate needs to be improved; this paper puts forward an improved local area active contouring model, which uses the median fitting center to improve the robustness of noise, at the same time, combined with the optimization of the Log function, enhances the image edge information. Compared with RSF, LIF and LOGF, the methods of segmentation accuracy, segmentation effect, calculation speed and noise resistance are better.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Kass, M. and Witkin, A. (1988) Snakes: Active Contour Models. International Journal of Computer Vision, 1, 321-331. https://doi.org/10.1007/BF00133570
[2] Zhang, X., Wen, X., Xu, H., et al. (2016) Synthetic Aperture Radar Image Segmentation Based on Edge-Region Active Contour Model. Journal of Applied Remote Sensing, 10, Article ID: 036014. https://doi.org/10.1117/1.JRS.10.036014
[3] Chen, D. and Cohen, L.D. (2017) Anisotropic Edge-Based Balloon Eikonal Active Contours. International Conference on Geometric Science of Information, Paris, 7-9 November 2017, 782-790. https://doi.org/10.1007/978-3-319-68445-1_90
[4] Badoual, A., Unser, M. and Depeursinge, A. (2019) Texture-Driven Parametric Snakes for Semi-Automatic Image Segmentation. Computer Vision and Image Understanding, 188, Article ID: 102793. https://doi.org/10.1016/j.cviu.2019.102793
[5] Fang, L.L., Zhao, W.T., Li, X.Y. and Wang, X.H. (2017) A Convex Active Contour Model Driven by Local Entropy Energy with Applications to Infrared Ship Target Segmentation. Optics and Laser Technology, 96, 166-175. https://doi.org/10.1016/j.optlastec.2017.05.008
[6] Wang, H., Huang, T., Xu, Z. and Wang, Y. (2016) A Two-Stage Image Segmentation via Global and Local Region Active Contours. Neurocomputing, 205, 130-140.
https://doi.org/10.1016/j.neucom.2016.03.050
[7] Zhang, W.H., Wang, X., Zhang, P.B. and Chen, J.F. (2017) Global Optimal Hybrid Geometric Active Contour for Automated Lung Segmentation on CT Images. Computers in Biology and Medicine, 91, 168-180. https://doi.org/10.1016/j.compbiomed.2017.10.005
[8] Zhang, K., Zhang, L., Lam, K. and Zhang, D. (2017) A Level Set Approach to Image Segmentation with Intensity in Homogeneity. IEEE Transactions on Cybernetics, 46, 546-557.
https://doi.org/10.1109/TCYB.2015.2409119
[9] Liu, C., Xie, C.H., Yang, J., Xiao, Y.Y. and Bao, J.L. (2018) A Method for Coastal Oil Tank Detection in Polarimetric SAR Images Based on Recognition of T-Shaped Harbor. Journal of Systems Engineering and Electronics, 29, 499-509. https://doi.org/10.21629/JSEE.2018.03.07
[10] Guan, S.-Y., Wang, T.-M., Meng, C. and Wang, J.-C. (2018) A Review of Point Feature Based Medical Image Registration. Chinese Journal of Mechanical Engineering, 31, 21-36.
https://doi.org/10.1186/s10033-018-0275-9
[11] Chan, T.F. and Vese, L.A. (2001) Active Contours without Edges. IEEE Transactions on Image Processing, 10, 266-277. https://doi.org/10.1109/83.902291
[12] Li, C.M., Kao, C.Y., Gore, J.C., et al. (2007) Implicit Active Contours Driven by Local Binary Fitting Energy. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, Minneapolis, 17-22 June 2007, 1-7. https://doi.org/10.1109/CVPR.2007.383014
[13] Zhang, K.H., Song, H.H. and Zhang, L. (2010) Active Contours Driven by Local Image Fitting Energy. Pattern Recognition, 43, 1199-1206. https://doi.org/10.1016/j.patcog.2009.10.010
[14] Liu, Y., He, C., Wu, Y., et al. (2018) The L0-Regularized Discrete Variational Level Set Method for Image Segmentation. Image and Vision Computing, 75, 32-43.
https://doi.org/10.1016/j.imavis.2018.03.001
[15] Ding, K.Y., Xiao, L.F. and Weng, G.R. (2018) Active Contours Driven by Local Pre-Fitting Energy for Fast Image Segmentation. Pattern Recognition Letters, 104, 29-36.
https://doi.org/10.1016/j.patrec.2018.01.019
[16] Han, B. and Wu, Y.Q. (2019) Active Contours Driven by Global and Local Weighted Signed Pressure Force for Image Segmentation. Pattern Recognition, 88, 715-728.
https://doi.org/10.1016/j.patcog.2018.12.028
[17] Gao, M., Chen, H., Zheng, S., et al. (2019) Feature Fusion and Non-Negative Matrix Factorization Based Active Contours for Texture Segmentation. Signal Processing, 159, 104-118. https://doi.org/10.1016/j.sigpro.2019.01.021
[18] Ding, K., Xiao, L. and Weng, G. (2017) Active Contours Driven by Region-Scalable Fitting and Optimized Laplacian of Gaussian Energy for Image Segmentation. Signal Processing, 134, 224-233. https://doi.org/10.1016/j.sigpro.2016.12.021
[19] Taha, A.A. and Hanbury, A. (2015) Metrics for Evaluating 3D Medical Image Segmentation: Analysis, Selection, and Tool. BMC Medical Imaging, 15, Article No. 29.
https://doi.org/10.1186/s12880-015-0068-x

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.