Efficient Approach to Color Image Segmentation Based on Multilevel Thresholding Using EMO Algorithm by Considering Spatial Contextual Information

The process of image segmentation is partitioning an image into its constituent parts and is a significant approach for extracting interesting features from images. Over a couple of decades, many efficient image segmentation approaches have been formulated for various applications. Still, it is a challenging and complex issue, especially for color image segmentation. To moderate this difficulty, a novel multilevel thresholding approach is proposed in this paper based on the electromagnetism optimization (EMO) technique with an energy curve, named multilevel thresholding based on EMO and energy curve (MTEMOE). To compute the optimized threshold values, Otsu’s variance and Kapur’s entropy are deployed as fitness functions; both values should be maximized to locate optimal threshold values. In both Kapur’s and Otsu’s methods, the pixels of an image are classified into different classes based on the threshold level selected on the histogram. Optimal threshold levels give higher efficiency of segmentation; the EMO technique is used to find optimal thresholds in this research. The methods based on an image’s histograms do not possess the spatial contextual information for finding the optimal threshold levels. To abolish this deficiency an energy curve is used instead of the histogram and this curve can establish the spatial relationship of pixels with their neighbor pixels. To study the experimental results of the proposed scheme, several color benchmark images are considered at various threshold levels and compared with other meta-heuristic algorithms: multi-verse optimization, whale optimization algorithm, and so on. The investigational results are illustrated in terms of mean square error, peak signal-to-noise ratio, the mean value of fitness reach, feature similarity, structural similarity, variation of information, and probability rand index. The results reveal that the proposed MTEMOE approach overtops other state-of-the-art algorithms to solve engineering problems in various fields.


Introduction
Digital image segmentation is a technique of partitioning the image into regions to extract information about features of an image with homogeneous features in terms of intensity level, texture structure, color information, etc. The image segmentation schemes available from the literature, multi-level thresholding [1] of grayscale on the histogram of an image is a highly established method and is used in various applications from satellite image segmentation [2][3][4] to medical images. The important multilevel thresholding-based segmentation techniques are Kapur's and Otsu's methods [5,6]. Segmentation can often be used as a preprocessing step in object recognition, computer vision, image analysis, and so on in different applications such as medical [7], agricultural, industrial, fault detection, weather forecasting, etc. In general, the majority of segmentation techniques are based on

Otsu Method
This technique [5,9] is used for multi-level thresholding (MT), in which gray levels will be partitioned into different regions or classes; in this process thresholding (th) levels are selected; the set of rules to be followed for bi-level thresholding are C1 ← p if 0 ≤ p < th, C2 ← p if th ≤ p < L − 1 (1) where C1 and C2 are two classes, p indicates the pixel value for the gray levels {1, 2, 3, . . . , L − 1} in an image and L − 1 indicates the maximum gray level. If the gray level is below the threshold th then that pixel is grouped into class C1, else it is grouped into class C2. The set of rules for multi-level thresholding (MT) are From Equation (2), C1, C2, . . . , Cn indicates different classes, and threshold levels to find objects represented by {th1, th2, ..., thi, thi + 1, thn}; these thresholds can be computed based on either a histogram or an energy curve. By use of these threshold levels, all the pixels will be classified into different classes or exclusive regions. The significant methods of segmentation of images based on threshold levels are Otsu's and Kapur's methods and, in both cases, threshold levels can be computed by maximizing the cost function (inter-class variance). In this work, optimized threshold levels are used by Otsu's method th values [23]. In this method, inter-class variance is considered the objective function, also called a cost function. For experimentation, grayscale images are considered. The below expression gives the probability distribution for each gray level From Equation (3), the pixel value is denoted by i, with the range of grayscale is (0 ≤ i ≤ L − 1), where c = 1, 2, 3 for RGB and c = 1 for a grayscale image, and total image pixels are represented by NP; the histogram of considered images is represented by h i c . In bi-level thresholding, the total pixels in the image are grouped into two classes whereas w 0 (th) and w 1 (th) are the probabilities distributions for C1 and C2, as is shown below as The means of two classes µ c 0 and µ c 1 are computed by Equation (6), and the variance between classes σ 2 c being given by Equation (7).
iPh c i w c 1 (th) (6) σ 2 c = σ c 1 + σ c 2 (7) Notice that, for both Equations (6) and (7), c is determined by the type of image, where σ c 1 and σ c 2 in Equation (5) are the variances of classes C1 and C2 which are given in Equation (8).
where i th represents i class, w c i indicates probability of i th classes and µ c j is the mean of the ith class. For MT segmentation, these parameters are anticipated as below: Ph c i (12) Furthermore, the averages of each class can be computed as

Multilevel Thresholding with Kapur's Method
One more important nonparametric technique that is used to compute the optimal threshold values is Kapur's method, entropy as an objective function. This method focuses on finding the optimal thresholds by maximizing the overall entropy. The entropy measures the compactness and separability between classes. For the multilevel, the objective function of Kapur's method is defined as, (14) where TH is a vector, TH = [th 1 , th 2 , th 3 . . . . . . th k−1 ]. Each entropy is calculated separately with its th value, given for k entropies Ph c i is the probability distribution of the particular intensity levels and it is obtained using (5). The values of the probability occurrence (w c 0 , w c 1 , w c 2 , . . . ,w c k−1 ) of the k classes are obtained using (12). In the end, by using Equation (2) classify the pixels into various classes.

Electro-Magnetism Optimization (EMO) Algorithm
The EMO [12] can be used to discover the solutions to global problems which are nonlinear in nature, and it can be used for minimization and maximization problems. For maximizing (x), x = {x 1 , x 1 , . . . x 1 } ∈ R where x ∈ R, whereas X = {x ∈ R|l 1 ≤ x i ≤ u i , i = 1, 2, . . . n} is a solution set limited between (l 1 ) and (u i ) lower and upper limits, respectively. The EMO uses N, n-dimensional points x i,t as a population, the X indicates a solution set from the above expression, and t represents several generations or iterations by using the algorithm. Similar to other evolutionary optimization techniques, in EMO the initial population can also be taken as S t = {x 1,t , x 2,t . . . , x N,t } (being t = 1), selected from uniformly distributed random samples of the search region, X, whereas S t is the resultant solution set at the t th iteration. At the first iteration S t should be initialized by arbitrary values randomly, then the EMO algorithm executes until the stopping criterion is satisfied.
In every iteration of EMO, two essential operations will take place; the first operation is the solution set S t moved to another different location or solution by means of the attraction and repulsion mechanism of the electromagnetism theory [11]; in the next operation positions moved as per the electromagnetism technique are auxiliary moved locally by local search and reach a member of S t+1 in the (t + 1)th iteration. These two operations bring the solutions to the set close to global optimization solutions.
In EMO, similarly to electromagnetism theory, each solution x i,t ∈ S t is treated as a charged particle, whereas the magnitude of the particle's charge is treated as an object function, the solutions with better or optimal (higher/lower) object functions are associated with higher charges than the other set of solutions and also have a greater repulsionattraction mechanism. In the evolution process of EMO, the points or solutions with higher charges can attract other points in the search space S t and points with a lower charge repel other points.
The total force F t i exerted at each point, ( x i,t ), can be calculated by a combination of attraction-repulsion forces and each x i,t ∈ S t is moved towards its total force to the location y i,t . After this step, a local search algorithm is used to find the vicinity of every y i,t by y i,t to z i,t . The solution set x i,t+1 ∈ S t+1 at (t + 1)th iteration is subsequently computed as: A detailed description of each step in EMO is given in Algorithm 1 below. Initialize: set the iteration counter 1 = t, initialize the number of S t uniformly in X, and identify the best point in S t iii.
Iter max do iv.
end while Step 1: The algorithm runs for Iter max iterations or generations; n × Iter local is the maximum number of locations z i,t .
Step 2: The points x i,t , t = 1 are selected uniformly in X, i.e., x i,t in Unif(X), i = 1,2, . . . , N where Unif represents the uniform distribution. The cost function f(x i,t ) is computed at each iteration and the best point is identified as follows: From Equation (17), x B t is the element of S t that gives the maximum numerical value in terms of the fitness function or objective function f.
Step 3: while t < Iter max do Step 4: At this step, a value q i,t is assigned to each point x i,t , the charge q i,t of x i,t depends on the function f(x i,t ) and the points which have the best cost function have more charge than other points. At every point, the charges can be computed by Equation (18) as given below: Then, at this point, the force F t i,j , connecting two points x i,t and x j,t , can be found by using Equation (19).
In the end, the total force F t i computed at each x i,t is Step 5: each point x i,t except for x B t is moved along the total force F t i using: where λ in Unif(0, 1) for each coordinate of x i,t , and RNG is the range of movement toward the upper or lower limits.
Step 6: For each, y i,t a maximum of local Iter local, points are generated in each coordinate direction in the δ neighborhood of y i,t . This means that the process of generating local points is continued for each y i,t until either a better z i,t is found or the n × Iter local the trail is reached.
Step 7: x i,t+1 S t+1 are chosen from y i,t and z i,t by using Equation (20), and the best solution is recognized by using Equation (21).
The significant steps of the EMO algorithm are given in [8] and the EMO algorithm needs a smaller number of iterations to generate solutions for complex nonlinear optimization problems. Table 1 depicted the comparative parameters and expressions used for evaluating the proposed method. The main reason for selecting the EMO is, that it gives much better results, as shown in Tables 2-17. The EMO has been used for solving various optimization problems, including image-processing tasks such as multilevel thresholding. EMO is known for its efficiency in solving complex optimization problems. In the context of multilevel thresholding, EMO can efficiently search for the optimal set of thresholds that maximize the image segmentation quality. EMO is a population-based algorithm that can search the entire solution space and avoid getting stuck in local optima. This is important for multilevel thresholding because the optimal set of thresholds may be located in a complex and highly nonlinear search space. EMO can be easily adapted to handle different types of objective functions and constraints. EMO is robust to noise; in the context of multilevel thresholding, it can handle images with different levels of noise and variability. EMO requires a few parameters to be tuned, which makes it easy to use.
is the input image and the segmented image is I s (i, j). C 0 × R 0 is the size of the image.
is the maximum phase congruency of two images.

7
Probability Rand Index (PRI) The internal validation measurePRIis an indication of resemblance between two regions in an image or clusters; it is expressed as given below PRI = a+b a+b+c+d Whereas dataset X is portioned into two subsets C 1 and C 2 , the number of pairs of pixels (or elements) that are present in both subsets C 1 and C 2 is indicated by a. b indicates the number of pairs of elements in X that are a different subset in C1 and a different subset in C2. c indicates the number of pairs of elements in X that are the same subset in C1 and a different subset in C2. d denotes the number of pairs of elements in X that are a different subset in C1 and the same subset in C2.

Energy Curve
To find effective optimized threshold levels, the energy curve [3] will be used instead of the histogram of an image for various applications.

Equation of Energy Curve
Consider an image indicated as I = x(i, j) where i and j are spatial coordinates, i = 1, 2, . . . N and j = 1, 2, ...M and the size of the image are X = M × N. For an image, spatial correlation among neighboring pixels can be devised by defining the neighborhood system with N of order d, for an image with spatial coordinates (i, j) as N d ij = (i + u, j + v), (u, v) ∈ N d ; various configurations of the neighborhood are described in [30]. Neighborhood systems with second-order are measured for the generation of energy curve, i.e.,(u, v) ∈ {(±1, 0), (0, ±1), (1, ±1), (−1, ±1)}.
The foremost step is to find the energy of each pixel value of the entire grayscale range of an image considered; generate a binary matrix B be another matrix, where c ij = 1,∀(i, j). At each pixel value x, the energy value E x of the image, I can be computed with the below expression.
From Equation (22), its second term should be a constant; consequently, the energy associated with each pixel is E x ≥ 0. From the above equation, we can see that the energy for a particular gray level is zero if each element of B x , either 1 or − 1 can be put forward in another way as all the pixels of an image I(i, j) with gray level either greater than x or less than x, otherwise, the energy level at a particular gray value x is positive as given in Figure 1.

Characteristics of Energy Plot
The energy plot generated as per Equation (22) is associated with some exciting characteristics. Each object in an image is represented by a gray level range, for instance, the pixel range [t 1 , t 2 ] represents an object in a given image, at x = t 1 ; the elements in B x are 1 for pixels corresponding to the object in the same image. As x increases few elements in the matrix B x will become −1, at x = t 2 ; all the matrix elements in B x corresponding to pixels in the object becomes −1. The energy curve produced for the gray-level range [t 1 , t 2 ] is a bell shape. Figure 1 depicts the image histogram and energy curve related to eight images. The valley and peak points on the energy curve are useful to identify objects in an image.

Proposed Method
The variety of multilevel thresholding techniques for image segmentation is given in the introduction section and the limitations of the histogram-based techniques are also presented. The proposed method uses an energy curve instead of the histogram, and EMO was used to find optimized threshold levels on the energy curve by maximizing the interclass variance and entropy for Otsu's method and Kapur's method, respectively, as given in Equation (11) for Otsu's method; the flow chart of a new approach is given in Figure 2.
J. Imaging 2023, 9, x FOR PEER REVIEW 26 of 41 11: Select the particle that has the best x objective function value using f orf from Equation (9)or Equation (14). 12: Apply the best thresholds values contained in x to the input image I as per Equation (2). The Algorithm for EMO initialization is given below as Algorithm 2.
Algorithm 2: EMO initialization 1. From the flow chart, take an image for experimentation x(i, j) for multilevel thresholdingbased segmentation and plot the energy curve of the considered color image by using Equation (1), then assign the design parameters of EMO and the solution matrix values are filled with arbitrary numbers, initially denoted as x i (set of threshold levels) as per Equation (18), then divide all the pixels in the image as per selected threshold levels into different classes or regions as per Otsu's technique and Kapur's method, then find the inter-class variance and entropy of the segmented image, as given in Equation (11). Afterward, find the new set of threshold levels with Equation (17) again, find the fitness and compare it with the previous fitness function, and run this procedure until there is no improvement in the objective function or the specified number of iterations is reached, and lastly find the optimized threshold valued (x new ) and classify the gray levels as Equation (3) for final segmentation for R, G, and B components separately for color images. The results of this method are compared with histogram-based techniques for evolution.
Steps in the implementation of the proposed method for color image segmentation are given in Table 18 below. Table 18. Steps for implementation of the Proposed method on a color image.
Step Operation

1:
Read a color image I and separate it into I R , I G , and I B. For RGB image c = 1,2,3 and for gray image c = 1.

2:
Obtain energy curves for RGB images E R , E G , and E B .

3:
Calculate the probability distribution using Equation (3) and the histograms.

4:
Initialize the parameters: Iter max , Iter local , δ, and N 5: Initialize a population S c t of N random particles with k dimensions. 6: Find w c i and µ c i ; evaluate S c t in the objective function f otsu or f Kapur depends on the thresholding method to find threshold values for segmentation.

7:
Compute the charge of each particle using Equation (18), and with Equations (19) and (20) compute the total force vector. 8: Move the entire population S c t along the total force vector using Equation (21). 9: Apply the local search to the moved population and select the best elements of this search depending on their values of the objective function.

10:
The t index is increased in 1. If t ≥ Iter max or if the stop criteria are satisfied the algorithm finishes the iteration process and jumps to step 11. Otherwise, jump to step 7.

11:
Select the particle that has the best x B i objective function value using f otsu or f Kapur from Equation (9)or Equation (14).

12:
Apply the best thresholds values contained in x B i to the input image I as per Equation (2). The Algorithm for EMO initialization is given below as Algorithm 2. for k = 1 to d do 3.

End for
The Algorithm to find optimized or best threshold values is given below as Algorithm 3. From the above algorithms, pseudo-code, LSITER is the number of local search iterations. The steps given in Algorithms 2 and 3 can be treated as pseudo-code also.
For i = 1 to m do 4.
for k = 1 to d do 5.
y ← x i 8.
iff(y) < f X i then 15. x End while 20.
end for 21.
end for 22.
X best ← argmin f x i ), x i ∈ X The proposed "multilevel thresholding based on EMO and energy curve (MTE-MOE)" has many advantages over other methods for natural color images as illustrated in Tables 2-17 and Figures 3-12. Despite its merits, the MTEMOE method also has some limitations such as being based on an energy curve, which takes more time compared to the time needed to compute the histogram of an image. Direct keywords for computing the histogram of an image are available in Matlab and other scientific languages but the code required to generate the energy curve needs to be developed by researchers based on Equation (22). In the case of color image segmentation, the time taken to compute is much greater than the energy curve that needs to be computed for three color components of the image. While EMO has been successfully applied to a wide range of optimization problems, it also has some limitations. Multilevel thresholding of images often involves optimizing over high-dimensional search spaces, which can make it difficult for EMO to converge to an optimal solution in a reasonable amount of time. Images may contain noise that can affect the performance of EMO. EMO may not be able to handle the noise and may converge to suboptimal solutions. EMO may not be adaptable to different types of images, such as images with varying contrast or illumination.
The advantage of context-sensitive multilevel thresholding with an energy curve can be used with different upcoming new optimization techniques to further improve the effectiveness of segmentation. This method proposed with electromagnetic optimization can be extended for color images with different sorts of artifacts and can be tested for its efficiency. EMO with an Energy Curve can be applied to other image-processing tasks, such as image denoising, image compression, and image restoration. Hybrid optimization algorithms can be developed that combine EMO with other optimization techniques to further improve the performance of multilevel thresholding. The robustness of EMO can be studied for multilevel thresholding by testing it on a variety of images with different characteristics, such as size, complexity, and noise levels. Future research work in this area has the potential to contribute to the development of more efficient and effective algorithms for image-processing tasks.                  Image1  Image2  Image3  Image4  Image5  Image6  Image7  Image8 Image9 Average

Conclusions
In this article, many schemes for color image segmentation are discussed. From that pool of methods, multilevel thresholding (MT) is a powerful technique, generally based on the histogram of an image. To nullify the shortfalls of the histogram, another curve that is similar to the histogram called the energy curve is used instead of the histogram to efficiently compute optimized thresholds. The proposed model for segmentation is based on Otsu's and Kapur's methods for MT on an energy curve with EMO for finding optimized threshold levels by maximizing the inter-class variances and entropy. The results for a group of color benchmark images clearly show that MT on the energy curve is more efficient than the histogram-based techniques. The energy curve can consider spatial contextual information to find energy levels at each pixel. Consequently, the same

Results and Discussions
This section describes the experimental results of the proposed method and compares it with existing state-of-the-art techniques, and also explains the source of images under test and metrics used for the evolution of the segmentation techniques.
The proposed algorithm and existing techniques are experienced with color images fetched from USC-SIPI and Berkeley segmentation data set (BSDS500); a total of nine images are considered for the test, six natural images and three satellite images as shown in Figure 1; in the same image the histograms and energy curves are also illustrated, indicated as Images 1-9; all of the images considered for experimentation have distinct features. In this study mainly objective analysis is adapted and depends on numerical values instead of quality measures based on visual perception [40].
The comparative analysis between the proposed algorithm and other different optimization algorithms such as SAMFO -TH [9], MVO [29], WOA [24], FPA [28], SCA [25], ACO [16], PSO [13], ABC [19], and MFO [21] is necessary. The results and experimental setups are taken from published articles [8] to compare with the proposed method, all the algorithms executed until there is no change in the fitness function, and the MEAN value fitness function of all the algorithms [8] is illustrated in Table 17. All the images are tested with the number of threshold levels N = 4, 6, 8, 10, 16, 20, and 24.
The selection of comparative metrics [8] is an important task; it should be done in such a way as to test all the aspects of segmentation. The parameters used in this study [4] are described in this section. (i) The mean value of fitness (MEAN) with Kapur's and Otsu's method, is considered a significant metric to test the performance of optimization schemes. This index is computed using Equation (9) in Otsu's method or Equation (3) in Kapur's entropy. It demonstrates the robustness of the optimization algorithm in the course of selecting the optimized threshold vector. (ii) Peak signal-to-noise ratio (PSNR), this parameter estimates the deviation of a segmented image from its original image, which indicates the quality of a reconstructed image. A high PSNR value refers to better segmentation. (iii) Mean square error (MSE), a lower MSE value illustrates better segmentation; it computes the average of the square of the error. (iv) Structural similarity (SSIM), this parameter gives the level of similarity between the segmented and input image under test; a greater value of SSIM [39] indicates a better segmentation effect; it is in the range from −1 to +1. (v) Feature similarity (FSIM), this is similar to SSIM, which indicates degradation of image quality; it ranges [−1, 1]; a high value of FSIM means better segmentation of the color image. (vi) probability Rand index (PRI) or simply Rand index (RI), this computes the connection between the ground truth and segmented image; better performance [9,42,43] is indicated by a higher PRI value. (vii) Variation of information (VOI), this gives the randomness of a segmented image; a low VOI value indicates better segmentation performance. All comparative parameters are described along with the required equations in Table 1. The segmented images with various optimization techniques are obtained from published articles and this study proves that the proposed approach provides better performance [44,45] than the techniques considered in this research work. Figures 2 and 3 illustrate the segmented results using the proposed (MTEMOE) approach to color image segmentation based on Otsu's and Kapur's methods [43,46,47]. In the end, a statistical analysis is firmly used to demonstrate the dominance of the proposed approach. The segmented images are depicted in The required expressions of comparative parameters are given in Table 1. From  Tables 2-17, the values of comparative metrics are presented for the proposed method and another existing method. In Table 17 Table 2 PSNR values are presented for SAMFO-TH, MVO, WOA, FPA, SCA, ACO, PSO, ABC, and MFO, and the proposed model using Kapur's method with threshold levels N = 4, 6, 8, and 10; the results clearly show that the PSNR values with the proposed method are much better than other techniques, especially with N= 10. In Table 9, PSNR values with Otsu's method are given and with all the images the PSNR values for the proposed method are superior to any other method considered; the average PSNR with the proposed method is 26.2278 which is higher than other techniques; after the proposed method, the SAMFO-TH method gives the best PSNR values. In Tables 3 and 10 Tables 4 and 11, the structural similarity index (SSIM) is given for Kapur's and Otsu's techniques; its value should be higher for better segmentation. The value of SSIM with the proposed method is slightly higher than the SAMFO-TH method but much higher than multilevel thresholding techniques with other optimization methods considered for comparison.
In Tables 5 and 12, the featured similarity index (SSIM) is given for Kapur's and Otsu's techniques; its value should be higher for better segmentation. The value of FSIM with the proposed technique is higher than all other techniques. The average FSIM computed for nine images with the proposed technique with Otsu's method is 0.8818; its value with SCA is only 0.8011. From Tables 6 and 13, the PRI should be a higher value for better image segmentation. The PRI values are slightly better for SAMFO-TH compared to the proposed method, whereas its values are much better than other techniques.
In Tables 15 and 16, there is a comparison of MEAN computed by SAMFO-TH, MVO, and WOA using Otsu's and Kapur's methods with N = 4, 6, 8, and 10 for red, green, and blue components separately; its values are much higher with Otsu's method than Kapur's method. After analyzing the information from Table 17 it can be concluded that the proposed method gives a much better average MEAN of fitness with both Kapur's and Otsu's methods than all other techniques considered.
In this discussion of results, the proposed approach is compared with other algorithms using the mean of fitness function (MEAN); in Table 8 [8] articles for comparison. In Table 16, a comparison of MEAN computed by SAMFO-TH, MVO, and WOA using Kapur's method with N = 4, 6, 8, and 10 for the red, green, and blue components is given. Very importantly, in Table 17, the average of MEAN values with various optimization techniques with both Otsu's and Kapur's methods are presented; the results show that the results with the proposed method are highly superior to all the techniques considered in this research, for color components red, green, and blue. From Table 17, we can conclude that the mean of MEAN value for all the images is higher with the proposed approach with both Otsu's and Kapur's methods; at the same time the performance of SCA, PSO, and MFO is not up to the mark; after the proposed approach SAMFO-TH is the best one. From this discussion, we can conclude that the proposed approach for segmentation performs with better stability.
In Table 1 PSNR values with Kapur's method are presented for all the optimization techniques which are under test and, in Table 9, PSNR values with Otsu's method are given. From the two tables mentioned above, we can deduce the conclusion that the proposed approach produces better PSNR compared to other methods; PSNR performance is much higher with Kapur's than with Otsu's method, as the level thresholding increases PSNR also increases tremendously. The mean PSNR for nine images with the proposed method is 25.2768 (from Table 2) and 24.6188 with SAMFO-TH; the lowest value is with FPA at 21.678. At the same time, the mean of PSNR with Otsu's criteria is 26.222 for the proposed method, 21.2768 with SAMFO-TH, and the lowest value is 19.5712 with FPA. PSNR values are higher for satellite images (Images 7, 8) compared to the rest of the images; for Image 3 PSNR performance is very low; from the above discussion, the proposed method can provide better PSNR compared to the other methods considered. Lower MSE implies better segmentation performance; from Tables 3 and 10, MSE with the proposed approach is much lower than with other methods for Kapur's and Otsu's techniques. The average MSE value with the proposed method is 294.4714, whereas it is 707.477 with FPA for Kapur's method.
Other most significant quality metrics for color image segmentation are SSIM and FSIM, and higher values of FSIM and SSIM indicate accurate image segmentation. In Table 4, SSIM values are presented and computed by SAMFO-TH, MVO, WOA, FPA, SCA, ACO, PSO, ABC, and MFO, and with the proposed model using Kapur's method with N = 4, 6, 8, and 10. In Table 11, a comparison of SSIM with Otsu's method is described; mean values of SSIM for the technique are given which indicate the overall SSIM performance of nine images. For instance, from Table 4, SSIM is 0.9867 with the proposed method and 0.98539 with SAMFO-TH, with only slight variation with other methods. In Tables 5 and 12, FSIMs with Kapur's and Otsu's methods are presented, respectively. From Table 5, they are 0.8923 for the proposed method, 0.7898 with SAMFO-TH, and finally, the lowest value is 0.8377 with PSO. Both the SSIM and FSIM values are enhanced along with threshold levels from 4 to 10.
The VOI and PRI are important and distinguishing comparative metrics in the field of segmentation. High-quality segmentation is referred to by higher PRI and low value of VOI. The PRI values with various techniques including the proposed one (MTEMOE) are illustrated in Tables 6 and 13 with Kapur's and Otsu's methods, respectively. From Table 6, the PRI value with the proposed method is better than WOA, FPA, SCA, and ACO, but lower than other methods with Kapur's method. With Otsu's criteria, MTEMOE performs well in terms of PRI compared to all the techniques other than SAMFO-TH and WOA, as illustrated in Table 13; finally, we point out that higher PRI values are generated with Otsu's method compared to Kapur's method. However, with higher threshold levels (N = 16, 20, and 24) the proposed method gives higher PRI values compared to all other methods considered in this study. From Tables 7 and 14, the VOIfor the proposed method gives better results than other techniques for both Kapur's and Otsu's methods; only WOA and SAMFO-TH give a minute improvement in the case of Otsu's methods; at a higher level of thresholding, the proposed method gives much lower(or better) values compared with the methods in this study including SAMFO-TH. The overall impression is that the MTEMOE is a better approach to color image segmentation than other state-of-the-art techniques and the proposed technique uses an energy curve instead of a histogram.

Conclusions
In this article, many schemes for color image segmentation are discussed. From that pool of methods, multilevel thresholding (MT) is a powerful technique, generally based on the histogram of an image. To nullify the shortfalls of the histogram, another curve that is similar to the histogram called the energy curve is used instead of the histogram to efficiently compute optimized thresholds. The proposed model for segmentation is based on Otsu's and Kapur's methods for MT on an energy curve with EMO for finding optimized threshold levels by maximizing the inter-class variances and entropy. The results for a group of color benchmark images clearly show that MT on the energy curve is more efficient than the histogram-based techniques. The energy curve can consider spatial contextual information to find energy levels at each pixel. Consequently, the same veiled information is used to compute optimized levels. The efficiency of the proposed approach is evaluated with mean of fitness (MEAN), PSNR, MSE, PRI, VOI, SSIM, and FSIM. The proposed approach (MTEMOE) is tested on nine color images using both Otsu's and Kapur's methods at different threshold levels (N = 4, 6, 8, 10, 16, 20, and 24); the proposed method is compared with other state-of-the-art methods for color image segmentation: SAMFO-TH, MVO, WOA, FPA, SCA, ACO, PSO, ABC, and MFO. From the results, we can conclude that the value of PSNR is greater with the energy curve than with methods based on the histogram; for the proposed method, the MEAN of the objective function is very high compared with a histogram-based method with optimization techniques. The higher PRI and lower VOI values mean better inter-class variance with the proposed method. Based on the values of comparative metrics such as PSNR, MSE, VOI, PRI, and the average MEAN value of fitness function and other parameters, the methods for segmentation of a color image are arranged from best to worst as the proposed method, SAMFO-TH, ACO, SCA, PSO, WOA, MFO, ABC, FPA, SCA, and MVO. Finally, we can conclude that the proposed approach gives an overall better performance for color image segmentation than the methods considered for various applications. The energy curve can be used with the latest upcoming optimization algorithms for still better results. Data Availability Statement: The data set used for experimentation in this study is taken from BSDS500 and USC-SIPI, and this data is available in the public domain.

Conflicts of Interest:
The authors declare no conflict of interest.