Comparison of Recent Metaheuristic Algorithms for Shape Detection in Images

Shape recognition in images represents one of the complex and hard-solving problems in computer vision due to its nonlinear, stochastic and incomplete nature. Classical image processing techniques have been normally used to solve this problem. Alter-natively, shape recognition has also been conducted through metaheuristic algorithms. They have demonstrated to have a competitive performance in terms of robustness and accuracy. However, all of these schemes use old metaheuristic algorithms as the basis to identify geometrical structures in images. Original metaheuristic approaches experiment several limitations such as premature convergence and low diversity. Through the introduction of new models and evolutionary operators, recent metaheuristic methods have addressed these difficulties providing in general better results. This paper presents a comparative analysis on the application of five recent metaheuristic schemes to the shape recognition problem such as the Grey Wolf Optimizer (GWO), WhaleOptimizerAlgorithm(WOA),CrowSearchAlgorithm(CSA),GravitationalSearchAlgorithm(GSA)andCuckooSearch (CS).Sincesuchapproacheshavebeensuccessfulinseveralnewapplications,theobjectiveistodeterminetheirefficiencywhen theyfaceacomplexproblemsuchasshapedetection.Numericalsimulations,performedonasetofexperimentscomposedofimageswithdifferentdifficultylevels,demonstratesthecapacitiesofeachapproach.


INTRODUCTION
The problem of shape detection such as lines, circles, circular arcs and ellipses appears in several fields of pattern recognition with uses in many industrial applications from automatic object recognition to car navigation [1]. Shape detection is normally conducted through the Hough Transform (HT) [1,2]. A standard Hough-based scheme uses edge information produced by an edge detector algorithm to obtain candidate geometrical shapes. In the process, each edge pixel, which coincides with a hypothetical geometrical shape, votes in the parameter space with the information that corresponds to its parameters. Then, the most probable shape is obtained by averaging, filtering and histogramming the parameter space. HT is a robust algorithm; however, it maintains some important flaws. HT requires a large amount of space to store all considered parameters of the geometrical shape. It also needs a high computational complexity, which yields a low performance in terms of speed. Another critical problem is accuracy. In HT, the precision of the obtained parameters for the detected shape is reduced, especially in noise conditions [3].
Alternatively to the HT, the problem of shape detection has also been faced through metaheuristic approaches. In general terms, they have shown better results than those that use the HT concerning accuracy, speed and robustness [4]. A detector, based on a *Corresponding author. Email: erik.cuevas@cucei.udg.mx metaheuristic scheme, utilizes a set of edge points as decision variables to determine hypothetical shapes (possible solutions). A matching function evaluates if a hypothetical shape is actually contained in the image. Therefore, conducted by the values of the matching function, the set of encoded points are operated through a particular metaheuristic approach so that the best solutions represent the original shapes inside the image. Different pioneer metaheuristic algorithms have been used to produce several interesting shape detectors such as Genetic algorithms (GAs) [5,6] and Particle Swarm Optimization (PSO) [7], Differential Evolution (DE) [8], Cloning Selection method (CSM) [9], Harmony Search (HS) [10], Artificial Bee Colony (ABC) [11] and Animal Behavior (AB) [12,13].
Recently, metaheuristic approaches have consolidated their popularity with exceptional growth and a large number of applications [14]. Such approaches represent difficult opposition to classical optimization techniques, which are prone to fail in several simple contexts. On the other hand, initial metaheuristic schemes maintain in their design several limitations such as premature convergence and inability to maintain population diversity [15]. Recent metaheuristic methods have addressed these difficulties providing in general better results [16]. Many of these novel metaheuristic approaches have also been introduced lately. In general, they propose new models and innovative evolutionary operators for producing an adequate exploration and exploitation of large search spaces considering a significant number of dimensions. This new generation of metaheuristic approaches is large, some examples include Crow Search Algorithm (CSA) [17], Cuckoo Search (CS) [18], Moth-flame Optimization Algorithm (MFOA) [19], Grey Wolf Optimizer (GWO) [20], Whale Optimization Algorithm (WOA) [21], Gravitational Search Algorithm (GSA) [22], Sine Cosine Algorithm (SCA) [23], Cricket Behavior-Based Evolutionary (CBE) [24], Dragonfly Algorithm (DF) [25], Hybrid Cognitive Optimization Algorithm (HCOA) [26], Interactive Search Algorithm (ISA) [27], Farmland Fertility Algorithm (FFA) [28], Binary Artificial Algae Algorithm (BAAA) [29], Electro-Search algorithm (ESA) [30], Island Bat Algorithm for Optimization (IBAO) [31], to name a few.
According to the literature, there is no single metaheuristic scheme that can solve every problem effectively. Metaheuristic schemes have been designed with special search models that allow them to solve competitively specific problems. Under such conditions, to evaluate the performance of a certain metaheuristic method appropriately, its relative efficiency should be assessed in the scenario in which it would be applied. Different comparisons among metaheuristic methods have been presented in several studies where it is analyzed their solutions over a representative set of benchmark functions with exact solutions and well-known behaviors. However, their conclusions are limited since they do not consider any application context. This paper presents a comparative analysis on the application of five recent and most popular metaheuristic schemes to the shape recognition problem such as the GWO, Whale Optimizer Algorithm (WOA), CSA, GSA and CS. These algorithms have been successful in several new domains. Under this condition, the objective is to determine their efficiency when they face a complex problem such as shape detection. Such approaches have been selected for our analysis, since they are considered the methods most currently in use according to the popular scientific databases, ScienceDirect (http://www.sciencedirect.com), SpringerLink (http://www.springerlink.com) and IEEE Xplore (http://ieeexplore.ieee.org), over the last five years. The problem of shape detection involves the identification of lines, circles, circular arcs and ellipses. In this work, in order to provide an interesting comparison among all the methods, the ellipse detection has been selected. It is considered the most complex recognition task with regard to lines and circular features. The comparison is divided into two parts. In the first part, the performance of all metaheuristic algorithms is evaluated with regard to the ellipse detection in natural images, while, in the second part, the robustness in the detection of each algorithm in the presence of complex scenarios is analyzed. In the study, several performance indexes have been considered to evaluate the accuracy of detection and computational overload. Additionally, test methods are achieved over the experimental data in order to validate the results.
The remainder of this paper is organized as follows: Section 2 formulates the detection problem such as an optimization task; in Section 3 the main characteristic of each compared algorithms are presented; in Section 4, a comparative perspective of the involved metaheuristic schemes is analyzed; in Section 5, the numerical results are presented. Finally, in Section 6, conclusions are given.

PROBLEM FORMULATION
To identify ellipse in images, they must be firstly preprocessed by an edge detection algorithm that produces a single-pixel-contour edge map (such as the Canny method). Next, the location ( x i , y i ) of each edge element e i is collected within an edge vector E = {e 1 , e 2 , … , e N p }; where N p correspond to the total number of detected edge pixels in the image. For the sake of clarity, Table 1 presents a description of each symbol used in this section.
In this scheme, a candidate solution C (ellipse candidate) is coded by a combination of five different edge points contained on its perimeter. Therefore, candidate ellipses are produced by randomly selecting edge points within the edge array E. Figure 1 shows an illustration from the codification process.
With this method, according to Figure 1, a candidate shape is represented as the ellipse which passes through the five points e p , e q , e r , e s and e t ( C = {e p , e q , e r , e s , e t } ) , which defines its parameter vector. An ellipse is modeled by the following scheme: Consequently, by replacing the coordinates of each parameter point e k ( k ∈ p, q, r, s, t ) from C into Eq. (1), we obtain a set of five simultaneous equations. Therefore, after determining the elementsâ ,b , c,f andĝ , and dividing by the constantĉ , the following model is produced: From this model, the main geometrical characteristics of the ellipse such as the center ( x 0 , y 0 ) , maximal radius r max , minimal radius r min and the orientation can be computed as follows: where To estimate the matching error J (C) of each candidate ellipse C, the set P of its hypothetical coordinate points are firstly determined. This set P includes all the N e pixel points {p 1 , p 2 , … , p N e } that the ellipse would contain in its perimeter if it were present in the image. Then, it is validated, if such points really exist in the edge image.
The set P is produced by using the Midpoint Ellipse Algorithm (MEA) [32] which is a plotting scheme that finds the required points {p 1 , p 2 , … , p N e } to draw an ellipse digitally. Each pixel coordinate p w = ( x w , y w ) (where w ∈ 1, … , N e ) on the perimeter of the ellipse C with parameters a, h, b, g, and f must fulfill the follow- Under this condition, the MEA method tests the position of every pixel point to Once determined the perimeter points P of C, the matching error J (C) is computed. This value can be considered as the objective function to be minimized. J (C) corresponds to the existent similarity between the perimeter points P of the ellipse candidate C and the pixels that actually are present in the edge image. Therefore, J (C) is modeled as follows: where Q ( p w ) is a function that checks the existence of the ellipse perimeter point p w in the edge vector E. This process can be formulated in this way: A value of J (C) close to zero indicates a better approximation of the ellipse C with the actual ellipse present in the image. Figure 2 presents the process to evaluate the matching error of a candidate ellipse C in a typical image example.  ) . With these values, J (C) is 0.4423.

Multiple Ellipse Detection
To detect multiple instances, the shape detector stores the best ellipse candidate in each iteration k within a memory M (k). Therefore, once the metaheuristic method has finished, an exploration of M (k) is conducted. The idea is to evaluate which solutions in M (k) corresponds to an actual ellipse in the edge map. Considering that several elements from M (k) could describe the same ellipse (i.e., ellipses with small variations), a distinctiveness factor D S 1 ,S 2 is necessary to calculate the dissimilarity between two given shapes S 1 and S 2 . D S 1 ,S 2 is modeled through the following expression: Once computed D S 1 ,S 2 , a threshold value Th is also defined to determine whether S 1 and S 2 can be considered as similar or not. Th is formulated as follows: where [r l max , r h max ] and [r l min , r h min ] corresponds to the feasible ranges for the maximal radius r max and the minimal radius r min , respectively. Under such conditions, the ellipses S 1 and S 2 represent the identical ellipse, if D S 1 ,S 2 < Th, otherwise, they are different. Therefore, each solution from M (k) is compared to each other. The idea is to find the ellipses that correspond to the same ellipse in order to select the best one in terms of the objective function J (⋅).

OPTIMIZATION TECHNIQUES
Optimization methods have been devised to find the global solution Gs of a nonlinear formulation with box constraints under the following scheme [33]: where J (⋅) represents a nonlinear objective function while X = {x ∈ ℝ|l i ≤ x i ≤ u i , i = 1, … , n} corresponds to constrained feasible search space, limited by the lower (l i ) and upper (u i ) limits.
To find the best solution for Eq. (11), from a metaheuristic viewpoint [33], a group of P (k) of N i candidate solutions (particles) are evolved from an initial generation (k = 0) to a maximum number of iterations (k = Maxgen). As an initial step, a metaheuristic approach produces a collection of N i candidate solutions whose values are selected according to a uniform distribution between the prespecified lower (l i ) and upper (u i ) bounds. In every iteration k, according to each metaheuristic algorithm, a set of evolutionary operators is used to produce a new population P (k + 1) from the original P (k). Each candidate solution p i (k) in the population P (k) represents an n-dimensional vector {p i,1 (k) , p i,2 (k) , … , p i,n (k)} whose elements correspond to the decision variables in the optimization problem. The capacity of each candidate solution p i (k) to solve successfully an optimization formulation is evaluated in terms of the objective function J ( p i (k) ) whose final value represents its quality. During the evolution process, the best candidate solution b seen so far is maintained, because it corresponds to the best solution currently available.
This section presents the main characteristics of the five metaheuristic optimization approaches used in the comparison the GWO, WOA, CSA, GSA and CS.

GWO Algorithm
The GWO [20] is a metaheuristic algorithm that models its search strategy considering the social hierarchy and hunting process conducted by wolves.

Hierarchy
To implement a mathematical model of the social hierarchy in the algorithm, the best candidate solution b is symbolized as p solution. The adjacent two best solutions represent the p and the p elements ( , , ∈ P (k)). The remainder of the elements are considered wolves ( ∈ P (k) , ≠ , , ). Therefore, during the evolution process, the search strategy is conducted by the candidate solutions p , p , and p while the rest of the ( p ) wolves follow them.

Covering the prey
In Grey wolf packs, wolves try to encircle prey during their hunting behavior. This process is modeled as follows: where k represents the current generation, A and C symbolize two fixed coefficients. p p and p represent the locations of the prey and a standard wolf agent, respectively. In Eqs. (10) and (11), the values of A and C are defined as: where a is a parameter which is decreased linearly from 2 to 0 during the optimization process. r 1 and r 2 represent two random numbers within the interval [0, 1].

Hunting
In the hunting behavior, the search strategy is conducted mainly by the Alfa agent p and occasionally by the agents p and the p . With this behavior, it is considered that these agents maintain better information about the position of the optimum solution. Under this condition, the other agents p modify their locations in terms of the positions of p , p and the p . This process can be modeled as follows: where A 1 , A 2 , A 3 , C 1 , C 2 and C 3 are fixed coefficients computed by using Eqs. (12) and (13). Once computed these elements, the position in the next iteration (k + 1) of each candidate solution p is adapted as follows:

Exploitation and exploitation
Both processes are implemented in the search strategy through the value of a in Eq. (12). Its value decreases linearly from 2 to 0 during the optimization process. As a diminishes its value, the variation interval of A also presents a reduction. Therefore, when |A| > 1 the algorithm explores the search space, while |A| < 1 the strategy concentrates their candidate solutions x around the best position.

Whale Optimizer Algorithm
The WOA [21] is an interesting metaheuristic method based on the particular spiral bubble-net hunting behavior found in humpback whales.

Encircling a prey
Under the WOA scheme, it is considered that the best candidate solution b seen so far is the objective agent p b . Therefore, the other humpback whales p G ( p G ∈ P (k) ) will be attracted by the objective solution. This process can be modeled as follows: where k represents the current generation, A and C symbolize two fixed coefficients, which are computed by using Eqs. (12) and (13). p b and p G represent the locations of the target and a standard whale agent, respectively.

Bubble-net attacking method
In this step, humpback whales use two procedures: shrinking (I) encircling and (II) spiraling. Both processes consider the modification of agent positions around the target element. In the approach, it is assumed that both procedures maintain an identical probability p r to be executed. These strategies can be defined as follows [R11]: where b is a fixed coefficient that defines the logarithmic shape of the distribution. l and p r represent two random number within the interval [0, 1].

Crow Search Algorithm
The CSA [17] is a metaheuristic approach inspired by the complex process presented in crows when they search for food resources. In CSA, each search agent p c ( p c ∈ P (k) ) emulates the position of a certain crow in the group. Associated to each search agent p c , there exists a memory m c that stores the best-obtained solution of the agent c during the optimization process.
Under the CSA scheme, the location of each p c is adjusted considering two actions: (I) Pursuit and (II) evasion.
(I) Pursuit. In this process, an agent p j follows an agent p i with the objective of finding its hidden food.
(II) Evasion. The agent p i realizes the proximity of the agent p j . As a consequence, the agent p i deliberately select a random trajectory as a strategy to protect its food. This process is emulated in CSA through the assignation of a random position.
Each agent p i selects a behavior of pursuit or evasion based on an awareness probability (AP). Under this condition, a random number r i is calculated considering a uniform distribution within the interval [0, 1]. Therefore, when r i is greater or equal than AP, the pursuit action (I) is chosen; otherwise, the evasion behavior (II) is selected. This operator can be modeled as follows: where fl c represents the flight length which corresponds to the magnitude of the adjustment from the agent p c to the best location m j of the agent p i . Once computed the new positions for each agent p c , its memory m c is also updated (c ∈ {1, … , N i }).

Gravitational Search Algorithm
The GSA [22] is a metaheuristic approach inspired by the laws of gravitation. In GSA, the first step is to calculate the total gravitational force. It represents the influence that exerts the set of the best K agents over a particular element, where K can also represent the total number of elements in the population N i . For each solution p i (k) the gravitational force F i can be obtained as follows: where i ∈ {1, … , N i }; k refers to the current iteration; r 2 corresponds to a uniform random number within [0, 1]; R i,j represents the Euclidian distance between the agents p i (k) and p j (k). M j (k) and M i (k) are computed by using the following model: where b and a represent the best and the worst elements in the current population P (k). Once calculated the values of F i , the aceleration of each agent u i (k) is computed. It is obtained by the following equation: Finally, the position of each agent is updated as follows: where r 3 corresponds to a uniform random number within [0, 1] while the initial value of v i (0) is set to 0.

CS Method
The CS [18] method is a metaheuristic algorithm for global optimization inspired by the behavior of cuckoo birds. Under the CS scheme, Levy flight random walk and biased random walk are employed as the basis for its search strategy. In a Levy flight random walk, a displacement is produced by sampling a Levy probability distribution which can be modeled as follows: where represents a distribution parameter that defines the shape of the probability distribution. It corresponds to a coefficient inside the range [1,2]. On the other hand, u and v obey a normal distribution behavior. Accordingly, they can be defined as where Γ (⋅) represents the Gamma function. Therefore, the new position of a certain agent p i (k + 1) by using the Levy flight, random walk can be characterized as follows: where symbolizes the step size while ⊕ corresponds to the pairwise multiplication. Finally, the operation of the biased random walk can be modeled with the following formulation: where r 4 and r 5 correspond to uniform random numbers within [0, 1] while p a represents the discovery probability. p m (k) and p n (k) symbolize two randomly selected agents from the population P (k).

COMPARATIVE PERSPECTIVE OF THE FIVE METAHEURISTIC METHODS
The five metaheuristic methods used in this study: GWO, WOA, CSA, GSA and CS are based on different search mechanisms. In this section, a comparative perspective of these methods is analyzed. The discussion considers the observable properties of each metaheuristic algorithms and the way in which such characteristics present an effect in the performance of these schemes.
It is widely accepted in the metaheuristic community that a proper balance between exploration and exploitation determines the potential of a metaheuristic approach [34]. Exploration refers to the process of searching for new points of the solution space. On the other hand, exploitation represents the operation of polishing those previously visited solutions to improve their relative quality by using a local search mechanism. The use of the only exploration diminishes the accuracy of the solutions but raises the ability of the algorithm to obtain new promising solutions [35]. On the contrary, the application of exclusive exploitation allows increasing the precision of existing solutions. However, unfavorably provokes that the optimization process converges prematurely to locally optimal solutions [36]. The rate between exploration and exploitation experimented by a metaheuristic method depends on the mechanism of its search strategy.
In the analysis of the five metaheuristic methods, it has been considered the study of their search strategy and implementations. The search strategy has been divided into two different parts: selection approach or attraction scheme and independence on the evolution process.
The selection approach refers to the way in which each metaheuristic method collects solutions among the entire population to produce new ones. Such selected solutions are normally used as main elements to produce attraction operators in order to modify the positions of the current population. Basically, there exist two different schemes [34]: greedy, random and complete. Greedy selection considers the use of the best element or elements in terms of fitness values. Greedy selection ensures that most fitting individuals remain intact during the evolution process. Under such conditions, this scheme promotes the exploitation of the search space, increasing the fast convergence toward promising solutions. The algorithms GWO and WOA are considered within this category. The WOA uses the best individual (only one element) as an important element in its search strategy. In the case of the GWO method, it is remarkable that its selection mechanism uses the three best elements of the population. This fact allows not only favor exploitation but also increase diversity through the use of distinct solution types. On the other hand, random selection considers the use of an individual randomly selected within the complete population. The use of random elements promotes the exploration of the search space. However, adversely, it negatively affects to obtain consistent results or good accuracy. The algorithms CSA and CS consider the use of the random solution as part of their search strategy. Finally, the complete selection considers the use of all elements in the population to produce a new solution. This strategy uses, in general, the averaged position of all solutions to generate search direction patterns. This mechanism produces very low search schemes where it is necessary for an additional number of iterations to obtain the best optimization results. The GSA method uses the complete selection mechanism as in its search paradigm.
Regarding the independence of the evolution process [37], two different processes are distinguished: dependent and independent. Dependent processes represent strategies in which the number of iterations is considered to modify the search strategy. The idea under these schemes is to adapt the search strategy so that in the beginning, the exploration of the search space would be promoted while in the ending, the exploitation of the found solutions would be favored [38]. Representative schemes of this category are the GSA and CSA. Dependent methods present several difficulties since the results of the search process are not considering in the strategy; it is more important the number of iterations. Independent algorithms do not consider the stage of the evolution process to conduct their own search strategy. These algorithms use the knowledge produced by the obtained results to operate their search strategies [39]. In general terms, independent methods deliver better results than dependent methods. The algorithms GWO, WOA and CS are considered independent methods. In terms of implementation, it is compared to the difficulty that represents the use and operation of each from the five metaheuristic methods. The algorithms are classified according to their implementation issues [R1] in low, medium and high. Such categories consider two factors: the number of configurable parameters and the extension of code necessary for its programming. The problem of parameter tuning depends on the number of configurable parameters [40]. It is important to remark that an appropriate configuration produces a correct balance between exploration and exploitation and thus, competitive results. Currently, there is no standard methodology that allows the proper setting of a metaheuristic scheme. In fact, researchers and practitioners configure the parameters of metaheuristics algorithms by hand, guided only by the process of trial and error. Under such circumstances, the GWO and WOA are the metaheuristic schemes that do not consider any parameter to calibrate. The CS and CSA use four parameters, while the GSA employs three elements. Among the five schemes presented in this study, some show a high level of simplicity so that they can be promptly translated onto computational code with relative easiness [41]. In contrast, others are relatively complex due to the behaviors and rules considered in the model. According to these levels, the extension of necessary code to implement a certain metaheuristic method can be used as a criterion to classified each scheme in simple and complex. Therefore, the GWO, WOA, CSA present a simple level of programming while CS and GSA maintain a complex programming model. According to their implementation, the algorithms considered in this analysis can be classified as follows: GWO and WOA as low, CSA as medium and CS and GSA as high. Table 2 summarizes all the comparative characteristics analyzed for each of the five algorithms.

EXPERIMENTAL RESULTS
An experimental analysis has been conducted with the objective of comparing the performance of all detectors. The experiments consider the capacity of each detector to recognize accurately ellipsoid shapes.

Performance Indexes
In the study, two performance indexes have been considered in the comparisons: the multiple error (ME) and the computational time (CT). The first index evaluates the accuracy of the detection, whereas the second one considers the computational overload.
Images do not typically include perfect ellipses. Therefore, to examine the precision in the detection of a single ellipse, it is compared with a ground-truth ellipse that is obtained visually from the original image. In consequence, the parameters x true 0 , y true 0 , r true max , r true min and true of the ground-truth ellipse are determined in terms of the bestfitted shape that a human observer is able to recognize by using a drawing program such as MSPaint, CorelDraw, and so on. Hence, if the parameters x D 0 , y D 0 , r D max , r D min and D correspond to the detected ellipse, then the Error Score (Es) is formulated as In Eq. (34), CD corresponds to the central point difference between the detected and ground-truth ellipse. RM represents the radio mismatch while AE symbolizes the angle error between both ellipses. The coefficient c 1 , c 2 and c 3 determine the relative importance of each deviation CD, RM and AE in the final error Es. In our experiments, the coefficients c 1 , c 2 and c 3 are set to 0.05, 0.1 and 0.2, respectively. Under this configuration, the angle error AE is strongly weighted with regard to CD and RM. To extend the Es) for multiple ellipse detection, the averaged Es produced by the localization of several shapes is considered as the performance index. It is called the ME which is computed as follows: where NC corresponds to the number of ellipses actually contained in the edge map. Consequently, Es q represents the Es produced by the q ellipse from the digital image. A lower ME value corresponds to better accuracy of the metaheuristic detector.
Metaheuristic approaches are, in general, complex programs with different operations and stochastic branches. Therefore, it is problematic, from a deterministic perspective, to develop a complexity analysis. As a result, the CT is considered to estimate the computational effort. Under this condition, CT expresses the CPU time spent by a metaheuristic scheme when it is under execution.

Experimental Comparison
In this subsection, the five metaheuristic schemes GWO [20], the WOA [21], the CSA [17], the GSA [22] and the CS [18] are compared in the detection of ellipses in digital images. The experiments consider even the capacity of each detector to recognize occluded or incomplete shapes such as arcs segments. In the analysis, the population size N i has been set to 50 agents for all metaheuristic approaches. In the test, all approaches have been set with the parameters, which, according to their reported references, reach their best possible performance. The code for each algorithm has been obtained from their original sources.
The experimental results are divided into two parts. In Section 5.2.1, the performance of all metaheuristic algorithms is evaluated with regard to the ellipse detection in natural images. In Section 5.2.2, the robustness in the detection of each algorithm in the presence of complex scenarios is analyzed.

Detection in natural images
In comparison, all the five metaheuristic methods have been executed considering a fixed number of 1000 iterations (k = Maxgen). This stop criterion has been established to maintain compatibility with other similar works found in the literature [7][8][9][10][11][12][13]. To minimize the random influence in the results, each experiment is tested for 30 independent executions.
In the study, a representative set of four different images collected from the literature have been used. Figure 3 shows the complete set of images. In the figure, each image is labeled as D1.X that refers to the image X from experiment one. In the study, the ground-truth solutions for all images have been visually produced from their original versions.
The visual results in the application of all methods are depicted in Figure 4. Since every metaheuristic algorithm is executed 30 times over the same image, the detection results are presented in terms of the average ME) and its standard deviation (SD) in Table 1. Considering the detection results from Figure 4, it is clear that the GWO method presents the best qualitative accuracy followed by the WOA and the GSA whereas the CSA and the CS produce the worst outcomes.
According to Table 3, in terms of the average ME) index, GWO method performs better than the other algorithms in all. The WOA maintains the second-best scores in terms of ME. The CSA and the CS produce the worst detection results. This fact emphasizes that GWO and WOA present a better balance between exploration and exploitation for this kind of problem. Their search strategies allow finding the best close solutions for multiple ellipse detection. On the other hand, the rest of the algorithms are attracted to suboptimal solutions. Considering the standard deviation SD index from Table  1, it is evident that the metaheuristic algorithm of CS maintains the best consistency; since it normally produces the smallest variations. After the CS, the GWO obtains the next best SD score. Although both methods CS and GWO present a low SD value, their meanings are very different. In the case of the CS method, its search strategy guides the detection process to only a prominent local minimum. Under such conditions, this suboptimal solution would always be  found in each execution, producing a low SD index. Different from CS, the GWO method obtains the best possible solution. However, due to its attraction mechanism, the solution moves around the best solution. This movement provokes a small displacement from the optimal detection. As a consequence, it can be established that the GWO preserves the best trade-off between accuracy (ME) and consistency (SD).
Once identified the GWO approach as the best shape detection method, a nonparametric analysis known as the Wilcoxon test [42,43] has been achieved to validate this conclusion. The Wilcoxon analysis permits to assess the performance differences between two computing methods. The experiment is conducted for the 5% (0.05) significance level considering the ME of 30 different executions.  Table 4, the figures ▲, ▼ and ▶ are assumed. ▲ represents that the GWO scheme performs statistically better than the compared method over a particular natural image. ▼ indicated that the GWO algorithm performs statistically worse than the compared approach and ▶ suggests that the Wilcoxon analysis cannot find any performance difference between both compared methods.
According to the results from Table 4, it is clear that all p-values in the GWO vs. CSA, GWO vs. GSA and GWO vs. CS columns are less than 0.05 (5% significance level) which is sufficient evidence against the null hypothesis indicating that the GWO algorithm maintains a better (▲) performance than the CSA, GSA and CS methods. The result of the Wilcoxon analysis establishes that the conclusion is statistically significant, which means that it has not happened because of the usual noise included in the experimental data. In the case of the images D1.3 and D1.4, the GWO approach presents a similar performance as the WOA scheme. This conclusion is observed from the column GWO vs. WOA, where the p-values of such images are higher than 0.05 (▶). Under these conditions, there is no statistical difference regarding the performance between both methods. As a summary, the results of the Wilcoxon test confirm that the GWO method performs better than other approaches under analysis.
The comparison of the final average ME) index cannot completely define the detection performance of a metaheuristic scheme. Under this condition, an analysis of the CT invested by every method has been conducted. The objective is to evaluate the velocity with which a compared method reaches the final detection. Table 3 presents the average CT of each algorithm considering 30 executions over the same image.
According to the results of Table 5, the CSA method obtain the best CT scores, followed by the GWO, WOA, GSA and CS. However, the CSA method produces the worst detection results in terms of the average ME). Therefore, as conclusion, the GWO presents the best balance between accuracy and computational cost.

Detection in complex scenarios
In this experiment, it is discussed the ability of each metaheuristic method to find suitable solutions in case of imperfect ellipses such as hand-drawn shapes or under noise conditions. This functionality is relevant since this problem appears typically in computer vision and image processing. In this paper, the ellipse detection problem has been conceived as an optimization task. Then, each metaheuristic method tries to find the best ellipse that matches a given shape under different conditions according to the objective function values J (⋅) for every candidate solution.
In the experiments, all metaheuristic algorithms have been executed considering a fixed number of 1000 iterations (k = Maxgen). Each experiment is tested for 30 independent executions in order to minimize the random influence in the results. In the analysis, a representative set of four different images collected from the literature have been used. Figure 5 shows the complete set of images. In the figure, each image is labeled as D2.X that refers to the image X from experiment two. In the study, the ground-truth solutions for all images have been visually produced from their original versions.
The visual results in the application of all methods are depicted in Figure 6. Since every metaheuristic algorithm is executed 30 times over the same image, the detection results are presented in terms of the average ME) and its standard deviation (SD) in Table 6. From the detection results of Figure 6, it is also evident that the GWO method obtains the best qualitative accuracy in the shape localization followed by the WOA and the GSA, while the CSA and the CS produces the worst detections.
According to Table 6, the advantage of the GWO over CSA, GSA and CS is also confirmed in terms of the ME score. However, the GWO is only slightly better than the WOA approach. Similar to the case of natural images, the CS algorithm produces solutions with the smallest level of variation (SD) followed by the GWO    As a consequence, it is possible to find the best possible ellipse detection, even in complex conditions. This effect can be verified by the ME value, which implies that the GWO method reaches the best accuracy among all metaheuristic schemes. The second factor is the use of its implementation characteristics. GWO does not include calibration parameters and its number of code lines is also relatively reduced. Under such conditions, it is possible to adapt the use of GWO to any application and produce consistent results.
The validation results of the Wilcoxon test for the detection of complex scenarios are presented in Table 7. They register the ME data produced during the 30 executions. According to Table 7, all pvalues in the comparisons GWO vs. CSA, GWO vs. GSA and GWO vs. CS columns are less than 0.05, which implies that the GWO algorithm performs better than the CSA, GSA and CS schemes. In the case of the association GWO vs. WOA, the GWO algorithm reports a better performance in image D2.4, whereas in images D2.1, D2.2 and D1.3 the WOA produces a similar performance as the GWO approach.
To extend the performance analysis of each metaheuristic algorithm, the CT invested by them over images in complex scenarios has also been conducted. Table 8 presents the average CT of each algorithm considering 30 executions over the same image. Similar to the case of the natural images, the CSA method obtain the best CT scores, followed by the GWO, WOA, GSA and CS. Under such conditions, the GWO presents the best balance between accuracy and computational cost.

CONCLUSIONS
In this paper, a comparative analysis of the application of five recent metaheuristic schemes to the shape recognition problem has been presented. In the study, the GWO, WOA, CSA, GSA and CS have been considered. These algorithms have been successful in several new domains. Under this condition, the objective is to determine  their efficiency when they face a complex problem such as shape detection.
In order to provide an interesting comparison among all the methods, the ellipse detection has been selected. It has been considered the most complex recognition task with regard to lines and circular features. The comparison is divided into two parts. In the first part, the performance of all metaheuristic algorithms is evaluated with regard to the ellipse detection in natural images, while, in the second part, the robustness in the detection of each algorithm in the presence of complex scenarios is analyzed. In the study, several performance indexes have been considered to evaluate the accuracy of the detection and computational overload.
The results demonstrated that the GWO obtained the best performance indexes in comparison with the other approaches. This conclusion has been statistically validated according to the Wilcoxon test.

CONFLICTS OF INTEREST
The authors declare that there are no conflicts of interest regarding the publication of this paper.

AUTHORS' CONTRIBUTIONS
The authors have contributed to all processes and stages of this research.

Funding Statement
This research has not been found for any institution.