# Magnetostatic Active Contour Model with Classification Method of Sparse Representation

Authors: Guoqi Liu; Yifei Dong; Ming Deng; Yihang Liu
Journal: Journal of Electrical and Computer Engineering
 (2020)

---

## Abstract

The active contour model is widely used to segment images. For the classical magnetostatic active contour (MAC) model, the magnetic field is computed based on the detected points by using an edge detector. However, noise and nontarget points are always detected. Thus, MAC is nonrobust to noise and the extracted objects may be deviant from the real objects. In this paper, a magnetostatic active contour model with a classification method of sparse representation is proposed. First, rough edge information is obtained with some edge detectors. Second, the extracted edge contours are divided into two parts by sparse classification, that is, the target object part and the redundant part. Based on the classified target points, a new magnetic field is generated, and contours evolve with MAC to extract the target objects. Experimental results show that the proposed model could decrease the influence of noise and robust segmentation results could be obtained.


---

## Body

## 1. Introduction

Image segmentation aims to separate the “target” area and the “background” area of the input image and to extract the interesting part for in-depth understanding and analysis [1, 2]. Segmented images are the advanced expression of the original pixels to semantic objects. Therefore, efficient image segmentation is a key step from image processing to image analysis and also a basic problem in computer vision.The active contour model (ACM) is one of the main ways to realize image segmentation. In recent years, many scholars have conducted in-depth studies on this area, and some models are widely used in computer vision, pattern recognition, target tracking, and other fields. Recently, with the development of the neural network, some methods that combined deep learning with the level set are exerted to resolve complex segmentation and recognition problem. In [3], a new methodology combines deep learning with the level set for the automated segmentation of the left ventricle of the heart from cardiac cine magnetic resonance (MR) data. This combination is relevant for segmentation problems, where the visual object of interest presents large shape and appearance variations, but the annotated training set is small, which is the case for various medical image analysis applications.ACM can be usually divided into two types: the ACM based on region information [4–10, 11] and the ACM based on edge information [12–16]. The region-based ACM has been cited and studied by many scholars, because it does not rely on the edge information of the image and can better deal with the weak edge, even the image without edge.The classic region-based ACM is the CV model [17, 18] proposed by Chan and Vese. However, it is sensitive to inhomogeneous intensity. Some methods on the basis of the CV model are proposed to solve the shortcomings. For example, the local binary fitting (LBF) model is proposed by Li [19], and the locally statistical active contour model (LSACM) model is proposed by Zhang [20]. To a certain extent, the ability of these models to segment inhomogeneous images is improved. However, the segmentation of some images with serious inhomogeneous intensity is still difficult, and the high computational complexity is usually required. In [21], the region-based ACM that embeds the image local information is proposed. By defining a local image fitting (LIF) energy [21], local image information is extracted and able to segment images with intensity inhomogeneities.The edge-based ACM mainly uses the gradient information of the image and pushes the contour to the target boundary under the action of the defined forces of the curve. It is usually robust to inhomogeneous intensity. The geodesic active contour (GAC) model [22] comes from the snake model [23], which makes the contour smoothly converge to objects. However, the evolution of the contour curve in the GAC model is slow, and it is sensitive to initialization. In order to speed the contour evolution, a distance regularized level set evolution method (DRLSE) [24] by integrating a regional speeding term is proposed by Li. On the other hand, some models by defining a new external force field on the basis of the GAC model are proposed to improve the robustness of initialization. For example, the gradient vector flow (GVF) model [25] and vector field convolution (VFC) model [26] are integrated into the GAC model. However, there are some saddle points, stationary points, and other equilibrium points [27, 28] in the vector fields; thus, the contour is hard to converge to the concave area.In [29], a variational approach for simultaneous estimation of bias field and segmentation of images with intensity inhomogeneity is presented, where the model intensity of inhomogeneous objects is Gaussian distributed with different means and variances. Then, a sliding window to map the original image intensity onto another domain is introduced, where the intensity distribution of each object is still Gaussian but can be better separated. In [30], a novel ACM driven by regularized gradient flux flows is presented for image segmentation, which achieves an accurate result since the zero crossings of the image Laplacian are reached at the object boundary when minimizing the gradient flux flows. Meanwhile, the Laplacian of the image is regularized with an anisotropic diffusion term, which can not only reduce noise but also preserve edge information. In [31], the method named selective binary and Gaussian filtering regularized level set (SBGFRLS) is proposed, which selectively penalizes the level set function to be binary and then uses a Gaussian smoothing kernel to regularize it. Zhi and Shen [32] proposed a saliency driven region-edge-based top-down level set (SDREL) by using both saliency map and color intensity as region external energy to motivate an initial evolution of level set function (LSF). This saliency map term improves the performance of extracting objects from a complicated background and also enhances the asynchronous evolution of single LSF results.The magnetostatic active contour (MAC) model [33] is proposed by Xie, and it utilizes the edge information to realize the segmentation of objects. Different from the ACMs based on traditional vector fields, the problem of equilibrium points does not exist in MAC, and it can effectively extract objects with a concave region. By combining the level set method, the change of topology structure is permitted to extract multiple objects. But there are two main problems with MAC: (1) robustness to noise should be improved; (2) the detected edge is sometimes deviant from the real target edge, which leads to the inaccuracy of the segmented result. In order to solve these two problems, an improved MAC model with a classification method of sparse representation is proposed.


## 2. Background

### 2.1. MAC Model

The edge information of the image is used in the MAC model. It takes the force of the magnetic field to the current as the original force to move the contour to the edge of the target.In the MAC model, the direction of current for the object boundary can be computed using boundary orientation estimation. And the boundary orientationOx can be obtained by(1)Ox=−1λ−Iyx,Ixx.That is a90∘ rotation of the normalized gradient vector Ixx,Iyx.Ixx and Iyx are the partial derivatives in x and y of image I:(2)λ=1,anticlockwise rotation,2,clockwise rotation.Next, the magnetic flux densityBx at each pixel position x due to the electric current applied to the object boundary is computed. Given a current Ifs, Bx is defined as(3)Bx=μ04π∑s∈SIfsΓs×R^xsRxs2.μ0 and π are constants, S is a set of some pixels, and s denotes a boundary pixel. Γs is an electric current vector at s and proportional to the edge strength, and Γs=fsOs. f is the gradient magnitude of image I. Fc=ICϒc×Bc is the unit vector from x to s, and Rxs is the distance between them. Then, given the current IC applied to the active contour C, its magnetic field Fc is computed as(4)Fc=ICϒc×Bc.ϒc represents the current vector at each point. Fc is replaced by Fx, and the evolution equation of the MAC model is defined as follows:(5)Ct=αgxκN^+1−αFx⋅N^N^.α is a real constant, κ denotes the curvature, and N^ is the unit normal of the evolving contour. gx is a stopping function, which is defined as(6)gx=11+∇Ipp=1,2.Then, the evolution equation of the MAC model with respect to level set functionΦ is as follows:(7)Φt=αgx∇⋅∇Φ∇Φ∇Φ−1−αFx⋅∇Φ.


### 2.2. Classification Method of Sparse Representation

The two main tasks of signal sparse representation are the generation of dictionaries and the sparse decomposition of signals.The sparse decomposition algorithm is proposed by Mallat [34], which is a very famous matching tracking (MP) algorithm. The basis function used to represent the signal can be selected flexibly according to the characteristics of the signal itself [35]. The algorithm is easy to implement, so there are a lot of applications in many different fields, such as image and signal processing [36]. Sparse representation model is represented as follows:(8)Y=DL=∑i=1NDiLi,D=D1,…,DN,L=L1,…,LN∼is∼sparse,where Y is a signal, D is a dictionary, and L is the coefficient matrix. Then, Y can be divided into two parts, and the formula is(9)Y=Y˜+Y¯,where Y˜ is the object part and Y¯ is regarded as the redundant part. The formula for extracting Y˜ is(10)Y˜=∑i=1MDiLi,M≤N.In order to clearly explain the proposed method, a typical example is shown in Figure1. An image with noise is shown in Figure 1(a). First, some contour points are obtained by using an edge detection operator (the Sobel detector is used), which is shown in Figure 1(b). Second, the dictionary is obtained by labeling for the detected contour points. It is assumed that the number of labeled connect contours is N, and the basis function in the dictionary is written as Dii=1,…,N. Therefore, the contour points Y are decomposed into several components. It is shown as follows:(11)Y=∑i=1NDi.Figure 1
An example of the OMP algorithm. (a) An image with noise. (b) The result with the Sobel detector. (c) The obtained basis function with the contour length measure of OMP. (d) Another basis function. (e) The unionY˜ of several basis functions. (f) The redundant part Y¯.
(a)(b)(c)(d)(e)(f)Because some basis functions are redundant in equation (11), the sparse coefficients are finally to be determined by solving the similar equation (8) with OMP algorithm. The main principle behind the OMP is simple and intuitive: in each iteration, the coefficients maximally correlated with the residual are chosen. In OMP, the contour length of basis function or prior information can be used as the measure of maximum correlation. Through OMP algorithm, the corresponding basis functions are obtained, which are shown in Figure 1. When extracting a single object, with contour length correlation of OMP, the obtained result is shown in Figure 1(d). With prior information of triangle area of OMP, the result is shown in Figure 1(d). By setting M = 4 of OMP, the first four maximum correlation basis functions are obtained, and Y˜ is obtained, which is shown in Figure 1(e). The redundant part Y¯=Y−Y˜ is shown in Figure 1(f), which always includes noise and nontarget objects. The detected points Y are classed into two parts Y˜ and Y¯.


## 2.1. MAC Model

The edge information of the image is used in the MAC model. It takes the force of the magnetic field to the current as the original force to move the contour to the edge of the target.In the MAC model, the direction of current for the object boundary can be computed using boundary orientation estimation. And the boundary orientationOx can be obtained by(1)Ox=−1λ−Iyx,Ixx.That is a90∘ rotation of the normalized gradient vector Ixx,Iyx.Ixx and Iyx are the partial derivatives in x and y of image I:(2)λ=1,anticlockwise rotation,2,clockwise rotation.Next, the magnetic flux densityBx at each pixel position x due to the electric current applied to the object boundary is computed. Given a current Ifs, Bx is defined as(3)Bx=μ04π∑s∈SIfsΓs×R^xsRxs2.μ0 and π are constants, S is a set of some pixels, and s denotes a boundary pixel. Γs is an electric current vector at s and proportional to the edge strength, and Γs=fsOs. f is the gradient magnitude of image I. Fc=ICϒc×Bc is the unit vector from x to s, and Rxs is the distance between them. Then, given the current IC applied to the active contour C, its magnetic field Fc is computed as(4)Fc=ICϒc×Bc.ϒc represents the current vector at each point. Fc is replaced by Fx, and the evolution equation of the MAC model is defined as follows:(5)Ct=αgxκN^+1−αFx⋅N^N^.α is a real constant, κ denotes the curvature, and N^ is the unit normal of the evolving contour. gx is a stopping function, which is defined as(6)gx=11+∇Ipp=1,2.Then, the evolution equation of the MAC model with respect to level set functionΦ is as follows:(7)Φt=αgx∇⋅∇Φ∇Φ∇Φ−1−αFx⋅∇Φ.


## 2.2. Classification Method of Sparse Representation

The two main tasks of signal sparse representation are the generation of dictionaries and the sparse decomposition of signals.The sparse decomposition algorithm is proposed by Mallat [34], which is a very famous matching tracking (MP) algorithm. The basis function used to represent the signal can be selected flexibly according to the characteristics of the signal itself [35]. The algorithm is easy to implement, so there are a lot of applications in many different fields, such as image and signal processing [36]. Sparse representation model is represented as follows:(8)Y=DL=∑i=1NDiLi,D=D1,…,DN,L=L1,…,LN∼is∼sparse,where Y is a signal, D is a dictionary, and L is the coefficient matrix. Then, Y can be divided into two parts, and the formula is(9)Y=Y˜+Y¯,where Y˜ is the object part and Y¯ is regarded as the redundant part. The formula for extracting Y˜ is(10)Y˜=∑i=1MDiLi,M≤N.In order to clearly explain the proposed method, a typical example is shown in Figure1. An image with noise is shown in Figure 1(a). First, some contour points are obtained by using an edge detection operator (the Sobel detector is used), which is shown in Figure 1(b). Second, the dictionary is obtained by labeling for the detected contour points. It is assumed that the number of labeled connect contours is N, and the basis function in the dictionary is written as Dii=1,…,N. Therefore, the contour points Y are decomposed into several components. It is shown as follows:(11)Y=∑i=1NDi.Figure 1
An example of the OMP algorithm. (a) An image with noise. (b) The result with the Sobel detector. (c) The obtained basis function with the contour length measure of OMP. (d) Another basis function. (e) The unionY˜ of several basis functions. (f) The redundant part Y¯.
(a)(b)(c)(d)(e)(f)Because some basis functions are redundant in equation (11), the sparse coefficients are finally to be determined by solving the similar equation (8) with OMP algorithm. The main principle behind the OMP is simple and intuitive: in each iteration, the coefficients maximally correlated with the residual are chosen. In OMP, the contour length of basis function or prior information can be used as the measure of maximum correlation. Through OMP algorithm, the corresponding basis functions are obtained, which are shown in Figure 1. When extracting a single object, with contour length correlation of OMP, the obtained result is shown in Figure 1(d). With prior information of triangle area of OMP, the result is shown in Figure 1(d). By setting M = 4 of OMP, the first four maximum correlation basis functions are obtained, and Y˜ is obtained, which is shown in Figure 1(e). The redundant part Y¯=Y−Y˜ is shown in Figure 1(f), which always includes noise and nontarget objects. The detected points Y are classed into two parts Y˜ and Y¯.


## 3. Proposed Method

### 3.1. Problem Analysis

The MAC is a segmentation model based on the edge information. In this model, there are two major problems when extracting the target object. The segmentation result of Figure2(a) shows that the MAC model extracts some nontarget regions (including some noises) and the final extracted contour is inaccurate.Figure 2
Segmentation results with the MAC model. (a) The segmentation result of the image with MAC. (b) The results of edge detection.
(a)(b)The reasons for these problems lie in the MAC model itself. The magnetic field is used to extract the target object, while the magnetic field depends on the edge information which is obtained by some detection operators. The detection result is shown in Figure2(b). Some noise points and other nontarget objects are obtained in the process of detection. Therefore, the segmentation results with MAC will be influenced.


### 3.2. MAC Model with the Classification Method of Sparse Representation

In view of the shortcomings of the MAC model, the evolution equation (5) is improved in this paper. The force field is computed with the classified edge points. Two images in Figure 3 are taken as examples. The implementation process of the improved model is as follows.Figure 3
Segmentation results with the proposed model. (a, b) The segmentation results of the MAC model. (c, d) Classification results of the edge contours.
(a)(b)(c)(d)First, the rough edge points are obtained by using the original edge detection operator, and the detected results are easily affected by noise and nontarget objects. Thus, it directly leads to a result that the model cannot accurately extract the edge information of the target object. The segmentation results are not ideal. In this paper, the extracted result is denoted bye, which can be expressed as follows:(12)e=e1+e2+⋯+eN,E=e1,e2,…,eN,where e represents the detected result, and it contains some noise points and edges of nontarget objects, and the results are shown in Figures 3(a) and 3(b).Second, the edge points obtained by using the edge detection operator form the contour curve. The precondition is that the edge contourse are divided into two types by sparse classification; that is, the formula is expressed as(13)e=e˜+e¯.Some edge contours for describing the target objects are represented ase˜=e1+e2+⋯+eM,M≤N. The other edge contours are represented as e¯, and they are viewed as redundant. In general, for an image with a single target as shown in Figure 3(a), the target object can be determined according to edge feature (such as edge length). The longest edge contour is extracted by using the edge length, and the edge contour of the obtained target object is shown by the red line in Figure 3(c), the green contour curves represent the part that is considered redundant. On the other hand, for an image with multiple targets in Figure 3(b), target objects can be determined according to the following steps. Firstly, the contours in the detected result are marked as basis functions. Then, the OMP algorithm is used to select the coefficient that is most correlated with the residual in each iteration. Because the target contour occupies a large proportion in the foreground, the contour length is usually used as the maximum correlation measure without other prior information. In the end, the target objects are extracted, and the target objects are distinguished from the redundancy. The result after classification is shown in Figures 3(c) and 3(d). The red contour curves represent the target part.For an image with multiple objects of Figure3(b), we determine the M=2 through the OMP algorithm, and the formula can be written as(14)e˜=e1+e2.Finally, a new magnetic field is generated for the evolution of the contour according to the edge informatione˜ of the target object extracted from the classification.


## 3.1. Problem Analysis

The MAC is a segmentation model based on the edge information. In this model, there are two major problems when extracting the target object. The segmentation result of Figure2(a) shows that the MAC model extracts some nontarget regions (including some noises) and the final extracted contour is inaccurate.Figure 2
Segmentation results with the MAC model. (a) The segmentation result of the image with MAC. (b) The results of edge detection.
(a)(b)The reasons for these problems lie in the MAC model itself. The magnetic field is used to extract the target object, while the magnetic field depends on the edge information which is obtained by some detection operators. The detection result is shown in Figure2(b). Some noise points and other nontarget objects are obtained in the process of detection. Therefore, the segmentation results with MAC will be influenced.


## 3.2. MAC Model with the Classification Method of Sparse Representation

In view of the shortcomings of the MAC model, the evolution equation (5) is improved in this paper. The force field is computed with the classified edge points. Two images in Figure 3 are taken as examples. The implementation process of the improved model is as follows.Figure 3
Segmentation results with the proposed model. (a, b) The segmentation results of the MAC model. (c, d) Classification results of the edge contours.
(a)(b)(c)(d)First, the rough edge points are obtained by using the original edge detection operator, and the detected results are easily affected by noise and nontarget objects. Thus, it directly leads to a result that the model cannot accurately extract the edge information of the target object. The segmentation results are not ideal. In this paper, the extracted result is denoted bye, which can be expressed as follows:(12)e=e1+e2+⋯+eN,E=e1,e2,…,eN,where e represents the detected result, and it contains some noise points and edges of nontarget objects, and the results are shown in Figures 3(a) and 3(b).Second, the edge points obtained by using the edge detection operator form the contour curve. The precondition is that the edge contourse are divided into two types by sparse classification; that is, the formula is expressed as(13)e=e˜+e¯.Some edge contours for describing the target objects are represented ase˜=e1+e2+⋯+eM,M≤N. The other edge contours are represented as e¯, and they are viewed as redundant. In general, for an image with a single target as shown in Figure 3(a), the target object can be determined according to edge feature (such as edge length). The longest edge contour is extracted by using the edge length, and the edge contour of the obtained target object is shown by the red line in Figure 3(c), the green contour curves represent the part that is considered redundant. On the other hand, for an image with multiple targets in Figure 3(b), target objects can be determined according to the following steps. Firstly, the contours in the detected result are marked as basis functions. Then, the OMP algorithm is used to select the coefficient that is most correlated with the residual in each iteration. Because the target contour occupies a large proportion in the foreground, the contour length is usually used as the maximum correlation measure without other prior information. In the end, the target objects are extracted, and the target objects are distinguished from the redundancy. The result after classification is shown in Figures 3(c) and 3(d). The red contour curves represent the target part.For an image with multiple objects of Figure3(b), we determine the M=2 through the OMP algorithm, and the formula can be written as(14)e˜=e1+e2.Finally, a new magnetic field is generated for the evolution of the contour according to the edge informatione˜ of the target object extracted from the classification.


## 4. Experiment and Analysis

These experiments are simulated mainly in the MATLAB R2010a, with Intel Core 3.20GHZ and 4 GB of memory environment. The proposed model is compared with some advanced models. The compared models include the classical CV model, the SBGFRLS model, the LIF model, the SDREL model, and the MAC model. Not only the real images but also the medical images are tested, and the segmentation performance of the proposed model is evaluated objectively by calculating the Jaccard similarity coefficient [37] and F-score [38].


### 4.1. Segmentation of Images with a Single Target

The images in this section are the real images published in the Weizmann database [39] for testing, for example, the six images in Figure 4. Label images for quantitative evaluation are also provided in this database. The remaining images are medical images and other images, and these images are also used for testing. Among them, the segmentation results of images with a single target are shown in Figure 4.Figure 4
Segmentation results with models. (a) CV model. (b) SBGFRLS model. (c) LIF model. (d) SDREL. (e) MAC model. (f) Proposed model.
(a)(b)(c)(d)(e)(f)From these images, the region-based CV model and the SBGFRLS model are easily affected by the complex background when extracting the target objects. As shown in the segmentation results of Figures4(a) and 4(b), these models not only extract noise points but also extract some other unnecessary objects. Thus, the segmentation results are not ideal. The MAC model based on the edge information has the same disadvantages as the two models mentioned above, and the segmentation results are shown in Figure 4(e). The segmentation results of the LIF model and the SDREL model are shown in Figures 4(c) and 4(d), respectively. The LIF model is easy to be affected by the noise and inhomogeneous intensity regions, the extracted contour curves are disordered which are sensitive to initialization, and the segmentation results are inaccurate. As shown in the segmentation result of the fourth image of the SDREL model, the saliency feature is utilized to acquire an object. However, some nontargets are not detected as saliency areas so that some oversegmentation regions appear.The segmentation results of the proposed model are shown in Figure4(f). Since the edge contour is classified by the classification method based on sparse representation, and only the edge contour of the target object is utilized to generate a new magnetic field; therefore, the proposed model can robustly extract the object contour, and the segmentation results are better.


### 4.2. Segmentation of Images with Multiple Targets

In this section, several advanced models are used to test the segmentation performance of images with multiple targets, and the segmentation results of various models are shown in Figure5. It can be seen that the segmentation results of the proposed model are significantly better than other models participating in the comparison. During the segmentation of these images, the parameters in each model are set to default values without any changes. Both CV and SBGFRLS models utilize the region information to evolve the contour, and they are robust to noise compared with the ACMs based on edge information. As shown in Figures 5(a) and 5(b), the results are less affected by noise, but they are affected by nontarget objects. For example, the first row segmentation results of Figures 5(a) and 5(b) show that the segmentation results of these models include some nonobjects.Figure 5
Segmentation results of tested models. (a) CV model. (b) SBGFRLS model. (c) LIF model. (d) SDREL model. (e) MAC model. (f) Proposed model.
(a)(b)(c)(d)(e)(f)The ACMs based on local information are always sensitive to noise, such as LIF and MAC models. The corresponding segmentation results shown Figures5(c) and 5(e) are greatly affected by the noise.The SDREL model has the disadvantage of easily crossing weak boundaries, as shown in the first image of Figure5(d). The proposed model utilizes the classification method of sparse representation. In the proposed model, M = 2 is set in the simulations, and noise and nontarget objects are viewed as redundancy; thus, it improves the segmentation accuracy.


### 4.3. Quantitative Assessment

#### 4.3.1. Jaccard Similarity Coefficient

In order to objectively reflect the good segmentation performance of the proposed model, the Jaccard similarity coefficient (JS) is used for quantitative evaluation in this section. That is, the label images published in [39] are compared with the segmentation results of several advanced models mentioned in Figures 4 and 5. Jaccard similarity coefficient formula [37] is(15)JSA,B=A∩BA∪B,where A is the segmentation result and B is the ground truth of the original image. When the JS value is larger, indicating higher similarity, the segmentation results are relatively accurate. The JS values of each model are shown in Tables 1 and 2. More segmentation results with our model are shown in Figure 6 and the assessment results are shown in Table 3. Because the edge contours are classified in the proposed method, the edge contour of the desired target is extracted, and the new magnetic field is generated. Consequently, compared with the other models, the segmentation results of the proposed model are the best. For example, it can be seen from Table 1 that the LIF model is greatly influenced by the noise, and the segmentation effect is always not ideal. Compare the JS values of the first column and the sixth column in Table 1. CV model and SBGFRLS model are having better segmentation results in Figure 5 compared with the models based on local information, such as LIF.Table 1
The JS values of each model.
ABCDEFCV0.91080.90080.89330.73250.45870.8700SBGFRLS0.81170.64410.24940.95950.09270.7456LIF0.39610.43830.36350.43350.04550.3678SDREL0.79160.87320.49150.88550.18190.8500MAC0.73330.71500.80890.55380.39790.9230OURS0.9814▪0.9702▪0.9529▪0.9602▪0.9043▪0.9676▪A–F represent the six original images with a single target in Figure4, respectively; the top results are indicated by ▪.Table 2
The JS values of each model.
ABCDCV0.45640.78350.93630.9573SBGFRLS0.08950.78310.82010.9863LIF0.08080.16590.53320.4211SDREL0.11450.64230.91620.9453MAC0.71920.79870.71260.9176OURS0.9290▪0.9638▪0.9548▪0.9805▪A–D represent the four original images with multiple targets in Figure5, respectively; the top results are indicated by ▪.Figure 6
More segmentation results with our model.Table 3
The averaged JS values of tested models.
IDCVSBGFRLSLIFSDRELMACOURSJS0.79000.61820.32460.66920.72800.9565Table2 shows the segmentation performance of the models. They represent the Jaccard similarity coefficients of the four images with multiple targets in Figure 5. Because of the influence of nonobjects, the accuracy with the models based on region information is not ideal, as shown in Figure 2(a), and the Jaccard similarity coefficient of the proposed model is higher than that of the other models. It verifies again that the segmentation results of the proposed model are ideal. The averaged JS is shown in Table 3. From Table 3, the proposed method obtains the averaged JS in tested images, which show the robustness of the proposed method. More results with the proposed method are shown in Figure 6, and the corresponding JS is shown in Table 4, which verifies the robust performances of the proposed method.Table 4
The JS values of Figure6.
ID12345678910JS0.84950.80960.93700.85920.83970.97510.93290.96960.93940.9929Since the proposed method is integrated into the MAC model, in order to evaluate the upgrade rate with the proposed method, the results in Figure4 with MAC and the proposed method for quantitative analysis are compared. The F-score algorithm [38] is used as a standard. The formula of the algorithm is as follows:(16)P=TPTP+FP,R=TPTP+FN,F=2∗PRP+R.Among them, TP is the correct segmentation sample of the target foreground; FP is a sample that divides the target background error into the foreground; FN is a sample that divides the target foreground error into the background. P is the precision rate, representing the proportion of the correct segmentation foreground to the total segmentation foreground; R is the recall rate, representing the proportion of the correct segmentation foreground to the standard sample of the target foreground. F is the accuracy rate, and it is the overall evaluation index to judge whether the segmentation result is accurate. The results obtained by the F-score algorithm are shown in Table5.Table 5
Comparison of different models.
ModelABCDPRFPRFPRFPRFMAC95.9163.7176.5696.1174.4583.9199.8950.5167.0998.5590.7994.51Ours95.7082.3488.5299.7991.9395.7099.7993.8196.7197.3799.7098.52A–D represent the four original images with multiple targets in Figure4.It can be seen from Table4 that the segmentation results of the proposed model are more ideal and more suitable for the desired target. The specific performance is that the precision rate, recall rate, and accuracy rate of segmentation results of the proposed model are relatively high, there is no larger oversegmentation or leakage segmentation, and the overall precision is better. Compared with the original MAC model, the segmentation precision is improved with the proposed model. When the segmentation effect is relatively satisfied, the segmentation effect with the proposed model is more accurate. Some more comparisons with MAC are shown in Figure 7. The object region is prior, and the proposed method converges to the objects. But MAC extracts some noise and nonobjects. The typical result is shown in the second result of Figure 7(a).Figure 7
Segmentation results of medical images. (a) The segmentation results of the MAC model. (b) The segmentation results of the proposed model.
(a)(b)


## 4.1. Segmentation of Images with a Single Target

The images in this section are the real images published in the Weizmann database [39] for testing, for example, the six images in Figure 4. Label images for quantitative evaluation are also provided in this database. The remaining images are medical images and other images, and these images are also used for testing. Among them, the segmentation results of images with a single target are shown in Figure 4.Figure 4
Segmentation results with models. (a) CV model. (b) SBGFRLS model. (c) LIF model. (d) SDREL. (e) MAC model. (f) Proposed model.
(a)(b)(c)(d)(e)(f)From these images, the region-based CV model and the SBGFRLS model are easily affected by the complex background when extracting the target objects. As shown in the segmentation results of Figures4(a) and 4(b), these models not only extract noise points but also extract some other unnecessary objects. Thus, the segmentation results are not ideal. The MAC model based on the edge information has the same disadvantages as the two models mentioned above, and the segmentation results are shown in Figure 4(e). The segmentation results of the LIF model and the SDREL model are shown in Figures 4(c) and 4(d), respectively. The LIF model is easy to be affected by the noise and inhomogeneous intensity regions, the extracted contour curves are disordered which are sensitive to initialization, and the segmentation results are inaccurate. As shown in the segmentation result of the fourth image of the SDREL model, the saliency feature is utilized to acquire an object. However, some nontargets are not detected as saliency areas so that some oversegmentation regions appear.The segmentation results of the proposed model are shown in Figure4(f). Since the edge contour is classified by the classification method based on sparse representation, and only the edge contour of the target object is utilized to generate a new magnetic field; therefore, the proposed model can robustly extract the object contour, and the segmentation results are better.


## 4.2. Segmentation of Images with Multiple Targets

In this section, several advanced models are used to test the segmentation performance of images with multiple targets, and the segmentation results of various models are shown in Figure5. It can be seen that the segmentation results of the proposed model are significantly better than other models participating in the comparison. During the segmentation of these images, the parameters in each model are set to default values without any changes. Both CV and SBGFRLS models utilize the region information to evolve the contour, and they are robust to noise compared with the ACMs based on edge information. As shown in Figures 5(a) and 5(b), the results are less affected by noise, but they are affected by nontarget objects. For example, the first row segmentation results of Figures 5(a) and 5(b) show that the segmentation results of these models include some nonobjects.Figure 5
Segmentation results of tested models. (a) CV model. (b) SBGFRLS model. (c) LIF model. (d) SDREL model. (e) MAC model. (f) Proposed model.
(a)(b)(c)(d)(e)(f)The ACMs based on local information are always sensitive to noise, such as LIF and MAC models. The corresponding segmentation results shown Figures5(c) and 5(e) are greatly affected by the noise.The SDREL model has the disadvantage of easily crossing weak boundaries, as shown in the first image of Figure5(d). The proposed model utilizes the classification method of sparse representation. In the proposed model, M = 2 is set in the simulations, and noise and nontarget objects are viewed as redundancy; thus, it improves the segmentation accuracy.


## 4.3. Quantitative Assessment

### 4.3.1. Jaccard Similarity Coefficient

In order to objectively reflect the good segmentation performance of the proposed model, the Jaccard similarity coefficient (JS) is used for quantitative evaluation in this section. That is, the label images published in [39] are compared with the segmentation results of several advanced models mentioned in Figures 4 and 5. Jaccard similarity coefficient formula [37] is(15)JSA,B=A∩BA∪B,where A is the segmentation result and B is the ground truth of the original image. When the JS value is larger, indicating higher similarity, the segmentation results are relatively accurate. The JS values of each model are shown in Tables 1 and 2. More segmentation results with our model are shown in Figure 6 and the assessment results are shown in Table 3. Because the edge contours are classified in the proposed method, the edge contour of the desired target is extracted, and the new magnetic field is generated. Consequently, compared with the other models, the segmentation results of the proposed model are the best. For example, it can be seen from Table 1 that the LIF model is greatly influenced by the noise, and the segmentation effect is always not ideal. Compare the JS values of the first column and the sixth column in Table 1. CV model and SBGFRLS model are having better segmentation results in Figure 5 compared with the models based on local information, such as LIF.Table 1
The JS values of each model.
ABCDEFCV0.91080.90080.89330.73250.45870.8700SBGFRLS0.81170.64410.24940.95950.09270.7456LIF0.39610.43830.36350.43350.04550.3678SDREL0.79160.87320.49150.88550.18190.8500MAC0.73330.71500.80890.55380.39790.9230OURS0.9814▪0.9702▪0.9529▪0.9602▪0.9043▪0.9676▪A–F represent the six original images with a single target in Figure4, respectively; the top results are indicated by ▪.Table 2
The JS values of each model.
ABCDCV0.45640.78350.93630.9573SBGFRLS0.08950.78310.82010.9863LIF0.08080.16590.53320.4211SDREL0.11450.64230.91620.9453MAC0.71920.79870.71260.9176OURS0.9290▪0.9638▪0.9548▪0.9805▪A–D represent the four original images with multiple targets in Figure5, respectively; the top results are indicated by ▪.Figure 6
More segmentation results with our model.Table 3
The averaged JS values of tested models.
IDCVSBGFRLSLIFSDRELMACOURSJS0.79000.61820.32460.66920.72800.9565Table2 shows the segmentation performance of the models. They represent the Jaccard similarity coefficients of the four images with multiple targets in Figure 5. Because of the influence of nonobjects, the accuracy with the models based on region information is not ideal, as shown in Figure 2(a), and the Jaccard similarity coefficient of the proposed model is higher than that of the other models. It verifies again that the segmentation results of the proposed model are ideal. The averaged JS is shown in Table 3. From Table 3, the proposed method obtains the averaged JS in tested images, which show the robustness of the proposed method. More results with the proposed method are shown in Figure 6, and the corresponding JS is shown in Table 4, which verifies the robust performances of the proposed method.Table 4
The JS values of Figure6.
ID12345678910JS0.84950.80960.93700.85920.83970.97510.93290.96960.93940.9929Since the proposed method is integrated into the MAC model, in order to evaluate the upgrade rate with the proposed method, the results in Figure4 with MAC and the proposed method for quantitative analysis are compared. The F-score algorithm [38] is used as a standard. The formula of the algorithm is as follows:(16)P=TPTP+FP,R=TPTP+FN,F=2∗PRP+R.Among them, TP is the correct segmentation sample of the target foreground; FP is a sample that divides the target background error into the foreground; FN is a sample that divides the target foreground error into the background. P is the precision rate, representing the proportion of the correct segmentation foreground to the total segmentation foreground; R is the recall rate, representing the proportion of the correct segmentation foreground to the standard sample of the target foreground. F is the accuracy rate, and it is the overall evaluation index to judge whether the segmentation result is accurate. The results obtained by the F-score algorithm are shown in Table5.Table 5
Comparison of different models.
ModelABCDPRFPRFPRFPRFMAC95.9163.7176.5696.1174.4583.9199.8950.5167.0998.5590.7994.51Ours95.7082.3488.5299.7991.9395.7099.7993.8196.7197.3799.7098.52A–D represent the four original images with multiple targets in Figure4.It can be seen from Table4 that the segmentation results of the proposed model are more ideal and more suitable for the desired target. The specific performance is that the precision rate, recall rate, and accuracy rate of segmentation results of the proposed model are relatively high, there is no larger oversegmentation or leakage segmentation, and the overall precision is better. Compared with the original MAC model, the segmentation precision is improved with the proposed model. When the segmentation effect is relatively satisfied, the segmentation effect with the proposed model is more accurate. Some more comparisons with MAC are shown in Figure 7. The object region is prior, and the proposed method converges to the objects. But MAC extracts some noise and nonobjects. The typical result is shown in the second result of Figure 7(a).Figure 7
Segmentation results of medical images. (a) The segmentation results of the MAC model. (b) The segmentation results of the proposed model.
(a)(b)


## 4.3.1. Jaccard Similarity Coefficient

In order to objectively reflect the good segmentation performance of the proposed model, the Jaccard similarity coefficient (JS) is used for quantitative evaluation in this section. That is, the label images published in [39] are compared with the segmentation results of several advanced models mentioned in Figures 4 and 5. Jaccard similarity coefficient formula [37] is(15)JSA,B=A∩BA∪B,where A is the segmentation result and B is the ground truth of the original image. When the JS value is larger, indicating higher similarity, the segmentation results are relatively accurate. The JS values of each model are shown in Tables 1 and 2. More segmentation results with our model are shown in Figure 6 and the assessment results are shown in Table 3. Because the edge contours are classified in the proposed method, the edge contour of the desired target is extracted, and the new magnetic field is generated. Consequently, compared with the other models, the segmentation results of the proposed model are the best. For example, it can be seen from Table 1 that the LIF model is greatly influenced by the noise, and the segmentation effect is always not ideal. Compare the JS values of the first column and the sixth column in Table 1. CV model and SBGFRLS model are having better segmentation results in Figure 5 compared with the models based on local information, such as LIF.Table 1
The JS values of each model.
ABCDEFCV0.91080.90080.89330.73250.45870.8700SBGFRLS0.81170.64410.24940.95950.09270.7456LIF0.39610.43830.36350.43350.04550.3678SDREL0.79160.87320.49150.88550.18190.8500MAC0.73330.71500.80890.55380.39790.9230OURS0.9814▪0.9702▪0.9529▪0.9602▪0.9043▪0.9676▪A–F represent the six original images with a single target in Figure4, respectively; the top results are indicated by ▪.Table 2
The JS values of each model.
ABCDCV0.45640.78350.93630.9573SBGFRLS0.08950.78310.82010.9863LIF0.08080.16590.53320.4211SDREL0.11450.64230.91620.9453MAC0.71920.79870.71260.9176OURS0.9290▪0.9638▪0.9548▪0.9805▪A–D represent the four original images with multiple targets in Figure5, respectively; the top results are indicated by ▪.Figure 6
More segmentation results with our model.Table 3
The averaged JS values of tested models.
IDCVSBGFRLSLIFSDRELMACOURSJS0.79000.61820.32460.66920.72800.9565Table2 shows the segmentation performance of the models. They represent the Jaccard similarity coefficients of the four images with multiple targets in Figure 5. Because of the influence of nonobjects, the accuracy with the models based on region information is not ideal, as shown in Figure 2(a), and the Jaccard similarity coefficient of the proposed model is higher than that of the other models. It verifies again that the segmentation results of the proposed model are ideal. The averaged JS is shown in Table 3. From Table 3, the proposed method obtains the averaged JS in tested images, which show the robustness of the proposed method. More results with the proposed method are shown in Figure 6, and the corresponding JS is shown in Table 4, which verifies the robust performances of the proposed method.Table 4
The JS values of Figure6.
ID12345678910JS0.84950.80960.93700.85920.83970.97510.93290.96960.93940.9929Since the proposed method is integrated into the MAC model, in order to evaluate the upgrade rate with the proposed method, the results in Figure4 with MAC and the proposed method for quantitative analysis are compared. The F-score algorithm [38] is used as a standard. The formula of the algorithm is as follows:(16)P=TPTP+FP,R=TPTP+FN,F=2∗PRP+R.Among them, TP is the correct segmentation sample of the target foreground; FP is a sample that divides the target background error into the foreground; FN is a sample that divides the target foreground error into the background. P is the precision rate, representing the proportion of the correct segmentation foreground to the total segmentation foreground; R is the recall rate, representing the proportion of the correct segmentation foreground to the standard sample of the target foreground. F is the accuracy rate, and it is the overall evaluation index to judge whether the segmentation result is accurate. The results obtained by the F-score algorithm are shown in Table5.Table 5
Comparison of different models.
ModelABCDPRFPRFPRFPRFMAC95.9163.7176.5696.1174.4583.9199.8950.5167.0998.5590.7994.51Ours95.7082.3488.5299.7991.9395.7099.7993.8196.7197.3799.7098.52A–D represent the four original images with multiple targets in Figure4.It can be seen from Table4 that the segmentation results of the proposed model are more ideal and more suitable for the desired target. The specific performance is that the precision rate, recall rate, and accuracy rate of segmentation results of the proposed model are relatively high, there is no larger oversegmentation or leakage segmentation, and the overall precision is better. Compared with the original MAC model, the segmentation precision is improved with the proposed model. When the segmentation effect is relatively satisfied, the segmentation effect with the proposed model is more accurate. Some more comparisons with MAC are shown in Figure 7. The object region is prior, and the proposed method converges to the objects. But MAC extracts some noise and nonobjects. The typical result is shown in the second result of Figure 7(a).Figure 7
Segmentation results of medical images. (a) The segmentation results of the MAC model. (b) The segmentation results of the proposed model.
(a)(b)


## 5. Conclusion

In this paper, a magnetostatic active contour model with a classification method of sparse representation is proposed, in order to solve the problem that the magnetostatic active contour model is often affected by the nonobject background and noise in the image segmentation. In this model, the idea of sparse representation is introduced. The edge contours are divided into two categories: targets and redundancies. Only the edge contours of the target objects are extracted by edge feature or OMP algorithm, and they are recalculated to generate a new magnetic field. This method could robustly extract the edge contour of the target object. It is simple and easy to implement. And it can effectively avoid the influence of noise points and unnecessary objects.



---

*Source: 5438763-2020-07-01.xml*