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
, for a given image
, The closed contour C is constructed by the level set function
,
In order to make full use of local image information, Li et al. [12] constructed the following energy function:
(1)
In Equation (1),
is the Gaussian kernel function,
controls the size of the kernel function.
(2)
is the mean intensity inside and outside the locally approximated curve, and the expression is as follows:
(3)
is the smooth approximation function of Heaviside function
,
is Dirac function,
is a constant.
(4)
In general,
, the curve evolution equation obtained through curve evolution theory is as follows:
(5)
Since the kernel function
,
,
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:
(6)
is defined as follows:
(7)
where
,
is calculated as follows:
(8)
Finally, its evolution equation is as follows:
(9)
In LIF model,
and
can be viewed as the average of the image strength in the window. Thus,
and
are the same as
and
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:
(10)
where C is a constant,
is Laplacian of gaussian, defined as Equation (11).
(11)
is the energy function of the Log of image, when
declines,
will drive L to 0, which helps to smooth the regions. When approaching the target edge,
will drive L to close to
, when C > 1, it can enhance the target edges.
Its evolution equation is as follows:
(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:
(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:
(14)
(15)
where
are calculated in Equation (13),
is calculated by Equation (16).
(16)
In order to make the curve evolve more stably and quickly, the length constraint term
and distance regularization term
are introduced into the model,
keeps the curve smooth, and
keeps the steady evolution of the level set function without the need for re-initialization.
(17)
(18)
The final evolution equation is as follows:
(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:
(20)
Figure 1. Comparison of LIF models based on Equation (8) and Equation (13).
where
and
are calculated as follows:
(21)
The segmentation steps of the above model can be summarized as the following steps:
Step 1: Initialize
, and set parameters.
Step 2: Calculate
according to Equation (16), Calculate
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.
(22)
where
represents the ground truth, and
represents the area where the model solves. The closer the value of P is to 1, the better the image split. At
, 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,
is set to a small constant function
. When calculating
,
,
, number of iterations
. When evolving the curve
:
;
;
;
;
,
. The window size of
is
, and the standard deviation is
. 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 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.
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.