1 Introduction

Image processing is not only a basic task of computer vision, but also the basis for applications like image encryption and big data [2, 8, 9, 20]. As the basis of target detection, identification and behavior analysis, image segmentation has been extensively applied in a variety of fields [8, 14, 21,22,23, 31]. Despite such applications, influenced by various factors, images usually have features such as intensity inhomogeneity, blurred edges and low contrast, which renders difficulties in the accurate segmentation of images. The active contour model [1, 3, 10, 11, 27, 29] is an effective image segmentation algorithm, which applies a level set function to image segmentation. Compared with other image segmentation methods, the level set method has greater advantages in the segmentation of low contrast and complex images [13, 16, 24, 35]. The Chan_Vese (CV) model [1] is a traditional active contour model, which uses the intensity information inside and outside the evolution curve to construct the energy function and achieve image segmentation. However, since the CV model uses the global information of the image to construct the energy function, the segmentation performance of images with intensity inhomogeneity is poor.

2 Literature review

In order to segment images with intensity inhomogeneity, scholars have proposed a large number of segmentation models in which local gray information is combined [5,6,7, 10, 17,18,19, 26, 28, 30, 32]. In one previous study [10], a local binary fitting (LBF) model based on local energy was proposed, in which the Gaussian kernel function is used to extract the local information of the image, and the gray mean value of the local region is calculated. Thus, the fitting value of the model is closer to the real gray value of the image. At the same time, the energy function is constructed by the Gaussian kernel function and gray mean value. The segmentation results of synthetic image and medical image revealed that the model had a better segmentation effect on images with intensity inhomogeneity. Although the model had a better effect, due to the adopted local gray information, the model is sensitive to the initial contour position, and the evolution curve is easy to fall into local optimum. In a previous study [28], a new CV evolution equation was firstly constructed based on the evolution law of Hamilton-Jacobi partial differential equations, so as to reduce the sensitivity of CV model to the initial contour position. Secondly, to improve the segmentation accuracy of the CV model for the images with intensity inhomogeneity, the local energy term was constructed by the image gray mean of regions inside and outside the evolution curve. However, due to the local gray scale information used in the method, the evolution curve also fell into the local optimum. In a previous study, [30] images were fitted using the local mean and a new energy function was constructed with the square variance of the fitted image and the real image. The experimental results revealed that the model achieved the same segmentation effect as the LBF model with a time complexity lower than that of the LBF model, but also had the problem that the evolution curve was easy to fall into local optimum. In another study [5], a level set image segmentation model was proposed in which local and global gray levels. In the model, a new fitted image was constructed with the original image and the mean filtered image, and the window function was used to calculate local gray mean of the fitted image for constructing the local energy term. Combining the local energy term with the CV model, the segmentation results for medical images and natural images revealed that the method effectively segmented images with intensity inhomogeneity, but the model was still sensitive to the initial contour position. In other previous research [32], global gradient information was introduced into the LBF model and both gradient information and gray information were used to construct the energy function. Driven by the global gradient, the model evolved towards the target edge, and the evolution curve would not fall into the local optimum. Despite such advantages, the segmentation effect for weak edge images was insufficient for the use of gradient information. To provide optimal segmentation for each pixel, the optimal segmentation plane was derived in the image domain through a heterogeneous image model, and the newly proposed region-based pressure function was used to construct the energy function [7]. The model could effectively handle images with intensity inhomogeneity. At the same time, the robustness of the model was improved by estimating the deviation field with adaptive scale parameters. However, there are many convolution operations in the process of energy function construction in the method, and therefore, the efficiency for operation of the model is low. A new hybrid level set image segmentation model was proposed, in which local entropy was used to construct coefficients of global terms and the evolution of the curve was driven by a two-scale method [17]. The experiment results revealed that the model had a good segmentation effect for images with intensity inhomogeneity, but the model adopted the local information of images to construct energy terms, and thus, the model also had the local optimum problem. In a previous study [18], the energy function was constructed by using the mean and variance of the intensity in the local region, and the energy function was introduced into the level set function. The experimental results on the segmentation of synthetic images and natural images revealed that the method had a good segmentation effect on images with intensity inhomogeneity, but the mean value of the target was required to be equal to that of the background. The difference between the local gray mean value and the real image was introduced into the sigmoid function to construct two adjustment functions, and the two adjustment functions were introduced into the level set function to construct a new energy function [19]. The segmentation experiments of natural images and composite images revealed that the model had a good segmentation effect on images with intensity inhomogeneity, but the model could only handle images with a large contrast between the target and the background, and had poor segmentation performance for low contrast images [19]. A new active contour model was constructed by combining global and local information, in which the global signed pressure force function (SPF) was constructed by the global gray mean and median, and the local gray mean and pixel were used to structure the local SPF [26]. Finally, a new energy function was constructed by combining the global and local SPF. The segmentation results of synthetic images and medical images revealed that the proposed method had a good segmentation effect on images with intensity inhomogeneity, but the model could only resolve simple background images. In another previous study [6], local spatial constraints were introduced into the LBF model to obtain the local gray mean value, and the local gray mean value and the global gray mean value were introduced into the edge indication function to construct a new edge indication function. Finally, the edge indication function was introduced into the fuzzy active contour model. The segmentation results of natural images and synthetic images revealed that the model could effectively segment images with intensity inhomogeneity, but the segmentation performance of the model for weak edge images was insufficient [6]. Although the aforementioned models may segment images with intensity inhomogeneity, the local information of image adopted during the construction of the model makes the model easy to fall into the local optimum and sensitive to the initial contour.

In order to effectively segment images with intensity inhomogeneity, low contrast and blurred edges, the CV model was improved in terms of the following three aspects: (1) using a previous study as a reference [25], local energy terms were constructed through the intensity mean values of local areas inside and outside the evolution curve, so as to capture the intensity inhomogeneity of images; (2) using a previous study as a reference [28], the global energy term was constructed by using the gray mean values of images inside and outside the evolution curve to drive the curve evolution and capture the target edge; and (3) a new hybrid active contour model was constructed by combining the local energy term and the global energy term, and the weight coefficient was calculated to adjust the relationship between the local energy term and the global energy term, so that the adaptive adjustment curve of the model evolved to the edge of the target.

The rest of the paper is organized as follows: the literature review is provided in Section 2; the methodology (method) is given in Section 3; the results are listed in Section 4; and the conclusions and policy implications are provided in Section 5.

3 The proposed hybrid active contour model

In the present study, a new hybrid active contour model was proposed to segment images with intensity inhomogeneity, low contrast and blurred edges. The model includes a local energy term and a global energy term. The local energy term is used to ensure the segmentation performance of images with intensity inhomogeneity, and the global energy term avoids the curve evolution falling into the local optimum, so as to capture the target edge more accurately.

3.1 Local energy term

Intensity inhomogeneity will seriously affect the quality of image segmentation, and capturing the intensity inhomogeneity of an image by using local information is an effective method. In previous studies [10, 18, 19], the local information of images was used to segment intensity inhomogeneity images. Thus, a new local energy term was constructed in the present study to capture the intensity inhomogeneity of images. Suppose Ω ⊂ R2 is the image region, I(x) : Ω → R2 is the gray value of point x in the image, C is the closed curve, Ω is divided into the inner region and the outer region of the curve by curve C, and the closed curve C is replaced by the level set function φ, then the local energy term is shown in Eq. (1).

$$ {E}_L\left(\varphi, {f}_1,{f}_2\right)={\kappa}_1{\int}_{\Phi \cap {w}_{k\times l}}{\left(I(x)-{f}_1\right)}^2{H}_{\varepsilon}\left(\varphi (x)\right)\mathrm{d}x+{\kappa}_2{\int}_{\mathrm{\partial \Phi}\cap {W}_{k\times l}}{\left(I(x)-{f}_2\right)}^2\left(1-{H}_{\varepsilon}\left(\varphi (x)\right)\right)\mathrm{d}x $$
(1)

where κ1 and κ2 are positive constants; f1 and f2 are the gray mean values of the inner and outer local regions in of the evolution curve C, respectively; Hε(φ(x))is the Heaviside function, as shown in Eq. (2); Φ and ∂Φ represent the inner and outer regions of the evolution curve, respectively, as shown in Eq. (3), R represents the set of pixels that meet the conditions; φ(x) = 0 is the boundary; and Wk × l is a rectangular window of size k × l, which is used to extract the local information of the image.

$$ {H}_{\varepsilon }(x)=\frac{1}{2}\left(1+\frac{2}{\pi}\mathit{\arctan}\left(\frac{x}{\upvarepsilon}\right)\right) $$
(2)
$$ \left\{\begin{array}{c}\varPhi =\mathrm{R}\left(\varphi \left(\mathrm{x}\right)>0\right)\\ {}\partial \varPhi =\mathrm{R}\left(\varphi \left(\mathrm{x}\right)<0\right)\end{array}\right. $$
(3)

In Eq. (2), ε is a positive constant. In Eq. (3), φ is a level set function.f1 and f2 can be obtained from Eq. (4).

$$ \left\{\begin{array}{c}{f}_1=\mathrm{average}\left(I(x)\in \left\{\left(\varPhi \cap {W}_{k\times l}\right)|x\in \varPhi \right\}\right)\\ {}{f}_2=\mathrm{average}\left(I(x)\in \left\{\left(\partial \varPhi \cap {W}_{k\times l}\right)|x\in \partial \varPhi \right\}\right)\end{array}\right. $$
(4)

In Eq. (4), a rectangular window function is used to construct the local area of the image inside and outside the evolution curve, so as to extract the gray information of the image in the local area and calculate the average gray value f1 and f2 of the local area inside and outside the evolution curve. As such, the fitting value of the proposed model is approximately equal to the true value of the image, and images with intensity inhomogeneity can be segmented more accurately.

3.2 Global energy term

Driven by the local information of the image, the evolution curve is easy to fall into the local optimal value, which will lead to serious false segmentation. Previous studies [12, 33, 34] have shown that the global information of the image can effectively prevent the evolution curve from falling into the local optimal value. Hence, in the present study, the global information of the image was applied to the construction of the global energy term to drive the evolution curve to the edge of the target and avoid the model falling into the local optimum. The global energy term is shown in Eq. (5).

$$ {E}_G\left(\varphi, {c}_1,{c}_2\right)={\int}_{\varOmega}\left(I(x)-\frac{c_1+{c}_2}{2}\right){H}_{\varepsilon}\left(\varphi (x)\right)\mathrm{d}x $$
(5)

where φ is the level set function; Ω is the image region; c1 and c2 are the gray mean values of the inner and outer regions of the evolution curve C, as shown in Eq. (6); and Hε(φ(x))is the Heaviside function, as shown in Eq. (2).

$$ \left\{\begin{array}{c}{c}_1=\frac{\int_{\varOmega }I(x){H}_{\varepsilon}\left(\varphi (x)\right) dx}{\int_{\varOmega }{H}_{\varepsilon}\left(\varphi (x)\right) dx}\\ {}{c}_2=\frac{\int_{\varOmega }I(x)\left(1-{H}_{\varepsilon}\left(\varphi (x)\right)\right) dx}{\int_{\varOmega}\left(1-{H}_{\varepsilon}\left(\varphi (x)\right)\right) dx}\end{array}\right. $$
(6)

In Eq. (6), the global energy term can capture the image gray information inside and outside the evolution curve by the Heaviside function, and the evolution of the curve is driven by the difference between the gray mean value inside and outside the evolution curve and the actual gray value of the image to obtain the global optimal value of the image, so as to avoid falling into the local optimal value. In addition, the proposed global energy term integrates the internal gray mean value and external gray mean value into one term, so that the model can better capture the edge information of the target, and has a better segmentation effect on weak edge images.

3.3 Hybrid active contour model

Combining the local energy term in 3.1 and the global energy term in 3.2, the energy function of the hybrid active contour model is structured, as shown in Eq. (7).

$$ {\displaystyle \begin{array}{c}{E}_p\left(\varphi, {c}_1,{c}_2,{f}_1,{f}_2\right)=\omega {E}_L+\left(1-\omega \right){E}_G+\mu len\left(\varphi \right)\\ {}\kern1.00em =w\left({\kappa}_1{\int}_{\varPhi \cap {W}_{k\times l}}{\left(I(x)-{f}_1\right)}^2{H}_{\varepsilon}\left(\varphi (x)\right)\mathrm{d}x+{\kappa}_2{\int}_{\partial \varPhi \cap {W}_{k\times l}}{\left(I(x)-{f}_2\right)}^2\left(1-{H}_{\varepsilon}\left(\varphi (x)\right)\right)\mathrm{d}x\right)\\ {}\kern1.00em +\left(1-\omega \right){\int}_{\varOmega}\left(I(x)-\frac{c_1+{c}_2}{2}\right){H}_{\varepsilon}\left(\varphi (x)\right)\mathrm{d}x+\mu {\int}_{\varOmega }{\delta}_{\varepsilon}\left(\varphi (x)\right)\left|\nabla \varphi (x)\right|\mathrm{d}x\end{array}} $$
(7)

where μ is a positive constant; ω is the adaptive weight coefficient, as shown in Eq. (8), and the change of ω reflects the speed of the change of image gray information in the local area, which can make the evolution curve accurately stop at the edge of the target; and len(φ) is the length term, which is used to ensure the smoothness of the evolution curve. In the present study, a square local window of size (2 ∗ d + 1) × (2 ∗ d + 1) was used, where dis a positive constant for controlling the size of window.

$$ \omega =\frac{I_{Lmax}-{I}_{Lmin}}{I_{max}-{I}_{min}} $$
(8)

where ILmax and ILmin represent the maximum gray value and minimum gray value in the local area of the square Wk × l inside the evolution curve; and Imax and Imin represent the maximum gray value and minimum gray value in the whole image, respectively.

By using the gradient descent method to minimize the energy function of φ, the evolution equation of the model can be obtained, as shown in Eq. (9).

$$ \frac{\partial \varphi }{\partial t}={\delta}_{\varepsilon}\left(\varphi \right)\left(\omega {m}_1+\left(1-\omega \right){m}_2\right)+{\mu \delta}_{\varepsilon}\left(\varphi \right)\operatorname{div}\left(\frac{\nabla \varphi }{\left|\nabla \varphi \right|}\right) $$
(9)

In Eq. (9), div is the divergence operator, and div(∇φ/|∇φ|) is the curvature of the evolution curve; δε(φ) is the derivative of Hε(φ); and m1 and m2 are shown in Eq. (10). When the energy function is at the minimum, the evolution of the curve stops and the segmentation ends.

$$ \left\{\begin{array}{c}{m}_1={\kappa}_1{\left(I-{f}_1\right)}^2+{\kappa}_2{\left(I-{f}_2\right)}^2\\ {}{m}_2=I-\frac{c_1+{c}_2}{2}\end{array}\right. $$
(10)

where f1 and f2 are shown in Eq. (4); c1 and c2 are shown in Eq. (6).

The proposed model updates the evolution of Eq. (9) through Eq. (11).

$$ {\varphi}^{n+1}={\varphi}^n+v\frac{\partial \varphi }{\partial t}\mathrm{d}t $$
(11)

In Eq. (11), v is a positive constant, which is used to control the updating speed of the equation. φn + 1and φn are level set functions after iteration n + 1 and n times, respectively. dtis the time step. Figure 1 shows the flow chart of the algorithm (model) for the present study.

Fig. 1
figure 1

Flow chart of the algorithm (model)

4 Experimental results and analysis

In the present study paper, all experiments were implemented in MATLAB R2016A running on Lenovo Intel Core i7–6700 CPU @3.40GHz Windows 10 operating system. A large number of natural images and brain tumor images with intensity inhomogeneity, fuzzy edge and low contrast were segmented, and 9 natural images (A ~ I in Fig. 3) and 6 brain tumor images (J ~ O in Fig. 5) were randomly selected for analysis on the segmentation results. In order to evaluate the segmentation performance of the proposed model, the segmentation results of the proposed model were compared with the CV model [1], the improved CV model [28], the LBF model [10], the LOG model [3], the LPF model [4], the FRAGL model [6], a model from a previous study [25], and the GLSEPF model [15]. Notably, for the comparison of segmentation performance with the model in the previous study [25], only the image data available were used for the experiment. The parameters in the proposed model were set as: κ1 = κ2 = 1, ε = 0.5.

In order to effectively analyze the segmentation performance of the proposed model, the Segmentation accuracy (SA), Dice similarity index (DSC), Jaccard similarity (JS) and False positive volume function (FPVF) were used to evaluate the segmentation performance, and are shown in Eqs. (12) to (15).

$$ \mathrm{SA}=\frac{TP+ TN}{TP+ TN+ FP+ FN} $$
(12)
$$ \mathrm{DSC}=\frac{2\left|\boldsymbol{A}\cap \boldsymbol{B}\right|}{\left|\boldsymbol{A}\right|+\left|\boldsymbol{B}\right|} $$
(13)
$$ \mathrm{JS}=\frac{\left|\boldsymbol{A}\cap \boldsymbol{B}\right|}{\left|\boldsymbol{A}\cup \boldsymbol{B}\right|} $$
(14)
$$ \mathrm{FPVF}=\frac{\mid \boldsymbol{B}\mid -\mid \boldsymbol{A}\cap \boldsymbol{B}\mid }{\mid \boldsymbol{A}\mid } $$
(15)

In Eq. (12), TP is the true value, which indicates the target area of correct segmentation; TN is a true negative value, which indicates a correctly segmented background area; FP is a false positive value, indicating that the background is mistakenly divided into target areas; and FN is a false negative value, indicating that the target is mistakenly divided into the background area. In Eq. (13) to (15), B is the image obtained by algorithm segmentation, and A is the true image. it’s the schematic diagram is shown in Fig. 2. Among the aforementioned indicators, the larger SA, DSC, JS and smaller FPVF indicate that the segmentation effect was better.

Fig. 2
figure 2

Schematic diagram of parameters A, B, FN, FP, TN and TP

In Fig. 2, the red curve area and the yellow curve area represent B and A, respectively; the areas outside the red and yellow regions are TN; the region within the red region and the yellow region is TP; the areas within the red area and outside the yellow area are FP; and the region outside the red region and inside the yellow region is FN.

4.1 The segmentation experiments of natural images

In the present study, the segmentation results of nine natural images were analyzed, as shown in Fig. 3, the images had the characteristics of intensity inhomogeneity distribution and low contrast. In particular, the Ochotona curzoniae image had the characteristic of a blurred edge. In the experiment, the parameter settings of Fig. 3 are shown in Table 1.

Fig. 3
figure 3

Segmentation effects of the proposed model and other models on natural images

Table 1 The parameter settings of Fig. 3

In Fig. 3, the first column is the original image, and the rectangle in the Fig. 2 is the given initial contour; the second column to the ninth column are the segmentation results of the CV model, the improved CV model, the LBF model, the LOG model, the LPF model, the FRAGL model, the GLSEPF model and the proposed model.

From Fig. 3, the segmentation effect of the proposed model was better than the other models. Because the CV model segmented the image by the global information of the image, the image with intensity inhomogeneity could not be captured. The improved CV model, the LBF model, the LOG model, the LPF model and the GLSEPF model used the local information of the image for image segmentation, but in the process of curve evolution, the models would fall into the local optimal, and thus, there would be many small closed regions in the segmentation results. The FRAGL model had a good segmentation effect when the contrast between the target and the background was large, but could not effectively segment the image with low contrast. By extracting the local information of the image, the proposed model could effectively capture the intensity inhomogeneity of the image, and use the global intensity information of the image to drive the curve to the edge of the target. Further, the curve falling into the local optimum could be effectively avoided in the evolution process, and thus, the proposed model could effectively segment the image with intensity inhomogeneity.

In Fig. 4a–d represent SA, DSC, JS and FPVF, respectively, and sign “*” represents the segmentation results of the proposed model. From Fig. 4, an observation can be made that the SA, DSC and JS of the proposed model were significantly larger than those of the other models, and the FPVF was smaller than other models, which indicates that the proposed model could effectively segment the image with intensity inhomogeneity, blurred edge and low contrast.

Fig. 4
figure 4

SA, DSC, JS, and FPVF for each model in Fig. 3

Table 2 shows the average values of SA, DSC, JS and FPVF of each model. In Table 2, the bold value is the optimal value.

Table 2 Average values of SA, DSC, JS and FPVF in Fig. 3

As shown in Table 2, the average values of the SA, DSC and JS of the proposed model were 0.99458, 0.9592 and 0.92392, respectively, which were 42.40%, 115.89% and 200.40% higher than the CV model, 106.34%, 288.70% and 200.40% higher than the improved CV model, 71.64%, 264.08% and 591.87% higher than the LBF model, 95.72%, 299.82% and 670.83% higher than the LOG model, and 60.44%, 187.84% and 376.42% higher than the LPF model. Compared with the FRAGL model, there were increases of 6.00%, 38.54% and 66.92%, and compared with the GLSEPF model, there were increases of 7.70%, 42.28% and 77.90%, respectively. The means value of FPVF in the proposed model was 0.01717. Compared with the CV model, the improved CV model, the LBF model, the LOG model, the LPF model, the FRAGL model and the GLSEPF model, there were reductions of 98.88%, 86.96%, 98.90%, 99.06%, 99.02%, 93.48% and 93.40%, respectively. The experimental results reveal that, compared with other models, the proposed model could obtain the target contour more accurately.

In the present study, the variances of the SA, DSC, JS and FPVF were calculated to further illustrate the segmentation performance of the proposed model, as shown in Table 3.

Table 3 Variance of SA, DSC, JS and FPVF in Fig. 3

An observation can be made that the variances of SA, DSC, JS and FPVF were 0.0000059, 0.001364, 0.004246 and 0.004355, respectively, which were far less than those of other models, indicating that the segmentation performance of the proposed model was stable.

4.2 The segmentation experiment of brain tumor image

Brain tumor images usually have the problem of intensity inhomogeneity. As such, the proposed model was used to segment brain tumor images to verify the segmentation performance. The results are shown in Fig. 5. In the experiment, the parameter settings in Fig. 5 are shown in Table 4.

Fig. 5
figure 5

Segmentation effects of the proposed model and other models on brain tumor image

Table 4 The parameter settings of Fig. 5

In Fig. 5, the first column is the original image, and the rectangle in the Fig. 5 is the given initial contour; the second column to the ninth column are the segmentation results of the CV model, the improved CV model, the LBF model, the LOG model, the LPF model, the FRAGL model, the GLSEPF model and the proposed model.

As can be seen from Fig. 5, the proposed model could accurately complete the image segmentation to obtain the tumor, while the other seven models could not accurately locate the location of the tumor. Such results could be attributed to the proposed model using the local function to capture the local intensity information of the image, which can well capture the intensity inhomogeneity of the image. At the same time, the global gray information drives the curve to evolve toward the target edge, which can effectively prevent the curve from falling into local optimum. However, other models usually only use local or global information to drive the evolution of energy function, which makes the evolution curve fall into local optimum in the evolution process, resulting in serious false segmentation.

The comparison results of the SA, DSC, JS and FPVF of the different models are shown in Fig. 6, respectively. In Fig. 6, sign “*” represents the segmentation result of the proposed model. An observation can be made from Fig. 6 that the SA, DSC, JS of the proposed model were significantly higher than those of the other seven models, and the FPVF was lower than the other seven models, indicating that the proposed model could accurately segment brain tumor images with intensity inhomogeneity.

Fig. 6
figure 6

SA, DSC, JS, and FPVF for each model

Tables 5 and 6 respectively show the mean value and variance of each indicator in each model, and the bold values in the table are the optimal values. As can be seen from Tables 5 and 6, the average values of various indicators of the proposed model were greater than those of the other seven models, and the variance was smaller than that of the other seven models, indicating that the proposed model not only had good segmentation accuracy, but could also be well adapted to the segmentation of various types of images.

Table 5 Average values of SA, DSC, JS and FPVF in Fig. 5
Table 6 Variances of SA, DSC, JS and FPVF in Fig. 5

Additionally, the running time and running space overhead of the image segmentation model were analyzed, and the results are shown in Table 7. Obviously, compared with the other image segmentation models, there was a significant improvement in the segmentation accuracy of the model, although the time and space overhead increased. The increased time and space consumption could be attributed to the model combining local information inside and outside the evolution curve with global information of the image, which increased the computation overhead.

Table 7 Analysis on the running time and running space

Figure 7 is a qualitative experimental comparison between the proposed image segmentation model and the model from the previous study [25] for image segmentation images l, o, p, r [25]. The second and third lines in Fig. 8 show the segmentation results of the proposed model in this paper and the model from the previous study [25], respectively. Obviously, the proposed model had a better segmentation effect and the fine granularity was higher. Table 8 shows the quantitative comparison results (the data from the previous study [25] was quoted directly from the study). The DSC (Dice Similarity index) from the previous study [25] was used for a comparative analysis, and the DSC of the proposed model was found to be higher than that of the model from the previous study [25].

Fig. 7
figure 7

Proposed model VS Literature [25] (The thrid line of image the was quoted from a previous study [25])

Fig. 8
figure 8

Segmentation results of the proposed model in different initial contours

Table 8 Comparison of DSC between the proposed model and the model from the previous study [25]

4.3 The influence of parameter setting on the segmentation performance of the proposed model

In the proposed model, there are six parameters, which are κ1, κ2, ε, v, μ and d. The parameters of κ1, κ2 and ε are the model parameters, and the parameters of v, μ and d are the image parameters. An image was selected randomly to analyze the influence of different parameters on the segmentation performance of the proposed model.

  1. (1)

    The effect of parameter κ1 and κ2on segmentation performance

In the proposed model, the parameters of κ1 and κ2 could adjust the ratio between internal energy and external energy in the local energy term. In the experiment, κ1 and κ2 took values from 0.5 to 2.0, and the step size was 0.5. In the analysis of parameter κ1, other parameters were set to fixed values. Similarly, other parameters were set to fixed values when analyzing κ2. Tables 9 and 10 show the segmentation results of Fig. 3b by the proposed model under different parameters κ1 and κ2, respectively.

Table 9 Segmentation results of Fig. 3b by the proposed model under different κ1
Table 10 Segmentation results of Fig. 3b by the proposed model under different κ2

In Tables 9 and 10, the values of DSC, SA, JS and FPVF in the proposed model were different when the values of κ1 and κ2 changed from 0.5 to 2.0. When κ1 or κ2 was 1.0, the values of SA, DSC and JS reached the maximum, and FPVF had a small value.

For comprehensive analysis of the evaluation indicators of image segmentation performance, the parameters κ1 and κ2 were set as κ1 = κ2 = 1.

  1. (2)

    The effect of parameter ε on segmentation performance

The proposed model can control the change of function Hε(·) and function δε(·) by parameter ε, which has a direct influence on the calculation of the model fitting value. To analyze the influence of parameter ε on the segmentation performance, the value range of parameter ε was 0.5 to 2.0, the step size was 0.5, and the other parameters were fixed values. Table 11 presents the segmentation results of Fig. 3b by the proposed model driven by different ε.

Table 11 Segmentation results of Fig. 3b by the proposed model under different ε

From Table 11, the SA, DSC, JS and FPVF had different values with the change of ε. Among the values, when the value of ε was 0.5, SA, DSC and JS had the maximum value, and the value of FPVF was small.

For comprehensive analysis of the evaluation indicators of image segmentation performance, the parameter ε was set as: ε = 0.5.

  1. (3)

    The effect of parameter v on segmentation performance

The parameter v can effectively control the evolution speed of the proposed model. When the value of v is small, the evolution speed of the proposed model is slow. When the value of v is large, the proposed model evolves faster. However, when the model evolves too fast, there will be a negative impact on the segmentation performance. Thus, the optimal segmentation performance of the proposed model can be guaranteed by selecting an appropriate parameter v. In the experimental analysis of v, the remaining parameters were fixed values. Table 12 shows the segmentation results of the proposed model on Fig. 3b under different values of v.

Table 12 Segmentation results of Fig. 3b by the proposed model under different v

From Table 12, with the constant change of parameter v, the values of SA, DSC, JS and FPVF also constantly changed. When the value of v was 1, SA, DSC and JS had the maximum value, and FPVF had a small value.

According to the comprehensive experimental analysis, the characteristics of the image had a significant influence on the parameter v. Therefore, in order to ensure the segmentation performance of the proposed model, the parameter v was selected according to the characteristics of the image in the experiment. When the image gradient was large, a larger value of v could be selected, and when the gradient was small, a smaller value of v could be selected.

  1. (4)

    The effect of parameter μ on segmentation performance

Parameter μ can capture the details of the image. With a smaller value of μ, more details are captured. Conversely, with a larger value of μ, less details are captured. However, when μ is too small, the background will be treated as the target, resulting in excessive segmentation. Contrarily, when μ is too large, the image details will be lost, resulting in under segmentation. As such, a suitable value of μ is crucial to ensure the performance of the proposed model. In the experiment, all the parameters except μ were set as fixed values. Table 13 shows the segmentation results of the proposed model in Fig. 3b under different values of μ.

Table 13 Segmentation results of Fig. 3b by the proposed model under different μ

As shown in Table 13, the parameter μ had a certain impact on the segmentation performance of the model. As the value of μ changed from 0.01 to 0.25, the evaluation index of the proposed model segmentation kept changing. When the value of μ was 0.1, the model obtained the largest SA, DSC, and JS values, and a small FPVF value.

An observation can be made from the experimental analysis that the parameter μ can affect the segmentation performance of the proposed model. Therefore, selecting an appropriate parameter μ can ensure the segmentation performance of the proposed model. When the image has more details, the parameter μ can be a smaller value, otherwise, μ is a larger value.

  1. (5)

    The effect of parameter d on segmentation performance

The parameter d is used to control the size of the local window. According to the level of intensity inhomogeneity in the image, d takes a different value. When the image intensity level is relatively uniform, d can be a larger value; otherwise, d can be a smaller value. The influence of parameter d on the segmentation performance of the proposed model was analyzed. In the experiment, the remaining parameters were fixed values. Table 14 shows the segmentation results of the proposed model in Fig. 3b under different values of d.

Table 14 Segmentation results of Fig. 3b by the proposed model under different d

As shown in Table 14, driven by different values of d, the proposed model had different levels of segmentation performance. When the value of d was 6, the proposed model achieved the largest SA, DSC, and JS values, while the FPVF value was smaller.

From comprehensive experimental analysis, the parameter d had a direct impact on the segmentation performance of the proposed model. Thus, in order for the proposed model to achieve the optimal segmentation performance, a suitable parameter d must be selected. According to the different intensity levels of the image, the value of d was different. When the image intensity distribution was inhomogeneity, d had a smaller value. Thus, the fitted value of the proposed model was more similar to the true intensity value of the image. Otherwise, d was a larger value, because the intensity distribution of the image was relatively uniform. Even when d was large, the fitted value of the proposed model was close to the true intensity value of the image.

4.4 Robustness analysis of initial contour

In the present study, four images were randomly selected from the 15 images for initial contour stability analysis, including two natural images and two brain tumor images. Each image had three initial contours with different positions and sizes. The initial contour and segmentation results are shown in Fig. 8.

In Fig. 8a–d are the segmentation results of image E, I, J and L, respectively. In (a), (b), (c) and (d), the first line is the original image, in which the rectangular frame is the position of the initial contour; and the second line is the corresponding segmentation result.

An observation can be made from Fig. 8 that the target area could be accurately obtained by the proposed model when the position and size of the initial contour are different, which indicates that our model is not sensitive to the position and size of the initial contour.

5 Conclusions

In the present study, a hybrid active contour model was proposed that combines local and global information of images. Said model can effectively segment images with intensity inhomogeneity, blurred edges and low contrast. Firstly, a rectangular window function is used to extract the local regions inside and outside the evolution curve, and the intensity mean of the local regions is obtained so that the fitted values of the model can better fit the true intensity values of the image. Additionally, the local energy term is constructed by using the local mean values and the true intensity values of the image so that the model can well capture the intensity inhomogeneity of the image. Secondly, the intensity mean values inside and outside the evolution curve are integrated into one item, and the global energy item is structured by local mean values and the true intensity values of the image to drive the curve evolution to the target edge. At the same time, the adaptive weight coefficient is structured by the intensity to adjust the relation between the global energy term and the local energy term, so that the model can automatically adjust the evolution of the curve with the change of the target region. The segmentation experiments on natural images and brain tumor images show that the proposed model has high SA, DSC, JS and low FPVF for images with intensity inhomogeneity, blurred edge and low contrast, and has high robustness to initial contour. Although the proposed image segmentation model is insensitive to the initial contour position, the initial contour of the model still needs to be manually marked during the evolution of the model. As such, determining how to automatically mark the initial contour of the model with little overhead is a problem to be solved by the present research group in the future.