1 Introduction

Unmanned underwater vehicles (UUVs) with vision systems not only have the ability to acquire optical images and video information, but they are also able to perform image and video information processing, feature extraction and classification recognition. The mission of a UUV vision system is to quickly and accurately obtain information about underwater targets, then process the obtained information in real time, feed back the processing results to a computer network, and finally guide the UUV to perform the correct operation [17, 19, 23, 24, 30]. The three-dimensional model of a UUV equipped with a vision system is given in Fig. 1. Image segmentation is a crucial and basic process that divides a given image into several distinct regions and extracts the target object of interest from the complex scene. Image segmentation can retain the important structural feature information of an image while greatly reducing the amount of data to be processed in advanced processing stages such as image analysis and recognition. It is the basis for subsequent image understanding such as subsequent feature extraction and target recognition. Therefore, the success of image analysis depends on the reliability of the segmentation, and accurately segmenting images is often a challenging problem. Image segmentation methods can be divided into the following important categories: thresholding-based methods, region-based methods, edge-based methods, clustering-based methods and graph-based methods [13, 14, 32, 45, 46]. Compared with other methods, the thresholding-based method has certain advantages, such as simple operations, high computational efficiency, small storage space, strong robustness and fast processing speeds. Therefore, the thresholding-based method has attracted the attention of scholars and is used to solve the image segmentation problem. The thresholding-based method is divided into bi-level thresholding and multilevel thresholding according to the number of thresholds [9, 11]. The bi-level thresholding divides a given image into foreground and background, but it has certain limitations in solving complex images. When a given image contains a large amount of information and multiple objects, multilevel thresholding has a better segmentation effect and more stable performance.

Fig. 1
figure 1

Three-dimensional model equipped with a vision system

Meta-heuristic algorithms are used to solve multilevel thresholding image segmentation, such as the bat algorithm (BA) [51], the flower pollination algorithm (FPA) [50], the moth swarm algorithm (MSA) [37], the particle swarm algorithm (PSO) [29], and the whale optimization algorithm (WOA) [36]. Zhou et al. proposed the MSA-based Kapur’s entropy to solve the image segmentation problem and verified the effectiveness and feasibility of the proposed algorithm [54]. Aziz et al. present the whale optimization algorithm and moth-flame optimization algorithm to obtain the optimal thresholds in image segmentation, and the proposed methods were found to be superior to other algorithms [16]. Quadfel et al. used the social spider algorithm and flower pollination algorithm as effective methods to solve image segmentation, and the results showed that the methods can balance the exploration and exploitation [38]. Díaz-Cortés et al. applied the dragonfly algorithm to solve multi-level thresholding for breast thermogram analysis, which was proved to be able to support reliable clinical decision making [15]. Sambandam et al. demonstrated the self-adaptive dragonfly algorithm using Kapur’s entropy for image segmentation, and the results indicated that the proposed algorithm obtained the global best solution [41]. Sun et al. proposed a multi-level image threshold algorithm based a novel hybrid algorithm combining the gravitational search algorithm with the genetic algorithm and found that the proposed algorithm has a better segmentation effect [44]. Shen et al. developed a modified flower pollination algorithm to solve multilevel thresholding image segmentation, and the proposed algorithm was found to achieve high calculation accuracy and a fast convergence speed [43]. Gao et al. adopted an improved artificial bee colony algorithm to solve multi-level thresholding image segmentation, and the effectiveness of the proposed algorithm was verified [21]. Pare et al. proposed a firefly algorithm based on the Lévy flight strategy for image segmentation, and the results showed that the proposed algorithm enhanced the search performance and gained the optimal threshold values [40]. Pare et al. combined the cuckoo search algorithm with the minimum cross entropy for color image thresholding, and the results showed that the algorithm selected the optimal threshold values [39]. Satapathy et al. tried to combine the bat algorithm with the chaotic strategy and used the proposed algorithm for image thresholding [42]. Akay et al. conducted research based on using the particle swarm optimization algorithm and the artificial bee colony algorithm for image segmentation, and the results indicated that the algorithms are effective and feasible [7]. Bao et al. proposed the Harris Hawks optimization algorithm to solve the color image multilevel thresholding, and the experimental results revealed that the proposed algorithm is better than other algorithms [10]. Jia et al. a designed modified moth-flame algorithm to verify the overall performance in multilevel thresholding [26]. Bohat et al. applied the TH heuristic for color image segmentation, and the results showed that the proposed algorithm is superior to other algorithms [12]. Emberton et al. proposed a novel method to solve the underwater image and video dehazing problem, and the results showed that the method obtained the optimal effect [18]. Lu et al. proposed a neutrosophic C-means clustering with local information and a noise distance-based kernel metric, which was used to solve the image segmentation [35]. Galdran et al. proposed a red channel method to recover the colors with short wavelengths [20]. Hao et al. proposed an efficient nonlocal variational method to solve the image restoration problem, and the results evaluated its effectiveness and robustness [25]. Vasamsetti et al. present a wavelet based on the variational enhancement technique to cope with underwater imagery, and the results showed that the proposed method obtained the best result [47]. Li et al. proposed the MapReduce-based fast fuzzy c-means algorithm to deal with large-scale underwater image segmentation and the results showed that its segmentation effect is better than those of other methods [31]. Abualigah et al. combined the improved krill herd algorithm and a hybrid function to obtain promising and precise results in this domain, the results proved the proposed algorithm achieved almost all the best results for all datasets in comparision with the other comparative algorithms [6]. Abualigah reviewed the multiverse optimizer algorithm’s main characteristics and procedures and recommended potential future research directions [1]. Abualigah et al. designed the hybrid particle swarm optimization algorithm with genetic operators to solve the text clustering problem, and the results showed that the proposed algorithm improved the clustering performance and obtained accurate clusters [3]. Abualigah et al. combined objective functions and the hybrid krill herd algorithm to solve the text document clustering problem, and the results showed that the proposed algorithm obtained the best results for all evaluation measures and datasets [5]. Abualigah et al. presented a new feature selection method based on the particle swarm optimization algorithm to improve the document clustering, and the results showed that the proposed method was effective and feasible [4]. Abualigah et al. created a novel hybrid antlion optimization algorithm for multi-objective task scheduling problems in cloud computing environments [2]. Liu et al. proposed a novel multichannel internet of things to dynamically share the spectrum with 5G communications, and the results indicated that the proposed method can improve the 5G throughput significantly [34]. Liu et al. proposed a cluster-based cognitive industrial internet of things to solve node transmissions via nonorthogonal multiple access [33].

Water wave optimization (WWO) is based on the shallow water theory, which mainly simulates propagation, refraction and breaking to obtain the global optimal solution [52]. The basic WWO has the disadvantages of premature convergence, low calculation accuracy and a slow convergence speed. To improve the overall optimization performance of the WWO, the elite opposition-based learning strategy [53] and the ranking-based mutation operator [22, 27] are added to WWO, and modified water wave optimization (MWWO) is proposed in this paper. MWWO based on Kapur’s entropy method is applied to solve the underwater multilevel thresholding image segmentation problem. MWWO can effectively balance exploration and exploitation to obtain better segmentation accuracy. To verify the robustness and feasibility of the proposed algorithm, MWWO is compared with the BA [51], the FPA [50], the MSA [37], PSO [29], and the WWO [52], which lays a foundation for future research on underwater image.

The remainder of this article is divided into following sections. Section 2 introduces multilevel thresholding. Section 3 reviews basic WWO. Section 4 presents MWWO. In Section 5, the proposed MWWO-based multilevel threshold method is described in detail. The experimental results and analysis are provided in Section 6. Finally, conclusions and future research are drawn in Section 7.

2 Multilevel thresholding

The bi-level thresholding method and multilevel thresholding method occupy important positions in image segmentation. The bi-level thresholding method involves one threshold value and an image is divided into the foreground and background. That is to say, the bi-level thresholding method is effective and feasible for simple images. However, the method cannot be applied to complex images that contain multiple objects. Therefore, the multilevel thresholding method is used to segment complex images. The purpose of the optimization problem is to obtain the best values in the restricted space. Multilevel thresholding is transformed into an optimization problem that analyzes and finds the best threshold vectors by maximizing the objective function.

Kapur’s entropy is an important and unsupervised technique, and it has been used extensively to solve the image segmentation problem by obtaining the optimal threshold values. The entropy of a given segmented image indicates the compactness and separateness between different classes. Assuming that [t1, t2, …, tn] are the optimal threshold values based Kapur’s entropy [28], an image is split into various classes. The formula is as follows:

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

where hi is the number of pixels with gray level i, N is the total number of pixels, and L is the number of levels in a given image.

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

where

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

H0, H1, …, Hn are the Kapur’s entropies of the distinct classes, and ω0, ω1, …, ωn are the probabilities of each class.

3 WWO

WWO mimics propagation, refraction and breaking operations to solve the optimization problem and obtain the optimal solution. In WWO, each wave with wave height h and wavelength λ represents a solution to a problem, and its fitness value is inversely proportional to the vertical distance to the seabed’s depth. The closer the water wave is to the sea level, the higher the fitness value, the better the corresponding solution, the larger the wave height and the smaller the wavelength. The optimal solution performs local search in a small range, and the inferior solution performs global search in a large range. The illustration of the WWO model is given in Fig. 2, and the corresponding relationship between the practical problem and the shallow water wave model is shown in Table 1.

Fig. 2
figure 2

Different wave shapes in deep and shallow water

Table 1 Correspondence between problem space and population space

3.1 Propagation

The accumulation of the wave energy is accomplished by the water wave continuously propagating, and the motion process is considered to the transition process from deep water to shallow water. In WWO, each wave propagates to update the location, and the relationship between the original wave x and the new wave x is as follows:

$$ {x}^{\prime }(d)=x(d)+\mathit{\operatorname{rand}}\left(-1,1\right)\cdotp \lambda L(d) $$
(7)

where rand(−1, 1) is a uniformly distributed random number and L(d) is the length of the dimension of the search space. The new location is outside the feasible range, it is reset to a random location within the valid range. If f(x) > f(x), wave x replaces wavex, and the wave height is hmax. Conversely, wave x is unchanged and one is subtracted from the wave height to record the energy loss. The wavelength is updated as follows:

$$ \lambda =\lambda \cdotp {\alpha}^{-\left(f(x)-{f}_{\mathrm{min}}+\varepsilon \right)/\left({f}_{\mathrm{max}}-{f}_{\mathrm{min}}+\varepsilon \right)} $$
(8)

where fmax and fmin are the maximum and minimum fitness values, respectively; αis the wavelength reduction coefficient; and ε is a minimal positive number to avoid the divisor from being zero.

3.2 Refraction

The fitness value of wave x has not been improved after multiple propagation operations. With the continuous loss of energy, the wave height is attenuated to zero, and the wave x performs a refraction to avoid search stagnation. The location is updated as follows:

$$ {x}^{\prime }(d)=N\left(\frac{\left({x}^{\ast }(d)+x(d)\right)}{2},\frac{\left|{x}^{\ast }(d)-x(d)\right|}{2}\right) $$
(9)

where x is the optimal wave with the highest fitness value, and N(μ, σ) is a Gaussian random number with a mean of μ and a variance of σ. The wave height of new wave x is reset t ohmax, and wave x learns from the optimal wave x to enhance the global search ability and convergence speed. The wavelength is updated as follows:

$$ {\lambda}^{\prime }=\lambda \frac{f(x)}{f\left({x}^{\prime}\right)} $$
(10)

3.3 Breaking

The increasing energy of a wave will make the wave crest increasingly steeper, and finally the wave will break into a series of solitary waves. The optimal wave performs the breaking operation and the specific operation randomly selects k dimensions (k is a random number from 1 to kmax) to generate a solitary wave. The location is updated as follows:

$$ {x}^{\prime }(d)=x(d)+N\left(0,1\right)\cdotp \beta L(d) $$
(11)

where β is the breaking coefficient. The updated k solitary waves have their fitness values evaluated. If the fitness value of a solitary wave is better than that of the original wave x, x is replaced. Otherwise, x is retained.

The basic WWO is shown in Algorithm 1.

figure a

4 MWWO

To overcome the shortcomings of falling into a local optimal solution and premature convergence, the elite opposition-based learning strategy and the ranking-based mutation operator are introduced into WWO to improve the calculation accuracy. MWWO can effectively obtain the global optimal solution.

4.1 Elite opposition-based learning strategy

The elite opposition-based learning strategy [53] is an effective search mechanism that can increase the population diversity and enhance the global search ability. After comparing the fitness values of the feasible solution and the inverse solution of each wave, the superior individual is regarded as elite wave xe = (xe, 1, xe, 2, …, xe, D), The wave xi and elite inverse solution \( {x}_i^{\prime } \) are xi = (xi, 1, xi, 2, …, xi, D) and \( {x}_i^{\prime }=\left({x}_{i,1}^{\prime },{x}_{i,2}^{\prime },\dots, {x}_{i,D}^{\prime}\right) \), respectively, and the formula is as follows:

$$ {x}_{i,j}^{\prime }=k\cdotp \left(d{a}_j+d{b}_j\right)-{x}_{e,j},i=1,2,\dots, n;j=1,2,\dots, D $$
(12)

where n is the size of the population, D is the search space dimension, k ∈ U(0, 1), and daj and dbj are the dynamic boundaries of jth decision variable. The latter are calculated as follows:

$$ d{a}_j=\min \left({x}_{i,j}\right),d{b}_j=\max \left({x}_{i,j}\right) $$
(13)

4.2 Ranking-based mutation operator

To choose the optimal individual, it is necessary to sort each wave according to the related fitness values. First, the population is sorted in ascending order (i.e., from best to worst) based on the fitness value of each wave. The ranking of an individual is assigned as follows:

$$ {R}_i={N}_p-i,i=1,2,\dots, {N}_p $$
(15)

The optimal wave in the current population will obtain the highest ranking, and Np is the size of the population. After sorting the fitness value of each wave, the selection probability Pi of the ith wave is given as follows:

$$ {p}_i=\frac{R_i}{N_p},i=1,2,\dots, {N}_p $$
(16)

The ranking-based mutation operator “DE/rand/1” is shown in Algorithm 2. The probability that the individual with a higher ranking is selected as the base vector or terminal vector in the mutation operator become larger, and the aim is to propagate the useful information from the current population to the offspring. The starting vector is not selected according to the selection probability, and the two vectors in the difference vector are obtained from better vectors. The corresponding step-size of the difference vector may decrease rapidly and lead to premature convergence [22, 27].

figure b

The ranking-based mutation operator increases the probability that a good individual is selected, and this enhances the exploitation ability. The elite opposition-based learning strategy increases the diversity of the population and enhances the exploration ability to improve the calculation accuracy. MWWO is shown in Algorithm 3.

figure c

5 MWWO-based multilevel threshold method

Water waves represent search agents. Their positions represent the image segmentation thresholds, and the fitness values of the waves are determined according to the change of the position. We update the optimal wave by comparing the fitness value and the optimal position provides the optimal threshold for segmentation. The correspondence between the image segmentation and MWWO space is given in Table 2. MWWO based on image segmentation is shown in Algorithm 4. The flowchart of MWWO for multilevel thresholding is shown in Fig. 3.

Table 2 Correspondence between image segmentation and MWWO
Fig. 3
figure 3

Flowchart of MWWO for multilevel thresholding

figure d

5.1 Complexity analysis

In this section, the time and spatial complexity of the proposed algorithm are analyzed.

5.1.1 Time complexity

The time complexity of MWWO is briefly analyzed in this subsection. MWWO mainly contains five steps: initialization, ranking-based mutation, propagation, breaking and refraction. If the population size is N, the maximum number of iterations is T, and the dimension of the problem is D. The time complexity of MWWO is described as follows. Step 1 requires O(1). Step 2 requires O(N). Steps 3, 4 and 5 require O(N × D × T). Steps 6, 7, 8 and 9 require O(1). Steps 10, 11, 12 and 13 require O(1). Steps 14, 15, 16 and 17 require O(1). Steps 18, 19, 20, 21, 22, 23 and 24 require O(N × D × T). By considering all of the above steps, the total time complexity of MWWO is O(N × D × T).

5.1.2 Spatial complexity

The spatial complexity of an algorithm is regarded as the storage space consumed by the algorithm. The total space complexity of MWWO is O(N × D × T). The optimization algorithms are used to solve the spatial complexity according to the number of agents. Therefore, the space complexity of MWWO is effective and feasible.

6 Experimental results and analysis

6.1 Experimental setup

The numerical experiment is set up on a computer with an Intel Core i7-8750H 2.2 GHz CPU, a GTX1060, and 8 GB memory running on Windows 10.

6.2 Test images

The underwater optical vision system consists of three important parts: the bottom optical vision image acquisition system, the middle image processing system and the high-level underwater target recognition system. The system’s task is to perform pre-processing, feature extraction and classification recognition on signal frame or video sequence images. A UUV with a vision system shoots underwater images, then applies image processing techniques to obtain the target information and uses pattern recognition to complete the image understanding to achieve the purpose of environmental perception. The research goal of underwater image segmentation is to achieve fast, accurate, highly robust and adaptive segmentation. Image segmentation is a key step from image processing to image analysis, and is the key to achieving target feature extraction, recognition and tracking. Image segmentation divides a pre-processed underwater image to obtain an image that contains only the target and the background, making it more intuitive. The segmentation quality will directly affect the stability and reliability of the feature extraction, target recognition and tracking. Due to the diversity and complexity of underwater environments, the fluctuation of the water medium, the effects of light scattering, refraction and absorption, and the disturbance of suspended objects in the water, the underwater image has low contrast and distorted image features. Therefore, it is necessary to further study underwater image segmentation technology. The experiments address ten selected images to assess the effectiveness and feasibility of MWWO, and they are given in Fig. 4.

Fig. 4
figure 4

Original test images

6.3 Parameter setting

The WWO based on the elite opposition-based learning strategy is named EWWO [52, 53], and the WWO based the ranking-based mutation operator is named RWWO [22, 27, 52]. To verify the superiority of the MWWO algorithm in underwater multilevel thresholding image segmentation, a total of eight algorithms (including the BA, the FPA, the MSA, PSO, the WWO, EWWO, RWWO and MWWO) are selected for the comparison experiments. The parameters of all algorithms are given in Table 3, and the control parameters are derived from the original paper and are representative empirical values.

Table 3 Parameters of all algorithms

6.4 Segmented image quality measurements

Five methods are applied to evaluate the overall performance of the segmented images, and the important metrics are utilized as follows.

  1. (1)

    Fitness value. The information contained in the segmented image is closely related to the fitness value. The larger the fitness, the more information the segmented image contains.

  2. (2)

    Execution time. Each algorithm runs 30 times independently to calculate the average execution time, and the time can objectively reflect the computational complexity. The less time that is taken, the faster the algorithm.

  3. (3)

    Peak signal to noise ratio (PSNR). The PSNR is applied to evaluate the difference between the segmented image and the reference image according to the intensity value in the image, and the value represents the quality of the reconstructed image. The larger the PSNR value is, the lower the image distortion. However, it has some limitations. The visual acuity of human eyes is not absolute, which results in a PSNR value that may be inferior to a lower PSNR value. The PSNR is defined as follows [8]:

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

where MSE is the mean squared error. It is defined as follows:

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

where M and N represent the size of the original image and the segmented image respectively.

  1. (4)

    Structure similarity index (SSIM). The SSIM is used to calculate the similarity between the original image and the segmented image in the range of [−1,1]. The larger the SSIM value, the better the segmented image. The SSIM is defined as follows [48]:

$$ SSIM\left(\mathrm{x},\mathrm{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)} $$
(19)

where μx and μy represent the mean intensity of the original image and the segmented image respectively. \( {\sigma}_x^2 \) and \( {\sigma}_y^2 \) represent the standard deviation of the original image and the segmented image respectively. σxy represent the covariance between the original image and the segmented image. c1 and c1 are both constants.

  1. (5)

    Wilcoxon’s rank-sum test. To further verify the superiority and feasibility of MWWO, the Wilcoxon’s rank-sum test [49] was adopted. If the p value is less than 0.05, there is a significant difference between the algorithms, and the optimization performance is better than those of the other algorithms. If the p value is larger than 0.05, there is no significant difference between the algorithms.

6.5 Results and analysis

For a fair comparison, the population size of all algorithms is 30, the maximum number of iterations is 100, and the number of independent runs is 30. The numbers of thresholds are 2, 3, 4, 5 and 6, respectively. The MWWO based on Kapur’s entropy method is used to solve the underwater multilevel thresholding image segmentation. The experimental results are compared with other algorithms that include the BA, the FPA, the MSA, PSO, the WWO. Meanwhile, to further verify that the elite opposition-based learning strategy and the ranking-based mutation operator can improve the calculation accuracy of the algorithm, ablation experiments are added to demonstrate this point. MWWO is compared with WWO based on the elite opposition-based learning strategy (EWWO) and WWO based on the ranking-based mutation operator (RWWO). The experimental results are given in Tables 4, 5, 6, 7, 8 and 9, and the comparison results of the segmented images are given in Figs. 5, 6, 7, 8, 9, 10, 11, 12, 13 and 14. All experimental data are based on the optimal fitness value, the set threshold value, the average execution time, the PSNR, the SSIM and the p value of Wilcoxon’s rank-sum test.

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. 5
figure 5

Segmented images of Test 1

Fig. 6
figure 6

Segmented images of Test 2

Fig. 7
figure 7

Segmented images of Test 3

Fig. 8
figure 8

Segmented images of Test 4

Fig. 9
figure 9

Segmented images of Test 5

Fig. 10
figure 10

Segmented images of Test 6

Fig. 11
figure 11

Segmented images of Test 7

Fig. 12
figure 12

Segmented images of Test 8

Fig. 13
figure 13

Segmented images of Test 9

Fig. 14
figure 14

Segmented images of Test 10

Table 4 gives the optimal fitness values of each algorithm. The goal of image segmentation is to maximize the fitness value of Kapur’s entropy method to obtain the optimal threshold. The numbers of thresholds are defined as 2, 3, 4, 5 and 6. It can be seen that as the number of thresholds increases, the fitness value will become larger, which means that different algorithms obtain higher segmentation accuracy when solving the image segmentation problem. To highlight the obviousness and superiority of MWWO, the ranking is based on the optimal fitness values. Ten underwater images are used to test the segmentation performance of all algorithms, and each image has five different threshold levels. That is, there are 50 fitness values for each algorithm. For MWWO, its number of best fitness values is 42. Compared with other algorithms, MWWO can avoid falling into the local optimum to obtain the global optimal solution. The fitness values of EWWO and RWWO are obviously better than that of the basic WWO, but the optimization performance of MWWO is the best. MWWO effectively balances the exploration and exploitation to obtain the optimal fitness values, which indicates that MWWO contains more information in the segmented images. Table 5 gives the best threshold values obtained by all the algorithms. The threshold value determines the quality and accuracy of image segmentation. Different algorithms are used to solve the underwater image segmentation problem, but MWWO can obtain relatively better threshold values so that the MWWO can achieve the best fitness values, which indicates that MWWO has strong robustness and better calculation accuracy.

Table 6 gives the average execution time of each algorithm. The larger the threshold level, the more time each algorithm consumes. MWWO can obtain the optimal fitness values and the best threshold values. Compared with the basic WWO, MWWO has the elite opposition-based learning strategy and the ranking-based mutation operator added, which improve the convergence accuracy of the basic WWO and enhances the image segmentation effect to a certain extent. However, MWWO consumes more time to complete the underwater multilevel thresholding image segmentation compared to WWO, EWWO and RWWO. The average execution time of MWWO is better than those of the other algorithms. The experimental results show that MWWO can effectively complete the underwater image segmentation task and obtain a higher segmentation accuracy.

Table 7 gives the PSNRs of each algorithm. The underwater image segmentation accuracy is close to the threshold levels, and the optimization algorithm can obtain higher segmentation accuracy under a higher threshold level. The PSNR not only assesses the difference between the segmented image and the original image, but it is also a criterion for image segmentation to assess the segmentation performance of each algorithm. The PSNRs of MWWO based on Kapur’s entropy method are compared with these of the other algorithms based on Kapur’s entropy method. By increasing the number of thresholds, the PSNRs increase significantly, which indicates that the optimization algorithm has better image segmentation quality. The elite opposition-based learning strategy increases the diversity of the population and the ranking-based mutation operator improves the selection probability. Both of these improve the calculation accuracy and robustness of the basic WWO so that MWWO can effectively improve the global search ability and local search ability to obtain the optimal solution. To reflect the superiority of MWWO, a ranking is carried out based on the sizes of the PSNRs. The higher the ranking is, the better the PSNRs. Each algorithm has 50 PSNRs, and 35 PSNRs of MWWO are the best in all algorithms. The experimental results show that MWWO has stronger robustness and a better segmentation effect.

Table 8 gives the SSIMs of each algorithm. The SSIM is used to assess the visual similarity of the segmented image and the original image. The SSIMs increase as the threshold level increases, which indicates that the segmented images obtained by the optimization algorithms have less distortion and are closer to the original images. MWWO can avoid premature convergence and jump out of the local optimum to obtain better fitness values. To verify the image segmentation effect of MWWO, the ranking is based on the size of the SSIMs. The higher the ranking is, the more imgae segmentation information the algorithm contains. Compared with other algorithms, MWWO not only obtains better SSIMs, but also contains more segmentation information. In other words, the segmented images obtained by MWWO are relatively close to the original images. Each algorithm has a total of 50 SSIMs, and 36 SSIMs of the MWWO are the best in all algorithms. The experimental results show that MWWO has higher similarity, higher calculation accuracy and a better segmentation ability.

The p value of the Wilcoxon rank-sum test [49] is used to evaluate the significance of the difference between MWWO and other algorithms. Table 9 gives the p value of the Wilcoxon rank-sum test. p < 0.05 indicates a significant difference between MWWO and the other algorithms. p > 0.05 indicates no significant difference between MWWO and the other algorithms. The experimental results show that there is a significant difference between MWWO and other algorithms and the data are not obtained by accident.

Figures 5, 6, 7, 8, 9, 10, 11, 12, 13 and 14 give the segmented images of each algorithm under different threshold levels. The segmentation effect of underwater images is better as the threshold level increases. The segmented images contain more valuable information. MWWO based on Kapur’s entropy method is used to solve underwater multilevel thresholding image segmentation. Compared with other algorithms, MWWO has stronger robustness and better segmentation performance to obtain better segmented images. The segmentation effect of MWWO is closer to the original image. MWWO obtains the optimal fitness values and the best threshold values, which shows that MWWO can avoid falling into the local optimum and enhance the global search ability to obtain the optimal solution. In addition, MWWO has higher calculation accuracy and stronger search performance. The population size of all algorithms is 30, the maximum number of iterations is 100, and the number of independent runs is 30. MWWO has the elite opposition-based learning strategy and the ranking-based mutation operator added. The calculation accuracy of MWWO has been greatly improved, but MWWO consumes more time compared to the basic WWO, EWWO and RWWO. The PSNRs and SSIMs of MWWO are obviously superior to those of other algorithms, which shows that MWWO has low distortion and higher structure similarity. The Wilcoxon’s rank-sum test is used to verify whether there is a significant difference between MWWO and other algorithms. In summary, MWWO has higher calculation accuracy, stronger robustness and better segmentation performance such that it can effectively solve the underwater image segmentation problem.

Statistically, MWWO is based on shallow water wave theory, which simulates propagation, refraction and breaking for global optimization. MWWO can solve the underwater image segmentation problem for the following reasons. First, MWWO has the characteristics of a simple algorithm framework, fewer control parameters and a smaller population size. Second, the elite opposition-based learning strategy increases the diversity of the population and avoids falling into the local optimum, and the ranking-based mutation operator improves the selection probability. Two strategies can achieve complementary advantages to improve the calculation accuracy of the basic WWO. Third, MWWO can avoid premature convergence and expand the search space. Meanwhile, the MWWO can effectively balance exploration and exploitation to obtain the global optimal solution. To summarize, MWWO is an effective and feasible method for solving the underwater image segmentation problem.

7 Conclusions and future research

In this paper, the elite opposition-based learning strategy and the ranking-based mutation operator are added into the basic WWO to improve its calculation accuracy. MWWO is proposed, which is used to solve the underwater image segmentation problem. The purpose of image segmentation is to obtain the optimal threshold values by maximizing the fitness value of Kapur’s entropy method. The larger the threshold level is, the better the segmentation effect for an underwater image. MWWO has a strong global search ability to find the optimal solution. Compared with other algorithms, the MWWO can obtain segmented images with more information and have higher segmentation accuracy. As the threshold level increases, MWWO can balance the global search ability and the local search ability to obtain better segmented images. The experimental results indicate that MWWO has higher calculation accuracy and a better segmentation effect according to the fitness value, the threshold values, the execution time, the PSNR, the SSIM and the Wilcoxon’s rank-sum test. Meanwhile, MWWO has stronger robustness and practicability to successfully solve the task of underwater image segmentation.

In future research, MWWO will be used to solve complex underwater image segmentation and high threshold color image segmentation. Meanwhile, various thresholding techniques will be applied to obtain the optimal threshold values and compare the accuracy and complexity, such as Tsallis entropy, Renyi entropy, cross entropy, fuzzy entropy, and Otsu’s method. This work will further verify the segmentation performance of MWWO. In addition, the basic WWO will be added to an effective strategy or combined with other optimization algorithms to improve the convergence speed and calculation accuracy. The proposed algorithm will be used to solve more complex optimization problems.