DAI Ming,ZHOU Zhiheng,and GUO Yongfan
School of Electronics and Information Engineering,South China University of Technology,Guangzhou 510640,China
Abstract: In many practical applications of image segmentation problems, employing prior information can greatly improve segmentation results. This paper continues to study one kind of prior information, called prior distribution. Within this research, there is no exact template of the object; instead only several samples are given. The proposed method, called the parametric distribution prior model, extends our previous model by adding the training procedure to learn the prior distribution of the objects. Then this paper establishes the energy function of the active contour model(ACM) with consideration of this parametric form of prior distribution. Therefore, during the process of segmenting, the template can update itself while the contour evolves. Experiments are performed on the airplane data set.Experimental results demonstrate the potential of the proposed method that with the information of prior distribution, the segmentation effect and speed can be both improved efficaciously.
Keywords: image segmentation, active contour model (ACM),prior distribution,level set method.
Image segmentation is an important research topic in image processing and computer vision,which has many useful applications[1–4]like medical image analysis,remote sensing, robotics and surveillance. Many methods have been put forward over the last few decades. The active contour model (ACM) [5–11] is one of the most significant and effective approaches, and continues to develop.The basic idea of ACM is to solve the segmentation problem by establishing and optimizing an energy function,and to get the edge of the object of interest iteratively through solving the Euler-Lagrange equation corresponding to the energy function.
The models mentioned above segment objects simply based on the intensity information of images.In real application scenarios, it is hard to attain satisfactory results by using the intensity information only [12–14]. Therefore,some prior information is helpful to segmenting complicated natural image. In our previous work, we proposed the distribution prior model, which employs the intensity distribution of objects or backgrounds as prior information to segment images.Since irregular shapes have no influence on the intensity distribution of images, our model is able to overcome the restriction of existing shape prior models[15–20].
However,there is a flaw in the distribution prior model.It is assumed that the prior distribution is already known.In the real application, however, it is difficult to acquire the exact prior distribution. Therefore, in this paper, we propose a method to train object distribution. The idea is motivated by our previous work [21], which proposed a parametric shape prior model based on the principal component analysis (PCA) method and the level set method.Compared with the traditional prior model, several referring templates are given instead of the exact template of an object.During the process of segmenting,the template updates itself while the contour evolves.
Above all,our model in this paper aims to deal with the cases as follows: there is no exact template of the object;instead only several samples are given.The PCA method is used to train object distribution.In addition, our research focuses on the airplane segmentation. The images of an airplane are adopted from the data set in[22].The organization of this paper comes as follows.In Section 2,the proposed method parametric distribution prior model is elaborated in detail.Experimental results are presented and analyzed in Section 3,aiming to illustrate the effectiveness of the proposed algorithms.Finally,conclusions are drawn in Section 4.
In this section,we will explain our method in detail.First of all, a brief overview of the distribution prior model is presented as follows. Generally, it is assumed that pixels in the same region of an image are independent and identically distributed (i.i.d) subject to an unknown distribution while those in different regions are independent of each other. Specifically, as Fig. 1 shows, an imageIcan be divided into two kinds of regions, which are the object region and the background region. In these two regions, it is assumed that their intensity distribution histograms are subject to probability density functionsPobjectandPbackground,respectively.In the case that prior distribution can be obtained,it is considered that the object prior distribution, denoted asP′, is similar toPobject; and the background prior distribution,denoted asQ′,is similar toPbackground.
Fig.1 Overview of distribution prior method
The imageIis separated into two kinds of regions by an active contourφ(the green line in Fig.1).The region insideφis denoted asR-and the region outsideφis denoted asR+.Their intensity distribution histograms are subject to probability density functionsPandQ. When the contourφis determined,PandQcan be computed by the Parzen density estimation as follows.
whereK(·) means the Gaussian kernel function,σis the standard deviation,xrepresents the pixel location,I(x)represents pixel intensity, andzis the intensity variable.Our goal is to find the optimal contourφ,which maximizes the difference betweenPandQ,PandP′,andQandQ′.
In addition, with consideration of unknown prior distribution, PCA is used to train object distribution in our model,which will be described in Section 2.2.Therefore,the background prior energy is omitted in this paper. The energy function of our model is with the following formula,
whereE(P,Q) is the energy term of distribution difference between interior and exterior;E(P,P′)is the energy term of distribution prior(only object prior is considered in this work); Length(φ) represents the length of the active contour;μandλare positive parameters.
Our model is on the basis of nonparametric statistical active contour models [8,9,23,24]. They rely on a general assumption that distributions within different image regions differ from each other somehow and that the pixels within each region represent i.i.d. samples. In such kind of histogram-based models, including the nonparametric statistical active contour model,the prior information like intensity distribution is naturally embedded.
Therefore, in our previous work, we introduced the intensity distribution to be prior information, which allows the model to ignore the transformation of objects and thus improves the stability of the model and simplify the establishment and solution of the model. Besides, Bhattacharyya distance is adopted to measure the distribution difference betweenPandQ, and Pearson Chi-square divergence is adopted to measure the distribution difference betweenPandP′. The whole energy function can be rewritten in the following formulation.
When the contourφis determined,PandQcan be computed by the Parzen density estimation in(1).
In our previous work[21],we proposed a shape modeling method to learn the object shape with the PCA method.Following this idea, we put forward a distribution modeling method in this paper.
Before elaborating our method, an example about how inexact prior distribution influences the segmentation result, as Fig. 2 shows. The second row shows the corresponding histograms.In this experiment,the object distribution of plane No. 13 is used as the prior object distribution for plane No. 20. It is obvious that the segmentation result is quite terrible.In addition,from the histogram comparison in the second row, it seems that the shape of object distribution in Fig. 2(c) is similar to the shape of the object distribution in Fig. 2(b). We infer that the inexact template forces the active contour curve to evolve to the wrong direction.Therefore,a distribution modeling method is proposed to overcome the problem that the exact prior distribution is unknown.
Fig.2 Failed segmentation result of plane No.20 with wrong template
For a distribution templates training setT={u1,u2,...,un}, the distributions of the objects are denoted as{p′1,p′2,...,p′n}. PCA is applied to these distributions to getk(k < n)main eigenvectorsricalled eigen distributions.Then,the prior distribution can be represented in the parametric form as
whereω={ω1,ω2,...,ωk}denotes the weights of eigen distributions.
The airplane data set is adopted from [22]. In our research,the first half of this data set is treated as the training set, while the other half is treated as the testing set.It is found that the intensity distributions of these airplanes are quite different.The training results for differentk(k=3,4,5)values are shown in Fig.3.
Fig.3 PCA results(with different k values)for distribution modeling
As mentioned above, the object prior distributionP′is a linear combination of eigen distributions. In fact, the weight parameterωshould have some constraint during evolution.If not,P′generated by (4) will not have satisfied prior distribution.In our model,it is assumed that the eigen distributions are uniform in the PCA subspace.Actually,distribution templates of objects are usually finite.In order to capture better prior distribution, a kernel density function forωis drawn into our model,which is called the distribution constraint energy:
whereηiis the PCA coefficient ofri,Kdfis the kernel density function,andσ2is set as the mean squared nearest neighbor distance:
Combined with distribution modeling and the distribution constraint energy,the energy function can be rewritten as follows:
The level set functionφis defined as the signed distance function(SDF).The signed distances for pixels inside and outside the interface should be negative and positive respectively, and their absolute values are allowed to gradually increase as pixels’ positions gradually move away from object contours.LetH(·) be the Heaviside function defined in the standard way as
Its derived function is denoted asδ(·):
Then the inside regionR-can be expressed byH(-φ(x)) whileH(φ(x)) represents the outside regionR+.Based on this definition,the probability density estimation in(1)can be rewritten as follows.
The arc length penalty of the curve can be represented as
For numerical implementation,we use the gradient descent flow method and the alternate descent method[25–28]to solve(7).Firstly,fixωand calculate the optimalφ.Then fixφand calculate the optimalω.These two steps are alternated until the solution is stationary.
To implement the first step,with the variational level set method [29,30], the gradient descent flow aboutφis derived as follows:
where
To implement the second step,only the last two terms in(7)are concerned,so the gradient descent flow aboutωis derived as follows:
Therefore, the iteration equations of the level set functionφand the weightωare obtained:
where Δtrepresents the time step,i=1,2,...,k.
To summarize this section,the procedures of our model are presented as follows.
(i)Set the parametersμ,λ,Δtandk;initialize the level set asφ0and weightωi,0=1/k;t=0.
(ii)Updatepandqwith the currentφtaccording to(10).
(iii)Updateωi,t+1andφt+1according to(15).
(iv) Check whether the solution is stationary. If not,t=t+1 and go back to(ii).
In this section, we show the performance of the proposed method by presenting on the airplane data set[22].All the experiments are performed by using Matlab R2013b on the PC with Intel Core(3.6 GHz)and an 8 GB memory under Windows 10 professional without any particular code optimization.
Figs.4–6 show qualitative comparison with the models in[4,5].It can be seen that our method is able to produce a contour that highlights objects accurately and uniformly.In addition,from the histogram comparison in the second row, it seems that our model could effectively distinguish the interior and exterior in a statistical sense.More visualization results of our method are shown in Fig.7.
In order to evaluate the segmentation results quantitatively,unlike the presentation in Figs.4–7,the segmentation results are transformed into binary images, as Fig. 8 shows.The groundtruth data are given in Fig.8(d).Three metrics are used for quantitative performance comparison and analysis, including Precision, Recall and F-Measure(FM).The results of segmentation could be considered as a kind of binary classification. In our work,Trepresents the true object,Frepresents the false object(which means the real background),Prepresents the region considered as object,andNrepresents the region considered as background.
Fig.4 Segmentation results comparison of plane No.13
Fig.5 Segmentation results comparison of plane No.20
Fig.6 Segmentation results comparison of plane No.323
Fig.7 More visualization results of proposed method
Fig.8 Segmentation results of proposed method transformed into binary images and comparison with groundtruth
On this premise,all the pixels in the image could be divided into the following four types:
T P=true positive(the pixels in the object and predicted as object);
FP=false positive(the pixels in the background but predicted as object);
FN=false negative (the pixels in the object but predicted as background);
T N=true negative(the pixels in the background and predicted as background).
Therefore, these three metrics, Precision, Recall and FM,can be defined as follows.
whereβ2is set as 0.3 typically.Higher metrics mean better segmentation results. Average comparisons of Precision,Recall and FM are shown in Table 1.Our model achieves the best performance on the data set.
Table 1 Quantitative comparison on the database between the proposed method and methods of Bhat.[4]and AMP[5]
In this paper, on the basis of nonparametric statistical active contour model, we propose a parametric distribution prior model.It is different from the distribution prior model, in which prior distribution is already known during the segmentation process. The proposed method divides the segmentation into two stages: image boundary update based on the level set method and template distribution update for the object of interest.That means during the process of segmenting, the template updates itself while the contour evolves.Our goal is to solve the segmentation problem without exact templates. The experiment results show that the proposed algorithm can effectively segment the images.
Journal of Systems Engineering and Electronics2020年1期