Abstract
It is a difficult task to accurately segment images with intensity inhomogeneity, because most of existing algorithms are based upon the assumption of the homogeneity of image intensity. In this paper, we propose a novel region-based active contour model, referred to as the K-GLIF, which utilizes both global and local image intensity fittings with kernel functions. The model consists of an intensity fitting term and a new regularization term. The intensity fitting term of the level set function is the gradient descent flow that minimizes the global binary fitting energy functional. The local intensity fitting value based on the generalized Gaussian kernel function is then incorporated into the global intensity fitting value to form the weighted intensity fitting value on the two sides of the contour. Owing to the kernel function, the intensity information in local regions is extracted to guide the motion of the contour, which enables the model to effectively segment images with intensity inhomogeneity and smooth noise. A new regularization term is used to control the smoothness of the level set function and avoid complicated re-initialization. Experimental results and comparisons with other models of inhomogeneous images, synthetic images, medical images, multi-object images, natural and infrared images show that the proposed K-GLIF model improves the quality of image segmentation in terms of accuracy and robustness of initial contours.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Image segmentation has always been a fundamental and important task in the field of computer vision and image processing. Its goal is to divide the image area into disjoint sub-regions and the properties of the image are consistent in each sub-region. For traditional segmentation methods, the difficulty comes from intensity inhomogeneity and low SNR of images.
The active contour models (ACM) proposed by Kass et al. [10] has been extensively investigated and successfully used in the image segmentation due to its strong ability to deal with the local discontinuous edge features. The existing ACMs can be classified into two types: edge-based models [4, 11, 13, 15] and region-based models [6,7,8,9, 12, 14, 16, 19,20,21,22, 24, 25]. One of the most popular edge-based models is the geodesic active contour model [4], and it is sensitive to noise and requires constant re-initialization of the level set function. In order to overcome the defect that the edge-based models excessively depend upon edge information, many researchers have proposed the region-based models. Among these models, the Chan-Vese (CV) [6] is the most representative one. It is based on the assumption that image intensities are statistically homogeneous in each region and thus it can provide rather good segmentation results for images with intensity homogeneity. Yu et al. [23] proposed the R-DRLSE model combining DRLSE [13] and CV models to reduce the iteration numbers and computation time. However, the phenomenon of intensity inhomogeneity occurs in most of real-world images.
In order to segment images with intensity inhomogeneity, Li et al. [12] proposed a local binary fitting model (LBF), which transforms the global binary fitting energy function of the CV model into the local binary fitting energy function based on the kernel function. However, the model is more sensitive to the initial contour and different initial contour position will affect the segmentation result. Wang et al. [19] proposed an energy functional with local and global intensity fitting energy (LGIF). Wang et al. [20] proposed a local Chan-Vese (LCV) model which enhances the target and the background of the intensity contrast through the convolution of the image and the original image to do the difference. Zhang et al. [25] devised a maximum likelihood energy functional based on distribution of each local region (LSACM, Locally Statistical Active Contour Model), which combines the bias field, the level set function, and the piecewise constant function approximating the true image. Wang et al. [22] proposed to construct a local hybrid image fitting (LHIF) energy function by leveraging the strength of both LBF and LIF [24] models for accurate image segmentation.
In this paper, we proposed a novel region-based active contour model based on global and local image intensity fitting with kernel function (K-GLIF) for image segmentation. Firstly, the intensity fitting term of the level set function is the gradient descent flow that minimizes the global binary fitting energy functional. Then, the local intensity fitting value based on the generalized Gaussian kernel function is incorporated into the global intensity fitting value to form the weighted intensity fitting value on the two sides of the contour. Due to the kernel function in the new intensity fitting term, the intensity information in local regions is extracted to guide the motion of the contour, which enables the proposed model to effectively segment images with inhomogeneous intensity and smooth noise. Finally, the new regularization term is used to control the smoothness of level set function and avoid complicated re-initialization. Experimental results and comparisons with other models of inhomogeneous images, synthetic images, medical images, multi-object images, natural and infrared images are made to show the advantages of the K-GLIF model in accuracy and robustness to initial contours.
The rest of the paper is organized as follows: In Section 2, we review some classic region-based models and analyze their limitations. The K-GLIF model is proposed in Section 3. Section 4 reports the experimental results on synthetic and real images, followed by some discussions in Section 5. Finally, the conclusive remark is included in Section 6.
2 Previous works
2.1 The CV model
Let I : Ω → R be an input image and C be a closed curve. The CV energy functional is defined as follows:
where μ, v ≥ 0, λ1, λ2 > 0. The Euclidean length term is used to regularize the contour, c1 and c2 are two constants that approximate the image intensities in the interior and exterior of the curve C, respectively.
Minimizing the above energy functional by variational method [2], and the contour curves are expressed by level set ϕ, i.e. C = {x ∈ Ω|ϕ(x) = 0}, then get the following partial differential equation:
It is noted that the constants c1 and c2 represent the global information of internal and external contours and such image information is not accurate when image intensity is inhomogeneous.
2.2 The LBF model
The local binary fitting (LBF) model is proposed by Li et al. [12] that embedded the local intensity information. The energy functional of LBF model is defined as follows:
where λ1, λ2 > 0. Kσ is the Gaussian kernel function with standard deviation σ, f1 and f2 are two smooth functions that approximate the local image intensity of the interior and exterior of the evolving curve, respectively. Obviously, such localization property may cause the energy functional to fall into the local minimums and the segmentation result is vulnerable to contour initialization.
2.3 The LCV model
Wang et al. [19] proposed a local Chan-Vese (LCV) model which integrated the local statistical information and global region information into the energy functional. The energy functional is composed of three parts: global term EG, local term EL and regularization term ER.
where α and β are constants, the global term EG is from the CV model and the local term EL is defined as:
where gk is an average filter with k × k size window, d1 and d2 are the intensity averages of difference image gkI(x) − I(x) in the interior and exterior of the curve C, respectively.
The LCV model does not calculate the convolution during the iteration process compared to the LBF model and thus is more effective than the LBF model. The technique using global information can improve the robustness to initial contours. However, the LCV model can be regarded as the CV model acting on the difference image gk(I(x)) − I(x). As a result, it is difficult for the LCV model to satisfactorily segment the image with inhomogeneous intensity.
3 Global and local image intensity fitting with kernel function
3.1 The intensity fitting term
Let I : Ω → R be an input image and C be a closed curve. We define the following data energy functional:
where m1, m2 are weighted intensity fitting values on the two sides of the contour, H(⋅) is the Heaviside function, m1 and m2 are defined as follows:
where w is a weighting parameter (0 ≤ w ≤ 1). The more inhomogeneous an image is, the smaller the parameter w should be and larger the proportion of local intensities fitting value is larger. f1(x), f2(x) are two smooth functions of generalized Gaussian window that approximate the local image intensities fitting values in the interior and exterior of the contour. The two smooth functions are defined as follows:
where Kβ is a generalized Gaussian kernel function [17] with scale parameter α and shape parameter β and is defined by
where Γ(⋅) is the Gamma function. The shape parameter β determines the decay rate of the probability distribution function. Figure 1 illustrates the probability density function of the generalized Gaussian kernel functions with different shape parameters. The smaller the shape parameter is, the probability density function decline faster.
3.2 The new regularization term
In order to avoid the re-initialization step, the energy penalty term is proposed in [11] to keep the level set function as a signed distance function which can be characterized by the following energy functional:
where p(s) is the following potential function with minimum point s = 1:
However, the above energy penalty term may have an undesirable side effect on the level set function when |∇ϕ| is close to 0 and it affects the accuracy of numerical solution. Li et al. [13] proposed a double-well potential function p1(s) based on trigonometric function for the distance regularization term and the corresponding energy functional has two minimum points at s = 0 and s = 1. Wang et al. [21] take the idea of a few steps by constructing the new double-well potential function based on polynomial function:
It has the same property with the double-well potential function p1(s) but has low computation complexity due to the usage of polynomials. Because the trigonometric function is computed by Taylor polynomial, the order of new polynomial function is low and is easy to be computed. Furthermore, the polynomial function has the characteristics of simple structure and easy operation, differentiation and integration.
Then, the new energy penalty term is obtained by follows:
where p2(s) is the new double-well potential function in Eq. (12).
The gradient flow of new energy penalty term is as follows:
To control the smoothness of the zero level set, the following length penalty term is also included:
In this way, the new regularize energy term of the proposed method consists of two parts:
where v is the parameter to control the penalization term. The v larger is, the larger objects are detected.
3.3 Level set evolution equation
Now, the overall energy functional of the proposed method is defined as follows:
In the above equation, the regularized versions of Heaviside function and Dirac function are utilized as follow:
Minimizing the overall energy function with respect to ϕ to get the corresponding gradient descent flow by the variation level set method [2]:
where δε(ϕ) is the regularized Dirac function defined in Eq. (18).
3.4 Description of algorithm steps
The main steps of the proposed algorithm are summarized as follows:
- Step 1:
Set the initial contour C and the default parameters.
- Step 2:
Set the parameters v, w and the number of iteration n.
- Step 3:
Calculate the object and the background weighted intensity fitting values of the original image.
- Step 4:
Evolve level set function ϕ according to the Eq. (19).
- Step 5:
Judge whether evolution is stationary. If yes, extract the zero level set from the final level set function ϕn + 1; Otherwise, go to Step 3.
4 Experimental results and analysis
In this section, we apply the proposed K-GLIF model to inhomogeneous images, synthetic images, medical images, multi-object images, natural and infrared images from different modalities, and use the same parameters setting of Δt = 0.1, h = 1, ε = 1, α = 40 and β = 0.4 for all the experiments. The parameters of v, w and n can be adjusted according to specific images. The computation is performed in Matlab 2014a on a computer with 3.30GHz Intel Core i5 CPU and 4GB RAM.
4.1 Inhomogeneous images segmentation
Four images with inhomogeneous intensity are used to validate the performance of the K-GLIF model. The upper row of Fig. 2 shows the initial contour (red curve) of the four images. The lower row of Fig. 2 demonstrates the segmentation results (green curve) using the K-GLIF model. It can be seen that the proposed method can effectively segment images with inhomogeneous intensity. The parameters are taken as w = 0.01, v = 0.002 × 2552 for the first image and w = 0.01, v = 0.001 × 2552 for the other three images.
4.2 The robustness of the initial contour
Figure 3 illustrates the segmentation results of the K-GLIF model from different initial contours on a synthetic image. The upper row includes different four different initial contours (red curve) of the images, the middle row demonstrates the segmentation results using the LBF model from the four initial contours, and the lower row is the segmentation results by the proposed K-GLIF model. It can be observed that the LBF fails to segment the synthetic image for different initial contours while the proposed K-GLIF model can overcome the weak boundaries and extract the objects of interest with different initial contours on the synthetic image. Moreover, starting from the four initial contours, the proposed K-GLIF model gives almost same segmentation results and thus it is robust to initial contours. The parameters setting of the K-GLIF model are w = 0.01, v = 0.002 × 2552 and that of the LBF model are λ1 = λ2 = 1, v = 0.001 × 2552 and σ = 3.
4.3 Medical images segmentation
The non-linearity of intensity distribution often occurs in medical images, such as the five images shown in Fig. 4. The first column shows initial contours in medical images, the middle column demonstrates the segmentation results using the LSACM, and the last column shows the segmentation using the K-GLIF model. In the brain MR image, the segmentation result using LSACM is very smooth, resulting in the loss of the edge information of the brain whiter matter, the K-GLIF model captures more details in edge-region and detects the contour of brain. The object of medical images in second and third row is obvious, it can be seen from segmentation results that the proposed model is more accurate than LSACM, and the segmentation curve is closer to the real object contour. The fourth and fifth row are two blood vessel images with intensity inhomogeneity. We can observe that the segmentation curve of K-GLIF model is smoother than that of LSACM, and there is no phenomenon that background is mis-divided into object. In the experiment, we use the parameters w = 0.5, v = 0.05 × 2552 for the first three images in the K-GLIF model and w = 0.1, v = 0.01 × 2552 for the other images in the K-GLIF model, the LSACM use the optimal parameter σ = 2.5 for the forth image and σ = 6 for the other images.
In addition, the iteration numbers and computation time of LSACM and K-GLIF model in experiment are given in Table 1 for five medical images displayed in Fig. 4. Our model requires less iteration numbers and computation time than LSACM. Considering both accuracy and computation efficiency, the K-GLIF model has better segmentation performances than LSACM.
4.4 Multi-object images segmentation
Besides the segmentation of images with inhomogeneous intensity and noisy images, multi-object segmentation is also a great difficulty for the level set method. By utilizing both local and global information, the K-GLIF model provides some effectiveness on multi-object images segmentation and it obtains higher accuracy than other models. In Fig. 5a, the intensity of some objects is higher than the background intensity and that of others objects is lower than the background intensity. The initial contour in original image is shown in Fig. 5b. Figure 5c and e are the segmentation results of the CV model and the LCV model. It can be seen that the two low intensity circles are missed. Figure 5d is the result of the LBF where the result is of slight over-segmentation. Figure 5f is the result of the proposed K-GLIF model, where all the six circles are successfully segmented. The K-GLIF model use the parameters setting w = 0.05 and v = 0.003 × 2552, and the parameters in the CV model and the LCV model are λ1 = λ2 = 1 and v = 0.003 × 2552, which are tuned to achieve the best results. The parameters setting of the LBF model are λ1 = λ2 = 1, v = 0.003 × 2552 and σ = 3.
In Fig. 6, we further illustrate of the segmentation effect of the CV, LBF, LCV and K-GLIF models for multiple small objects with slight inhomogeneous intensity. The initial contour in original image is shown in Fig. 6b and c–f are segmentation results. It can be seen that the CV fails to detect edge objects at the bottom of the image, the result of the LBF model contains redundant contours. The result of the LCV model is similar to that of CV model, where the edge objects at the top of the image and the right of the image are not closed and the bottom of objects are not fully segmented. Differently, the K-GLIF model can overcome the above phenomenon and accurately extracts all small objects in the image. In the experiment, we use the parameters w = 0.1 and v = 0.001 × 2552 in the K-GLIF model. The CV and LCV models use the optimal parameters λ1 = λ2 = 1, v = 0.001 × 2552. The LBF model uses the parameters λ1 = λ2 = 1, v = 0.001 × 2552 and σ = 3.
4.5 Natural images segmentation
We compared our model with the CV, LBF and LCV models based on Berkeley Segmentation Dataset (BSD300) [1]. The BSD300 consists of a number of natural images. More than 120 images are selected from dataset in the experimental, and the segmentation results of 5 natural images (Image ID: 86016, 135,069,163,014, 42,049, 317,080) are shown in Fig. 7. The original images and ground truth are shown in Fig. 7a–b and the segmentation results of CV, LBF, LCV and the K-GLIF are shown in Fig. 7c–f. It can be seen that the proposed model has more closer segmentation results than other models.
4.6 Infrared images segmentation
In order to verify the superiority of the K-GLIF model, a comparison is performed between it and the other three models: the CV, LBF model and LCV models. Infrared images of size 320 × 240 are derived from the OTCBVS Benchmark Dataset [18]. In experiments, the CV and LCV models use the optimal parameters: λ1 = λ2 = 1, v = 0.01 × 2552. The LBF model uses the optimal parameters: λ1 = λ2 = 1, v = 0.001 × 2552 and σ = 3. The K-GLIF model use the parameters w = 0.6, v = 0.06 × 2552 for the infrared data1 and w = 0.5, v = 0.5 × 2552 for the infrared data2 and data3.
In the infrared data1 and data2, the object and background are relatively complex, and some pixels in background are similar to that in object in intensity, as shown in Figs. 8a and 9a. The initial contours in the original images are shown in Figs. 8b and 9b. It can be seen that only the K-GLIF model can successfully extract the object and the object’s edges in the segmentation results using the K-GLIF model are smoother and more accurate, as shown in Figs. 8f and 9f. The other models fail to give satisfactory results.
In the infrared data3, the background is complex and there is obvious interference, as shown in Fig. 10a. It is difficult for both the CV model and the LCV model to separate the object from the background due to strong interference, as shown in Fig. 10c and e. The result of the LBF model is also unsatisfactory, as shown in Fig. 10d. Differently, the K-GLIF model gives a satisfactory result without misclassification and over-segmentation, as shown in Fig. 10f.
Finally, the two measures, F-measure (FM) and Localization-error (LE) [3, 5] are used to evaluate the segmentation results of different models on the three infrared images. As shown in Fig. 11, which segmentation results FP given by the different model and standard results FN given by the ground truth. FM and LE are given by:
A higher FM score means that a model is more accurate. Meanwhile, a small LE score means that the localization error is small and the segmentation result is better. Scores in Tables 2 and 3 show that the K-GLIF model obtains competitive performance in comparison with the other three models.
5 Discussion
5.1 The parameters w and v
In this paper, the parameter w is weighting parameter (0 ≤ w ≤ 1), which controls the proportion of the global intensity fitting term and the local intensity fitting term. When the intensity of the image is inhomogeneous, the local intensity fitting should play a leading role, in order to obtain satisfactory segmentation result, we can use relatively smaller w as the weight of local intensity. Thus, the image evolution energy can accurately drive the evolution curve to capture the local information, and finally converge to object boundary. For the image with minor inhomogeneity, we should choose larger w as the weight global parameter, the global energy allows the curve to rapidly evolve to the area near the object, and not be affected by the location of initial contour, then the local energy is able to attract the curve to the edge of the object. The length controlling parameter v is formatted by v = λ × 2552, λ ∈ (0, 1). When v is large, large-size objects are detected; when v is small, then small-size objects are detected.
5.2 Effect of the new regularization term
The regularization term defined in Eq. (16) is necessary in the K-GLIF model, which contains the energy penalty term about level set function and the length penalty term. Without the penalty term, the level set function grows to very large values (positive or negative) on the interior and exterior of zero level set. The function will lose the character of the signed distance function, which results errors in the computation for the numerical solution to the evolution equation and eventually affect the accuracy of final segmentation results. We use the new double-well potential function based on polynomial function to avoid the re-initialization of the level set function in the paper. The new double-well potential function not only avoids side effects that occur in the traditional function, but also offers appealing theoretical and numerical property of the level set evolution.
Double-well function p2(s), the first derivative \( {p}_2^{\prime }(s) \) and function dp2(s) are plotted in Fig. 12, we can observe that dp2(s) satisfies the following relationship \( \underset{s\to 0}{\lim }{d}_{p2}(s)=\underset{s\to \infty }{\lim }{d}_{p2}(s)=1 \) and |dp2(s)| < 1.
If |∇ϕ| > 1, dp2(|∇ϕ|) is positive and diffusion is forward so as to decrease the |∇ϕ|.
If |∇ϕ| < 0.5, dp2(|∇ϕ|) is positive and diffusion is forward so as to decrease the |∇ϕ| down to zero.
If 0.5 < |∇ϕ| < 1, dp2(|∇ϕ|) is negative and diffusion is backward so as to increase the |∇ϕ|.
6 Conclusions
In this paper, a new region-based active contour model based on kernel function for image segmentation is proposed. Due to the generalized Gaussian kernel function in the weighted intensity fitting term, the intensity information in local regions is extracted to guide the motion of the contour, which enables the proposed method to effectively segment images with inhomogeneous intensity and smooth noise. The experiments on synthetic images, medical images, multi-object images, natural and infrared images have demonstrated that the K-GLIF model can provide desirable segmentation results and allow for more flexible localizations of initial contour in comparison with the CV, LCV, LSACM and LBF models.
References
Arbelaez P, Maire M, Fowlkes C et al (2011) Contour detection and hierarchical image segmentation[J]. IEEE Trans Pattern Anal Mach Intell 33(5):898–916
Aubert G, Kornprobst P (2006) Mathematical problems in image processing: partial differential equations and the calculus of variations[M]. Springer Science & Business Media
Balla-Arabe S, Gao X, Wang B (2013) A fast and robust level set method for image segmentation using fuzzy clustering and lattice Boltzmann method[J]. IEEE T Cybernetics 43(3):910–920
Caselles V, Kimmel R, Sapiro G (1997) Geodesic active contours[J]. Int J Comput Vis 22(1):61–79
Chabrier S, Laurent H, Rosenberger C et al (2006) Supervised evaluation of synthetic and real contour segmentation results[C]. 2006 14th European Signal Processing Conference. IEEE 1–4
Chan TF, Vese LA (2001) Active contours without edges[J]. IEEE Trans Image Process 10(2):266–277
He C, Wang Y, Chen Q (2012) Active contours driven by weighted region-scalable fitting energy based on local entropy[J]. Signal Process 92(2):587–600
Ji Z, Xia Y, Sun Q et al (2015) Active contours driven by local likelihood image fitting energy for image segmentation[J]. Inf Sci 301:285–304
Jiang X, Wu X, Xiong Y et al (2015) Active contours driven by local and global intensity fitting energies based on local entropy[J]. Optik 126(24):5672–5677
Kass M, Witkin A, Terzopoulos D (1988) Snakes: active contour models[J]. Int J Comput Vis 1(4):321–331
Li C, Xu C, Gui C et al (2005) Level set evolution without re-initialization: a new variational formulation[C]. IEEE Computer Society Conference on Computer Vision and Pattern Recognition. CVPR 2005. IEEE 1: 430–436
Li C, Kao CY, Gore JC et al (2007) Implicit active contours driven by local binary fitting energy[C]. IEEE Conference on Computer Vision and Pattern Recognition. CVPR ‘07. DBLP 1–7
Li C, Xu C, Gui C et al (2010) Distance regularized level set evolution and its application to image segmentation[J]. IEEE Trans Image Process 19(12):3243–3254
Liu L, Cheng D, Tian F et al (2017) Active contour driven by multi-scale local binary fitting and Kullback-Leibler divergence for image segmentation[J]. Multimed Tools Appl 76(7):10149–10168
Osher S, Sethian JA (1988) Fronts propagating with curvature-dependent speed: algorithms based on Hamilton-Jacobi formulations[J]. J Comput Phys 79(1):12–49
Shahvaran Z, Kazemi K, Helfroush MS et al (2012) Region-based active contour model based on Markov random field to segment images with intensity non-uniformity and noise[J]. J Med Signals Sens 2(1):17
Stacy EW (1962) A generalization of the gamma distribution[J]. Ann Math Stat:1187–1192
The OTCBVS Benchmark Dataset (2016). http://vcipl-okstate.org/pbvs/bench/
Wang L, Li C, Sun Q et al (2009) Active contours driven by local and global intensity fitting energy with application to brain MR image segmentation[J]. Comput Med Imaging Graph 33(7):520–531
Wang XF, Huang DS, Xu H (2010) An efficient local Chan–Vese model for image segmentation[J]. Pattern Recogn 43(3):603–618
Wang XF, Min H, Zou L et al (2015) A novel level set method for image segmentation by incorporating local statistical analysis and global similarity measurement[J]. Pattern Recogn 48(1):189–204
Wang L, Chang Y, Wang H et al (2017) An active contour model based on local fitted images for image segmentation[J]. Inf Sci 418:61–73
Yu C, Zhang W, Yu Y et al (2013) A novel active contour model for image segmentation using distance regularization term[J]. Comput Math Appl 65(11):1746–1759
Zhang K, Song H, Zhang L (2010) Active contours driven by local image fitting energy[J]. Pattern Recogn 43(4):1199–1206
Zhang K, Zhang L, Lam KM et al (2016) A level set approach to image segmentation with intensity inhomogeneity[J]. IEEE T Cybernetics 46(2):546–557
Acknowledgments
This research was supported in part by the National Natural Science Foundation of China (Grant No. 61101246) and the Fundamental Research Funds for the Central Universities (Grant No. JB150209).
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Liu, J., Sun, S. & Chen, Y. A novel region-based active contour model based on kernel function for image segmentation. Multimed Tools Appl 78, 33659–33677 (2019). https://doi.org/10.1007/s11042-019-08174-z
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11042-019-08174-z