1 Introduction

The image segmentation is a momentous prerequisite for the image process, image analysis and image comprehension. The adaptability and correctness of image segmentation influence the object extraction, detection and recognition and the effectiveness of follow-up work to a certain extent, and the primary aim is to separate an assigned image into several distinct and consistent sections that have the best similarity and features in terms of the grayscale, texture, color, pattern, histogram, edge and geometric shape, and then to retrieve the constructive sections [2, 11, 16, 21, 34]. The research problem and the image segmentation’s quality are strongly associated, and greater segmentation quality signifies that the algorithm has a higher segmentation precision and efficiency. Threshold segmentation has certain advantages, such as low computational cost, simple implementation, fast operation speed, high segmentation precision, strong robustness and stability. The hybrid evolutionary algorithm with threshold segmentation method is utilized to promote optimization effectiveness and segmentation quality, such as the bat algorithm (BA) [44], dingo optimization algorithm (DOA) [7], flower pollination algorithm (FPA) [43], moth flame optimization (MFO) [26] and sine cosine algorithm (SCA) [27].

Ma et al. combined an upgraded whale optimization approach the Otsu to address the image segmentation, this algorithm maintained strong stability and excellent segmentation quality [25]. Liu et al. established an integrated remote optimization approach to address image segmentation, this algorithm exhibited significant stability and resilience to maintain better convergence accuracy and segmentation quality [23]. Agrawal et al. employed an adaptive whale optimization approach to address the color image segmentation, this algorithm combined exploration with exploitation to determine better segmentation results [4]. Wu et al. designed a modified sparrow search method to address image segmentation, this algorithm retained tremendous adaptability and global search to mitigate premature convergence [41]. Sharma et al. cultivated an updated firefly algorithm to address image segmentation, this algorithm identified a significant exploration to discover the most suitable solution [31]. Mookian et al. generated an upgraded sine cosine algorithm to address the image segmentation, this algorithm exhibited stronger calculation precision and superior segmentation accuracy [28]. Li et al. adopted a harmony search algorithm to address the image segmentation, this algorithm was both productive and workable to determine a quicker convergence accuracy and greater segmentation quality [22]. Patra et al. studied on moth flame method and whale optimization method for image segmentation, these algorithms have a substantial optimization ability to determine the overall best value [30]. Gill et al. suggested a teacher-learner based optimization to address the image segmentation, the feasibility and practicality of this algorithm have been proven [15]. Vijh et al. developed a hybrid bio-inspired algorithm with an artificial neural network to address image segmentation, this algorithm altered both the global ability and the local ability to determine a superior segmentation effect [37]. Si et al. designed the chimp optimization method to segment the medical image, this algorithm exhibited excellent stability and resilience to maximize the segmentation accuracy and optimization efficiency [33]. Subasree et al. established a multi-objective emperor penguin approach to address the image segmentation, this algorithm attained remarkable reliability and stability to discover the best threshold values [35]. Naik et al. designed an adaptive opposition slime mold algorithm to address medical image segmentation, this algorithm produced significant stability and robustness to identify the best value [29]. Das et al. devised an opposition equilibrium optimization based on the error minimization strategy to address image segmentation, this algorithm exhibited extensive exploration and exploitation to acquire the segmentation quality [12]. Liu et al. created an adaptive region-growing approach to address image segmentation, this algorithm had significant adaptability and stability to accomplish the best segmentation effect [24]. Zhang et al. combined a coupled chaotic system with the Otsu threshold method for medical image segmentation, this algorithm had excellent robustness and the better segmentation effect [45]. Wang et al. submitted an adaptive firefly algorithm to address the image segmentation, this algorithm had better segmentation quality, optimization accuracy and computation time [38]. Houssein et al. designed an expanded chimp optimization method to address medical image segmentation, this algorithm boosted the convergence efficiency and calculation precision to attain the best solution [17]. Al-Rahlawee et al. adopted the black widow optimization based on the Otsu to address the image segmentation, this algorithm showed tremendous exploitation to supply superior results [5]. Anitha et al. clarified a modified whale optimization approach to address the color image segmentation, this algorithm obtained the best segmentation effect and the overall best value [6]. Duan et al. submitted a modified cuckoo search approach with the Otsu to address the image segmentation, this algorithm had sufficient optimization efficiency to determine the best fitness value [14]. Jiang et al. created an upgraded teaching-learning-based optimization method to address image segmentation, this algorithm had fantastic effectiveness and feasibility [19]. Houssein et al. utilized an upgraded marine predators algorithm to address the image segmentation, this algorithm had a significant exploration and exploitation to determine the better segmentation quality [18]. Abdel-Basset et al. combined a whale optimization approach with a unique technique to address color image segmentation, this algorithm had superiority and reliability to arrive at the best segmentation results [3]. Dinkar et al. introduced an equilibrium optimization approach based on Laplace distribution and opposition-based learning mechanism to address the image segmentation, this algorithm was verified to be superior to other appraoches [13]. Yan et al. highlighted a altered water wave optimization to address the image segmentation, this algorithm had excellent robustness and exploration to determine the better convergence accuracy and segmentation quality [42]. Chen et al. integrated the particle swarm optimization with sine cosine acceleration coefficients to address the numerical optimization issues, this algorithm had sufficient predictability and reliability to attain the better convergence accuracy [9]. Varga proposed visual saliency to address the image quality assessment, this method had great stability and robustness to determine the better results [36]. Shi et al. utilized three features fusion to design a trustworthy reference color image quality assessment and assess the image distortion, this method had a significant stability and search ability to determine the high accuracy [32].

The GJO, inspired by the jackals’ collaborative foraging behavior, mimics discovering prey, tracking and encircling prey, and trapping prey to discover the global optimal value [10]. To overcome premature convergence, inferior computation accuracy and sluggish convergence rate of the basic GJO, the SCA is introduced. The SCGJO based on Kapur’s entropy is presented to address the image segmentation, the intention is to actualize the accurate threshold value and the maximum fitness value. The SCGJO not only executes extensive exploration and exploitation to mitigate search stagnation and determine the ideal value but also achieves complementary benefits to promote convergence accuracy and segmentation quality. A series of experiments are employed to demonstrate the stability and resilience of the SCGJO, the segmentation results are contrasted with those of BA, DOA, FPA, MFO, SCA, and GJO by achieving the maximum Kapur’s entropy. The various evaluation indicators are employed to assess the segmentation quality. The experimental results demonstrate that the SCGJO exhibits fantastic durability and stability to arrive at a faster convergence rate, higher calculation precision and greater segmentation accuracy.

The following sections make up this article. Section 2 explores multilevel thresholding. Section 3 describes GJO. Section 4 generates SCGJO. In Section 5, the SCGJO-based multilevel threshold method is established. The experimental results and analysis are detailed in Section 6. Finally, conclusions and future research are explained in Section 7.

2 Multilevel thresholding

The purpose of image segmentation is to separate a given original image into several unusual and distinctive core regions and exhibit the principle and process of interested objects. The SCGJO has excellent robustness and reliability to acquire recognition accuracy and segmentation quality. The image thresholding segmentation mainly contains bi-level thresholding and multilevel thresholding. The bi-level thresholding is employed to tackle the simple image with the object and background, which necessitates identifying an optimal threshold value to determine the better segmentation quality and achieve the image segmentation. Multilevel thresholding is a pivotal unassisted image segmentation technique that selects multiple threshold values to classify and extract the interested parts. This method has certain superiority and dependability to deal with complicated image segmentation and obtain high segmentation precision.

Kapur’s entropy based on the non-parametric thresholding technique separates the original image into multiple categories by contrasting the histogram’s entropy value. A larger Kapur’s entropy means that the segmentation categories are homogeneous, and this method is superior to other threshold segmentation methods. Kapur’s entropy has distinctive advantages: low computational cost, simple implementation, fast operation speed, high segmentation precision, strong robustness and stability. The discreteness and compactness between various categories are reflected in the image’s entropy. Kapur’s entropy is a constructive method to address image segmentation, which has significant stability and resilience to determine the best segmentation quality [20]. Assuming that n threshold values from the best values [t1, t2, …, tn] are utilized to separate the source image into distinct categories. The probability pi is generated as:

$${p}_i=\frac{h_i}{\sum_{i=0}^{L-1}h(i)}$$
(1)

where hi denotes the pixel size, L denotes the level size.

Kapur’s entropy is generated as:

$$f\left({t}_1,{t}_2,\dots, {t}_n\right)={H}_0+{H}_1+{H}_2+\dots +{H}_n$$
(2)

where

$${H}_0=-\sum_{i=0}^{t_1-1}\frac{p_i}{\omega_0}\ln \frac{p_i}{\omega_0},{\omega}_0=\sum_{i=0}^{t_1-1}{p}_i$$
(3)
$${H}_1=-\sum_{i={t}_1}^{t_2-1}\frac{p_i}{\omega_1}\mathit{\ln}\frac{p_i}{\omega_1},{\omega}_1=\sum_{i={t}_1}^{t_2-1}{p}_i$$
(4)
$${H}_2=-\sum_{i={t}_2}^{t_3-1}\frac{p_i}{\omega_2}\mathit{\ln}\frac{p_i}{\omega_2},{\omega}_2=\sum_{i={t}_2}^{t_3-1}{p}_i$$
(5)
$${H}_n=-\sum_{i={t}_n}^{L-1}\frac{p_i}{\omega_n}\mathit{\ln}\frac{p_i}{\omega_n},{\omega}_n=\sum_{i={t}_n}^{L-1}{p}_i$$
(6)

H 0, H1, …, Hn denote the distinct categories’ Kapur’s entropies, ω0, ω1, …, ωn denote the probabilities of each category.

3 GJO

The GJO involves three essential search operations: discovering prey, tracking and encircling prey, and trapping prey. The GJO utilizes these operations to regulate exploitation and exploration to determine the best value. Each jackal symbolizes a search agent. The jackal pair’s foraging mechanism is shown in Fig. 1. The correlation between solution space and GJO space is shown in Table 1.

Fig. 1
figure 1

A Jackal pair B Jackal discovering prey C Tracking and encircling of prey D & E Tapping prey

Table 1 Correlation between solution space and GJO space

3.1 Search space

In GJO, the candidate values are stochastically generated and uniformly distributed in the detection region, the purpose is to identify the overall best value from various search agents. The initial solution is generated as:

$${Y}_0={Y}_{\textrm{min}}+\mathit{\operatorname{rand}}\left({Y}_{\textrm{max}}-{Y}_{\textrm{min}}\right)$$
(7)

where Ymax and Ymin denote the variable’s limit, rand denotes a haphazard vector in [0,1].

The first and second fittest is jackal pair, the matrix prey is generated as:

$$Prey=\left[\begin{array}{cccc}{Y}_{1,1}& {Y}_{1,2}& \cdots & {Y}_{1,d}\\ {}{Y}_{2,1}& {Y}_{2,2}& \cdots & {Y}_{2,d}\\ {}\vdots & \vdots & \vdots & \vdots \\ {}{Y}_{n,1}& {Y}_{n,2}& \cdots & {Y}_{n,d}\end{array}\right]$$
(8)

where Yi, j denotes the jth dimension of ith prey, n denotes the population size, d denotes the issue dimension. The objective’s matrix is generated as:

$${F}_{OA}=\left[\begin{array}{c}f\left({Y}_{1,1};{Y}_{1,2};{Y}_{1,d}\right)\\ {}f\left({Y}_{2,1};{Y}_{2,2};{Y}_{2,d}\right)\\ {}\vdots \\ {}f\left({Y}_{n,1};{Y}_{n,2};{Y}_{n,d}\right)\end{array}\right]$$
(9)

where FOA denotes a matrix that stores the objective values. A male jackal is considered to be the fittest, while a female jackal is considered to be the second fittest. In other words, the male jackal symbolizes the ideal fitness value whereas the female jackal symbolizes the suboptimal fitness value.

3.2 Exploration phase or discovering the prey

This section mainly describes the exploration phase of the GJO. Jackal has a distinctive nature to apperceive and track the prey, but contingently the prey followed by the golden jackal is not captured and easily escapes. The jackals watch patiently before swiftly seeking newly targeted prey. Female jackal accompanies male jackal to accomplish the hunting process. The positions are generated as:

$${Y}_1(t)={Y}_M(t)-E\cdot \mid {Y}_M(t)- rl\cdot Prey(t)\mid$$
(10)
$${Y}_2(t)={Y}_{FM}(t)-E\cdot \left|{Y}_{FM}(t)- rl\cdot {Prey}(t)\right|$$
(11)

where t denotes the current iteration, Prey(t) denotes the prey’s position vector, YM(t) and YFM(t) denote the latest positions of the jackal pair, Y1(t) and Y2(t) denote the updated positions of the jackal pair.

The evading energy of prey E is generated as:

$$E={E}_1\ast {E}_0$$
(12)

where E1 denotes the prey’s declining energy, E0 denotes the energy’s original status.

$${E}_0=2\ast r-1$$
(13)

where r denotes a haphazard value in [0,1].

$${E}_1={c}_1\ast \left(1-\left(t/T\right)\right)$$
(14)

where T denotes the maximum iteration, c1 denotes a constant that is set to 1.5, E1 linearly decreases from 1.5 to 0.

The rl is a random vector with Lévy distribution, which is generated as:

$$rl=0.05\ast LF(y)$$
(15)

The LF is the fitness function, which is generated as:

$$LF(y)=0.01\times \left(\mu \times \sigma \right)/\left(|{v}^{\left(1/\beta \right)}|\right);\sigma ={\left(\frac{\varGamma \left(1+\beta \right)\times \sin \left(\pi \beta /2\right)}{\varGamma \left(\frac{1+\beta }{2}\right)\times \beta \times \left({2}^{\frac{\beta -1}{2}}\right)}\right)}^{1/\beta }$$
(16)

where μ and v denote the haphazard values in (0,1), β denotes a constant that is set to 1.5.

The position of the golden jackal is generated as:

$$Y\left(t+1\right)=\frac{Y_1(t)+{Y}_2(t)}{2}$$
(17)

3.3 Exploitation phase or enclosing and pouncing on the prey

This section mainly describes the exploitation phase of the GJO. Once the target prey is discovered in the search region, the jackals will rapidly enclose and harass the prey. The evading energy of prey decay expeditiously, which causes the jackals to track and devour the prey. The foraging behavior of the jackal pair is generated as:

$${Y}_1(t)={Y}_M(t)-E\cdot \left| rl\cdot {Y}_M(t)-{Prey}(t)\right|$$
(18)
$${Y}_2(t)={Y}_{FM}(t)-E\cdot \left| rl\cdot {Y}_{FM}(t)-{Prey}(t)\right|$$
(19)

where Prey(t) denotes the position vector, YM(t) and YFM(t) denote the latest positions of the jackal pair, Y1(t) and Y2(t) denote the updated positions of the jackal pair. Finally, the position is generated as a formula (17).

The solution procedure of GJO is shown in Algorithm 1.

Algorithm 1
figure a

GJO

4 SCGJO

The SCA is introduced into the basic GJO to eliminate premature convergence, inferior computation accuracy and sluggish convergence rate. The SCGJO is a constructive and efficacious method to address the image segmentation. The SCGJO not only exhibits fantastic robustness and reliability to promote the complementary benefits and boost the convergence accuracy but also integrates exploration and exploitation to mitigate premature convergence and arrive at the better segmentation quality.

4.1 SCA

The SCA utilizes the adaptive parameters and multiple random candidate solutions to achieve a balanced transformation between exploration and exploitation. The SCA has a substantial stability and optimization ability to mitigate search stagnation and determine the overall best value, which promotes the convergence rate and enhances the calculation precision. The position of the SCA is generated as:

$${X}_i^{t+1}=\left\{\begin{array}{c}{X}_i^t+{r}_1\times \sin \left({r}_2\right)\times \mid {r}_3{P}_i^t-{X}_i^t\mid, \kern0.6em {r}_4<0.5\\ {}{X}_i^t+{r}_1\times \cos \left({r}_2\right)\times \mid {r}_3{P}_i^t-{X}_i^t\mid, \kern0.6em {r}_4\ge 0.5\end{array}\right.$$
(20)

where \({X}_i^t\) denotes the current position, \({X}_i^{t+1}\) denotes the updated position, \({P}_i^t\) denotes the best position in the search region, r1, r2, r3, r4 denote the haphazard values, r2 ∈ [0, 2π], r3 ∈ [‐2, 2], r4 ∈ [0, 1], || denotes the absolute value.

The amplitude conversion factor r1 is generated as:

$${r}_1=a-t\times \frac{a}{T}$$
(21)

where a denotes a constant.

4.2 SCGJO

In the exploration phase of the SCGJO, the positions are generated as:

$${Y}_1^{\prime }(t)=\left\{\begin{array}{c}{Y}_1(t)+{r}_1\times \sin \left({r}_2\right)\times \mid {r}_3 prey-{Y}_1(t)\mid, \kern0.6em {r}_4<0.5\\ {}{Y}_1(t)+{r}_1\times \cos \left({r}_2\right)\times \mid {r}_3 prey-{Y}_1(t)\mid, \kern0.6em {r}_4\ge 0.5\end{array}\right.$$
(22)
$${Y}_2^{\prime }(t)=\left\{\begin{array}{c}{Y}_2(t)+{r}_1\times \sin \left({r}_2\right)\times \mid {r}_3 prey-{Y}_2(t)\mid, \kern0.6em {r}_4<0.5\\ {}{Y}_2(t)+{r}_1\times \cos \left({r}_2\right)\times \mid {r}_3 prey-{Y}_2(t)\mid, \kern0.6em {r}_4\ge 0.5\end{array}\right.$$
(23)
$$Y\left(t+1\right)=\frac{Y_1^{\prime }(t)+{Y}_2^{\prime }(t)}{2}$$
(24)

where Prey(t) denotes the prey’s position vector, Y1(t) and Y2(t) denote the latest positions of the jackal pair, \({Y}_1^{\prime }(t)\) and \({Y}_2^{\prime }(t)\) denote the updated positions of the jackal pair according to the SCA. r2 ∈ [0, 2π], r3 ∈ [‐2, 2], r4 ∈ [0, 1], r1 is linearly decreases from 2 to 0, Y denotes the updated position of the jackal.

In the exploitation phase of the SCGJO, the positions are generated as:

$${Y}_1^{\prime \prime }(t)=\left\{\begin{array}{c}{Y}_1(t)+{r}_1\times \sin \left({r}_2\right)\times \mid {r}_3 prey-{Y}_1(t)\mid, \kern0.6em {r}_4<0.5\\ {}{Y}_1(t)+{r}_1\times \cos \left({r}_2\right)\times \mid {r}_3 prey-{Y}_1(t)\mid, \kern0.6em {r}_4\ge 0.5\end{array}\right.$$
(25)
$${Y}_2^{\prime \prime }(t)=\left\{\begin{array}{c}{Y}_2(t)+{r}_1\times \sin \left({r}_2\right)\times \mid {r}_3 prey-{Y}_2(t)\mid, \kern0.6em {r}_4<0.5\\ {}{Y}_2(t)+{r}_1\times \cos \left({r}_2\right)\times \mid {r}_3 prey-{Y}_2(t)\mid, \kern0.6em {r}_4\ge 0.5\end{array}\right.$$
(26)
$$Y\left(t+1\right)=\frac{Y_1^{\prime \prime }(t)+{Y}_2^{\prime \prime }(t)}{2}$$
(27)

where Prey(t) denotes the prey’s position vector, Y1(t) and Y2(t) denote the latest positions of the jackal pair, \({Y}_1^{\prime \prime }(t)\) and \({Y}_2^{\prime \prime }(t)\) denote the updated positions of the jackal pair according to the SCA. r2 ∈ [0, 2π], r3 ∈ [‐2, 2], r4 ∈ [0, 1], r1 is linearly decreases from 2 to 0, Y denotes the updated position of the jackal.

The solution procedure of SCGJO is shown in Algorithm 2.

Algorithm 2
figure b

SCGJO

5 SCGJO-based multilevel threshold method

5.1 The solution procedure of the SCGJO

In SCGJO, the position of the jackal is equivalent to the image’s segmentation threshold value. The jackal is employed to refresh the position, track and enclose, pounce on, and capture the prey according to the set threshold level, which promotes exploration and exploitation to determine the best value. The correlation between image segmentation and SCGJO is shown in Table 2. The solution procedure of SCGJO based on image segmentation is shown in Algorithm 3. The flowchart of SCGJO for multilevel thresholding is shown in Fig. 2.

Table 2 Correlation between image segmentation and SCGJO
Fig. 2
figure 2

Flowchart of SCGJO for multilevel thresholding

Algorithm 3
figure c

SCGJO based on image segmentation for Kapur entropy

5.2 Computational complexity of the SCGJO

The computational complexity of the SCGJO is regarded as an objective value that directly connects the issue’s input size to the algorithm’s run-time. The big-O notation furnishes a trustworthy method to quantify and assess the algorithm’s stability and validity. The computational complexity of the SCGJO is anatomized in detail. The SCGJO primarily involves three procedures: initialization, assessing the objective value and updating the golden jackal’s position according to the exploration and exploitation. In SCGJO, N denotes the population size, T denotes the maximum iteration, and D denotes the issue dimension. The computational complexity of initialization is O(N). For assessing the objective value and updating the golden jackal’s position, the computational complexity is O(T × N) + O(T × N × D). The SCGJO not only has fantastic adaptability and reliability to promote the complementary benefits and boost the convergence accuracy but also integrates exploration and exploitation to mitigate search stagnation and determine the ideal value. Therefore, the computational complexity of the SCGJO is O(N × (T + T × D + 1)), the SCGJO is an effective and trustworthy approach to address the optimization issue.

6 Experimental results and analysis

6.1 Experimental setup

The numerical experiment is implemented on a computer about an Intel Core i7-8750H 2.2 GHz CPU, a GTX1060, and 8 GB memory with Windows 10 system. All of the algorithms are programmed in MATLAB R2018b.

6.2 Test images

To verify the productivity and feasibility, the SCGJO is utilized to address the image segmentation, the experiments are conducted on twelve test images that are elaborately chosen from computerized tomography (CT) or magnetic resonance imaging (MRI) machines [40], and shown in Fig. 3.

Fig. 3
figure 3

Original test images

Fig. 4
figure 4

Segmented images of Test 1

6.3 Parameter setting

The SCGJO is contrasted with various algorithms to reveal the stability and superiority, such as BA, DOA, FPA, MFO, SCA and GJO. The algorithm’s parameters are taken from the primary articles and are credible, typical empirical values, which are shown in Table 3.

Table 3 Parameters of each algorithm
Fig. 5
figure 5

Segmented images of Test 2

6.4 Segmented image quality measurements

Six momentous evaluation indicators are applied to evaluate the segmentation quality, and further assess the stability and overall search ability. The evaluation indicators are generated as:

  1. (1)

    Fitness value. The convergence rate and calculation precision of the evolutionary algorithm are impacted by the fitness value, and whether it identifies the global best value. The intention is to actualize the accurate threshold values and the maximum objective values. The fitness value and the segmented image information are positively correlated. The segmented image involves more meaningful information since the algorithm’s fitness value is greater.

  2. (2)

    The best threshold value. The most effective threshold value setting is essential for image segmentation, which impacts the evaluation indicators and determines the segmentation quality. The evolutionary algorithm is utilized to address the image segmentation and arrive at the best threshold value. The intention is to realize the best threshold values and the maximum fitness values. The evolutionary algorithm has excellent durability and reliability to promote the segmentation’s accuracy and quality.

  3. (3)

    Execution time. For each algorithm, the population size is 30, the maximum iteration is 100, and the independent operation is 30. The threshold levels are defined as 4, 5, 6, 7 and 8 respectively. The execution time is an essential evaluation indicator to confirm the convergence speed and calculation accuracy. The evolutionary algorithm integrates exploration and exploitation to mitigate search stagnation and address the complex issues. The evolutionary algorithm consumes less time, which reveals that the algorithm had excellent resilience and search efficiency to identify the best solution.

  4. (4)

    Peak signal to noise ratio (PSNR). The PSNR, a typical indicator to recognize signal distortion, is a ratio of the greatest potential power expressing a signal to the strength of destructive noise that impacts the accuracy of its representation. The PSNR utilizes the intensity value of a given image to determine whether is a certain difference before and after image segmentation. The PSNR is based on the image pixel gray value to analyze the algorithm performance and evaluate the segmentation quality. A higher PSNR value indicates the segmented image exhibits less distortion and greater segmentation quality. Since the visual properties of the human eye are not taken into account, this will cause inconsistency between people’s subjective sensations and evaluation results. The PSNR is generated as [1]:

$${PSNR}=10{\mathit{\log}}_{10}\left(\frac{255^2}{MSE}\right)$$
(28)

where MSE denotes the average squared error. The MSE is generated as:

$$MSE=\frac{1}{MN}\sum_{i=1}^M\sum_{j=1}^N{\left[I\left(i,j\right)-K\left(i,j\right)\right]}^2$$
(29)

where M × N denotes the image size, I(i, j) denotes the source image, K(i, j) denotes the segmented image.

  1. (5)

    Structural similarity index (SSIM). The SSIM estimates the similarity between the source image and the segmented image, which defines structural information to maintain the scene object’s structure independently of brightness and contrast. Brightness, contrast, and structure are three separate elements that are combined to describe the distortion. The pixel means is employed to assess brightness, the standard deviation is required to evaluate contrast, and the covariance is utilized as a measure of structural similarity. The SSIM is a random number between 0 and 1. The discrepancy between the source image and the segmented image is diminished, and the segmentation quality is enhanced as the threshold level rises. The SSIM is generated as [39]:

$$SSIM\left(x,y\right)=\frac{\left(2{\mu}_x{\mu}_y+{c}_1\right)\left(2{\sigma}_{xy}+{c}_2\right)}{\left({\mu}_x^2+{\mu}_y^2+{c}_1\right)\left({\sigma}_x^2+{\sigma}_y^2+{c}_2\right)}$$
(30)

where μx and μy denote the average intensity before and after image segmentation respectively. \({\sigma}_x^2\) and \({\sigma}_y^2\) denote the standard deviation before and after image segmentation respectively. σxy denotes the covariance before and after image segmentation. c1 and c1 denote constants.

  1. (6)

    Wilcoxon’s rank-sum test. Wilcoxon’s rank-sum test [8] is employed to confirm if there is a substantial disparity between the two groups of data, which is an important evaluation indicator to verify the effectiveness and disparity. p < 0.05 implies that there is a substantial disparity between the SCGJO and other algorithms. p ≥ 0.05 implies that there is no substantial disparity between the SCGJO and other algorithms.

6.5 Results and analysis

For each algorithm, the population size is 30, the maximum iteration is 100, and the independent operation is 30. The threshold levels are defined as 4, 5, 6, 7 and 8 respectively. The experimental results of the SCGJO are contrasted with those of BA, DOA, FPA, MFO, SCA, and GJO in Tables 4-9.

Table 4 The optimal fitness of each algorithm
Table 5 The best threshold values of each algorithm
Table 6 The average execution time of each algorithm
Table 7 The PSNR of each algorithm
Table 8 The SSIM of each algorithm
Table 9 The p value of Wilcoxon rank-sum
Fig. 6
figure 6

Segmented images of Test 3

Fig. 7
figure 7

Segmented images of Test 4

The optimal fitness of each algorithm is shown in Table 4. Various evolutionary algorithm is employed to address image segmentation, which utilizes entropy quantization to assess the segmented information and maximize the entropy of the target or background regions. The intention is to actualize the accurate threshold values and the maximum fitness values according to certain optimization criteria. The optimal fitness of each algorithm enlarges as the threshold level enlarges, which illustrates that the segmented image exhibits a greater segmentation impact and incorporates more segmentation information. To demonstrate the superiority and stability of the algorithms, twelve images with five different threshold levels are employed to assess the segmentation quality. The optimal fitness values of the SCGJO are superior to those of BA, DOA, FPA, MFO, SCA, and GJO. The ranking of the SCGJO based on the optimal fitness value is the first, which illustrates that the SCGJO has excellent stability to determine the best value. The best threshold values of each algorithm are shown in Table 5. The threshold values can affect the rest of the evaluation indicators and determine the image segmentation quality. The SCGJO with better threshold values has a greater overall search performance to arrive at the segmented image with higher segmentation accuracy and quality. The SCGJO utilizes the collaborative foraging mechanism of discovering prey, tracking and enclosing prey, and pouncing on prey. The SCGJO not only has excellent exploration and exploitation to determine the ideal value but also achieves complementary benefits to promote convergence accuracy and segmentation quality. The SCGJO is an effectual and constructive method for addressing the image segmentation.

Fig. 8
figure 8

Segmented images of Test 5

Fig. 9
figure 9

Segmented images of Test 6

The average execution time of each algorithm is shown in Table 6. For each algorithm, the population size is 30, the maximum iteration is 100, and the independent operation is 30. The execution time is an essential evaluation indicator to confirm the convergence speed and calculation accuracy. The threshold level is larger, and the execution time and the computational complexity of each algorithm gradually increase, which illustrates that the evolutionary algorithm consumes more execution time. The SCGJO has significant stability and resilience to arrive at the best fitness value and threshold value. The SCGJO combines the advantages of the SCA and GJO to promote the optimization ability, mitigate search stagnation and actualize the accurate segmentation quality. However, the SCGJO consumes more execution time to accomplish the image segmentation compared to the GJO and SCA. The experimental results demonstrate that the SCGJO utilizes exploration or exploitation to acquire a higher convergence accuracy and greater segmentation quality.

Fig. 10
figure 10

Segmented images of Test 7

The PSNR of each algorithm based on Kapur’s entropy method is shown in Table 7. The PSNR, a typical indicator to detect signal distortion, is a ratio of the signal’s greatest potential intensity to the strength of destructive noise that impacts the representation accuracy. The PSNR value is calculated by the discrepancy between the associated elements, which is an error-sensitive indicator to assess the segmentation quality. The image segmentation accuracy is proportional to the threshold level. A higher PSNR value indicates the segmented image has less distortion, greater segmentation quality, and better convergence accuracy. The PSNR based on the intensity value is viewed to be an essential assessment indicator to reveal the discrepancy between the source image and segmented image, and then assess the distortion degree and the segmentation quality. For the PSNR values, the SCGJO based on Kapur’s entropy are superior to those of the BA, DOA, FPA, MFO, SCA, and GJO according to the various threshold levels, which illustrates that the SCGJO has excellent stability and feasibility to address the image segmentation. As the threshold levels rise, the evolutionary algorithms’ PSNR values rise proportionately. To verify the segmentation accuracy and convergence efficiency of the SCGJO, the PSNR value is employed to determine the ranking, the SCGJO has a higher ranking and a superior PSNR value, which illustrates that the SCGJO has sufficient predictability and reliability to attain better segmentation accuracy. There are 60 PSNR values for each algorithm, and the 50 PSNR values of the SCGJO are the best compared to other algorithms. The segmentation quality of the SCGJO is superior to those of other algorithms. The SCGJO not only combines the advantages of the SCA and GJO to mitigate search stagnation but also integrates exploration and exploitation to determine the better segmentation quality, which is an efficacious and realistic approach to address the image segmentation.

Fig. 11
figure 11

Segmented images of Test 8

The SSIM of each algorithm based on Kapur’s entropy method is shown in Table 8. By establishing the structural information to retain the scene object’s structure irrespective of brightness and contrast, the SSIM assesses the similarity between the source image and the segmented image. Distortion is characterized by the combination of three distinct elements: brightness, contrast, and structure. The brightness is measured by the pixel mean, contrast is calculated by the standard deviation, and the structural similarity is determined by the covariance. The SSIM value ranges erratically from 0 to 1. A higher SSIM value illustrates that the segmentation quality is greater and the calculation precision is better, and the disparity between the source image and the segmented image is relatively minimal. When the SSIM value is equal to 1, both images are exactly equivalent. The SSIM value rises when the threshold level is raised, the segmented image not only substantially diminished distortion degree but also is infinitely close to the source image. To confirm the overall segmentation ability of the SCGJO, the SSIM value is employed to arrive at the ranking, the SCGJO has a higher ranking and a superior SSIM value, which illustrates that the SCGJO has excellent stability and durability to accomplish the segmentation quality. There are 60 SSIM values for each algorithm, and the 55 SSIM values of the SCGJO are the best compared to the BA, DOA, FPA, MFO, SCA and GJO. The segmentation effect of the SCGJO is superior to those of other algorithms, and the disparity is remarkable. The experimental results demonstrate that the SCGJO not only exhibits extensive exploration and exploitation to avoid search stagnation and obtain the best SSIM values but also has good stability and similarity to accomplish greater computational precision and superior segmentation quality.

Fig. 12
figure 12

Segmented images of Test 9

The p value of the Wilcoxon rank-sum is shown in Table 9. The Wilcoxon’s rank-sum test is employed to confirm if there is a substantial disparity between the two groups of data. p < 0.05 illustrates that there is a substantial disparity. p ≥ 0.05 illustrates that there is no substantial disparity. The experimental results demonstrate that the disparity between the SCGJO and other algorithms is substantial, and the data is actual and reliable, not obtained by accident.

Fig. 13
figure 13

Segmented images of Test 10

Fig. 14
figure 14

Segmented images of Test 11

Fig. 15
figure 15

Segmented images of Test 12

The segmented images of the SCGJO and other evolutionary algorithms under different threshold levels are shown in Figs. 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 and 15. For image segmentation, the intention is to actualize the accurate threshold values and the maximum objective values. As the threshold level rises, the optimization ability and segmentation performance of these algorithms will dramatically enhance, which illustrates that the SCGJO not only utilizes the collaborative foraging mechanism to balance exploration and exploitation but also has sufficient predictability and reliability to mitigate search stagnation and determine the high-quality segmented image with more valuable information. The SCGJO and other algorithms are employed to address the image segmentation, the segmentation quality and the overall optimal value of the SCGJO are superior to those of BA, DOA, FPA, MFO, SCA, and GJO. The SCGJO has superior fitness values and threshold values when compared to other algorithms, which illustrates that the SCGJO delivers complementary benefits to mitigate premature convergence and determine a better segmentation effect and higher segmentation accuracy. The PSNR values and the SSIM values of the SCGJO are superior to those of BA, DOA, FPA, MFO, SCA, and GJO which illustrates that the SCGJO not only integrates exploration and exploitation to promote the complementary benefits and mitigates search stagnation but also has fantastic stability and reliability to determine the better segmented images with less distortion degree and higher similarity. The SCGJO incorporates the advantages of GJO and SCA, which requires more time to accomplish the image segmentation and determine greater computational accuracy. The Wilcoxon rank-sum is employed to confirm if there is a substantial disparity between the two groups of data, the results demonstrate that the disparity between the SCGJO and other algorithms is noticeable. The experimental results demonstrate that the SCGJO exhibits exceptional robustness and stability to arrive at a faster convergence rate, higher calculation precision and greater segmentation quality.

Statistically, the SCGJO is based on the golden jackals’ collaborative foraging behavior, which is utilized to address the image segmentation for the mentioned factors. First, the basic GJO has some disadvantages of premature convergence, search stagnation, inferior computation accuracy and sluggish convergence rate. The SCA is introduced into the GJO to strengthen both local and global search abilities, which is beneficial to achieve complementary advantages and determine the best solution. Second, SCGJO has the advantages of straightforward principles, accessible implementation, minimal parameters, strong stability and robustness. The SCGJO not only has strong superiority and stability to avoid search stagnation and achieves complementary benefits but also utilizes exploration and exploitation to determine a faster convergence rate, higher calculation precision and better segmentation quality. Third, the SCGJO imitates discovering prey, tracking and encircling prey, and trapping the prey to attain the global optimal value. The SCGJO has great robustness and resilience to address image segmentation and determine a superior segmentation effect. The SCGJO employs the parameter |E| to switch between exploration and exploitation and refresh the jackal’s position. If |E| ≥ 1, the SCGJO employs the discovering prey to promote the exploration and widen the search area. If |E| < 1, the SCGJO employs the tracking and enclosing prey, and trapping prey to promote exploitation and enhance convergence accuracy. To summarize, the SCGJO integrates exploration and exploitation to determine higher convergence accuracy and better segmentation quality, which is a reliable and consistent approach to address image segmentation.

7 Conclusions and future research

The SCA is added to the basic GJO to overcome the drawbacks of the basic GJO, premature convergence, sluggish convergence rate and inferior computation accuracy. In this paper, the SCGJO based on Kapur’s entropy is presented to address the multilevel thresholding image segmentation, and the purpose is to maximize the fitness value and optimize the threshold values. The SCGJO utilizes the search mechanisms of discovering prey, tracking and encircling prey, and trapping prey to achieve efficient search and determine the best solution. A series of experiments are applied to demonstrate the overall segmentation quality of the SCGJO, the segmentation results are compared with those of the BA, DOA, FPA, MFO, SCA and GJO by achieving maximum the objective value of Kapur’s entropy. As the threshold level increases, the SCGJO has certain superiority and stability to obtain better segmentation images with less distortion degree and higher similarity, and the disparity between the SCGJO and other algorithms is remarkable. The SCGJO not only has substantial resilience and durability to achieve complementary benefits and mitigate search stagnation but also employs exploration and exploitation to upgrade convergence accuracy and segmentation quality. The experimental results demonstrate that SCGJO is a persuasive and constructive approach, which has a faster convergence rate, higher calculation precision and better segmentation quality according to various evaluation indicators.

In future research, we will utilize the simulated annealing algorithm or genetic algorithm to address the image segmentation. The convergence rate and the calculation precision of the basic GJO will be enhanced by the addition of productive strategies, adoption of distinctive coding mechanisms, or combination with other algorithms. Different segmentation mechanisms will be employed to accomplish the color image segmentation with a high threshold level. We will consider the usage of more recent full-reference image quality assessment metrics where visual saliency is incorporated since the human visual system is not equally sensitive to all parts of the image.