Multilevel Thresholding Method Based on Electromagnetism for Accurate Brain MRI Segmentation to Detect White Matter, Gray Matter, and CSF

This work explains an advanced and accurate brain MRI segmentation method. MR brain image segmentation is to know the anatomical structure, to identify the abnormalities, and to detect various tissues which help in treatment planning prior to radiation therapy. This proposed technique is a Multilevel Thresholding (MT) method based on the phenomenon of Electromagnetism and it segments the image into three tissues such as White Matter (WM), Gray Matter (GM), and CSF. The approach incorporates skull stripping and filtering using anisotropic diffusion filter in the preprocessing stage. This thresholding method uses the force of attraction-repulsion between the charged particles to increase the population. It is the combination of Electromagnetism-Like optimization algorithm with the Otsu and Kapur objective functions. The results obtained by using the proposed method are compared with the ground-truth images and have given best values for the measures sensitivity, specificity, and segmentation accuracy. The results using 10 MR brain images proved that the proposed method has accurately segmented the three brain tissues compared to the existing segmentation methods such as K-means, fuzzy C-means, OTSU MT, Particle Swarm Optimization (PSO), Bacterial Foraging Algorithm (BFA), Genetic Algorithm (GA), and Fuzzy Local Gaussian Mixture Model (FLGMM).


Introduction
The present use of neuroimaging procedures allows the scientists and specialists to detect and distinguish various activities and the complications inside the human brain without using any intrusive neurosurgery. Though there are many medical imaging techniques, Magnetic Resonance Imaging is the best imaging technique due to no radiation exposure hence no side effects and it is highly accurate in detecting abnormalities in the internal structures of human organs. The structure of the brain is complex and its tissue segmentation is very crucial to visualize and quantify various brain disorders.
Noise is the main parameter that affects the medical image segmentation. Images can be denoised by using various spatial filters like the low-pass, median, adaptive filter, and so forth. But these filters blur the sharp lines or edges, may respect the edges but the resolution gets decreased by abolishing fine details, and may generate artifacts [1][2][3]. To overcome the drawbacks of spatial filters Perona and Malik proposed anisotropic diffusion filter [4,5] which has the properties of (a) sharpening the discontinuities, (b) preserving detailed structures and object boundaries so loss information is minimized, and (c) removing noise in homogeneous regions.

State-of-the-Art Review.
A wide range of algorithms has been proposed for the automatic segmentation MR images [6][7][8][9]. Image segmentation is a fundamental task in the process of image analysis. Segmentation divides the total image into small regions based on the intensity distribution of the pixels. Thresholding [10][11][12] is a simple technique for the image segmentation. It separates the object in an image from its background by using an appropriate gray-level value called 2 BioMed Research International the threshold. Choosing threshold is very difficult in brain image as the intensity distribution in it is complex. Regiongrowing [13][14][15], K-means clustering [16,17], Expectation Maximization (EM) [18,19], and fuzzy C-means (FCM) [20,21] are the widely used techniques for the medical image segmentation and are the extensions to thresholding. The main drawbacks of these methods are long computational time, sensitivity to noise and sensitivity to the initial guess, very slow convergence, and having no global solution.
Otsu and Kapur proposed two methods for thresholding [22][23][24][25]. The first approach maximizes the between-class variance and the other maximizes the entropy between the classes to find the homogeneity. These are reliable for bilevel thresholding [26]. When these algorithms proposed by Otsu and Kapur are used to segment the images of complex intensity distributions which can be effectively segmented by Multilevel Thresholding (MT), the algorithms will extensively search for multiple thresholds which is computationally tedious and the computation time depends on the complexity of the image. Many techniques were developed to reduce the computation time such as [27][28][29] that are specifically designed to accelerate the computation of objective function, [30][31][32] that involve Sequential Dichotomization, [33] that is based on an iterative process, and [34] that consists of some Metaheuristic Optimization Techniques. There are methods to solve the problem of determining threshold number in MT process. In [27,30] multiphase level set method and a new criterion for Multilevel Thresholding are specified in which the optimal threshold number is found by optimizing a cost function. Genetic Algorithm (GA) is combined with wavelet transform [35,36] to reduce the time.
Evolutionary optimized MT methods are best in terms of speed, accuracy, and robustness compared to classical MT techniques. In [37], various evolutionary approaches such as Differential Evolution (DE), Tabu Search (TS), and Simulated Annealing (SA) are discussed to solve the limitations of Otsu's and Kapur's approaches for MT. In [37,38], Genetic Algorithms (GAs) based methodologies are utilized for the segmentation of multiclasses. Particle Swarm Optimization (PSO) [39] has been considered for MT, to maximize Otsu's objective function. Other methods [26,[39][40][41][42][43] such as Artificial Bee Colony (ABC), Bacterial Foraging Algorithm (BFA), and Fuzzy Local Gaussian Mixture Model (FLGMM) were developed for the brain image segmentation.
As the proposed method performance is compared with some of the state-of-the-art methods such as -Means, FCM, Otsu MT, PSO, BFA, GA, and FLGMM these are summarized in the following section.

K-Means
Clustering. -means clustering [16,17] is an extensively used technique for the image segmentation. This is an iterative method that classifies the pixels of a given image into distinct clusters by converging to a local minimum. Hence the clusters generated are independent and compact. The algorithm comprises two phases. In the first phase, centers are selected randomly, by choosing the value of in advance. The other phase is to bring every pixel to the closest center. Euclidean distance is the generally used metric to measure the distance between each pixel and the centers of clusters. Early grouping is being done when all the pixels are included in different clusters. Now new centroids are refigured for every cluster. In the wake of having these new centroids, another binding must be done between the same group of pixels and the closest new center. This is an iterative process during which the location of centers will change repeatedly until no more changes are done or, in another way, this iterative procedure continues until the criterion function converges to the minimum.
-means is fast, robust, relatively efficient, and easier to understand, and it gives excellent result when data is well separated. The main drawbacks of the -means are as follows: it requires prior specification of the cluster center number, it is unable to divide highly overlapping data, the same data with different representations gives different results, it is sensitive to noise, and the algorithm does not work for the nonlinear type of data.

Fuzzy C-Means
Clustering. The fuzzy -means algorithm [20,21] is widely preferred for the medical image segmentation due to its flexibility of allowing pixels to have a place in multiple classes with different degrees of membership and, compared to other clustering methods, it retains more pixel information in the given image. FCM method partitions the pixels of a given image into " " fuzzy clusters regarding some criteria. Different similarity measures such as connectivity, distance, and intensity are used to separate the pixels. In this work, brain images are segmented into three clusters specifically White Matter, Gray Matter, and CSF based on the feature values.
The algorithm is based on the minimization of the objective function: is the membership value and it is in the range [0, 1], is the centroid of the th cluster, is the Euclidian Distance between th cluster centroid and th data point, and is a weighting exponent in the range [1, ∞].
Fuzzy clustering of the data samples is carried out through an iterative optimization of the above objective function by updating the membership value and the cluster centers by The major operational drawbacks of FCM are as follows: it is time-consuming and hence it achieve the stabilization condition after a long time, and it does not consider any local or spatial information of the image, and hence it is easily affected by noise and other imaging artifacts.

Otsu
Thresholding. Bilevel thresholding can be used to segment the simple images whose object has clear boundaries. But, for the segmentation of complicated images, Multilevel Thresholding (MT) is required. Otsu bilevel thresholding is a well-known nonparametric technique for the segmentation of medical images and it deals with discriminate analysis [22][23][24]. The value of gray-level at which between-class variance is maximum or within-class variance is minimum is selected as the threshold. This bilevel thresholding divides the pixels of a given image into two separate classes 0 and 1 , and it belongs to objects and background at the gray-level th; that is, 0 = {0, 1, 2, . . . , th} and 1 = {th+1, th+2, . . . , −1}. Let 2 , 2 , and 2 be the within-class variance, between-class variance, and the total variance, respectively. By minimizing one of the below criterion functions with respect to th an optimal value for the threshold can be found. The criterion functions are and here is the number of pixels with th gray-level, is the total number of pixels in the given image, and = ∑ −1

=0
. is the probability of occurrence of th gray-level. 0 , 1 are the areas occupied by the two classes 0 and 1 , respectively, and 0 , 1 are the mean values of the classes 0 and 1 , respectively.
Among the criterion functions, is minimum. Hence, the optimal threshold th = arg min . The maximum estimate of , designated as * , is used to evaluate the amount of separability of classes 0 and 1 . It is very significant as it does not vary under affine transformations of the gray-level scale.
Otsu bilevel thresholding can be extended to MT and is direct by virtue of the discriminant criterion. For instance, on account of three-level thresholding, two thresholds are defined as 1 ≤ th 1 < th 2 < for separating three classes, 0 for {0, 1, 2, . . . , th 1 }, 1 for {th 1 + 1, th 1 + 2, th 2 }, and 2 for {th 2 + 1, th 2 + 2, . . . , }. The between-class variance 2 is a function of th 1 and th 2 , and the optimal thresholds th * 1 and th * 2 can be found by maximizing the function 2 , where 2 (th * 1 , th * 2 ) = max 1≤th 1 < ℎ 2 < 2 (th 1 , th 2 ). The main drawback of the Otsu is the following: as the number of segments to be divided increases, the selected thresholds become less accurate. This is simple and effective for two-level and three-level thresholding, which can be applied to almost all applications. [39] is a population-based stochastic optimization process. The method searches for a solution by altering the directions of individual vectors, termed as "particles." The initial location of the particles is chosen randomly from the search area Ω. For every iteration, a velocity is assigned to every particle in Ω and it gets updated by the best value that the particle has visited. Then, using the updated velocity in iteration the position of every particle is updated. The performance of the particle is assessed by its fitness function value. At every iteration, the values of the best positions visited by the particle and their companions are saved as personal and population observations by which every particle will converge to the optimal solution. Thus, PSO has quick convergence compared to the other population-based methods such as DE or GA.

Particle Swarm Optimization (PSO). PSO
In the -dimensional search space, the position vector of the th particle is defined as = ( 1 , 2 , . . . , ) and its velocity vector as = (V 1 , V 2 , . . . , V ). According to a predefined fitness function, if = ( 1 , 2 , . . . , ) and = ( 1 , 2 , . . . , ) are assumed as the best position of each particle and the fittest particle for an iteration , respectively, then, the new position and velocities of the particles for the next fitness function are calculated as where 1 and 2 are positive constants and rand 1 and rand 2 are two random functions uniformly distributed in the interval (0, 1). The variable representing the inertia weight causes the convergence of the algorithm. The PSO algorithm can be surely converged if each particle must converge to its local attractor According to (4), all the particles are greatly influenced by and . If the best particle reaches a local optimum, then all the remaining particles will fast converge to the location of the final best particle. Hence, in the PSO global optimum of the fitness function is not guaranteed which is called premature.
A globally optimal solution is considered as a feasible solution whose objective value is better than other feasible solutions. For locally optimal solution no better feasible solutions can be found in the immediate neighborhood of the given solution. Subsequently, if the algorithm loses the diversity at early iterations it may get trapped into local optima, and it implies that the population turns out to be exceptionally uniform too soon. Despite the fact that PSO finds good solutions faster than other evolutionary algorithms it generally can not enhance the quality of the solution as the number of iterations is improved. The solution of the global best is improved when the swarm is iterated. It could happen that all particles being influenced by the global best eventually approach the global best and from there on the fitness never improves despite however many runs the PSO is iterated thereafter. The particles also move in the search space in close proximity to the global best and not exploring the rest of the search space. This is called premature convergence.
1.6. Bacterial Foraging Algorithm (BFA). BFA optimization strategies are methods for locating, handling, and ingesting food. Natural selection eliminates the animals with poor foraging methodologies. This encourages the propagation of qualities of the best foraging methods. After so many generations, the poor foraging strategies are either wiped out or upgraded into better ones. A foraging animal tries to maximize the energy intake per unit time spent on foraging within its environmental and physiological constraints. The E. coli bacteria, present in human intestine, follow foraging behavior, which consists of processes of chemotaxis, swarming, reproduction, and elimination or dispersal. In [42,44] this evolutionary technique was modeled as an effective optimization tool.
Chemotaxis. The bacterial movement of swimming and tumbling in presence of attractant and repellent chemicals from other bacteria is called chemotaxis. A chemotactic step is a tumble followed by a tumble or run. After defining a unit length random direction the chemotaxis can be modeled as where ( , , ) is the th bacterium at th chemotactic, th reproductive, and th elimination or dispersal event. ( ) is the step size in the direction of movement specified by tumble called the run length unit.
Swarming. Bacterium which reaches a good food source produces chemical attractant to invite other bacteria to swarm together. While swarming, they maintain a minimum distance between any two bacteria by secreting chemical repellent. Swarming is represented mathematically as and here ( , ( , , )) is the value of the cost function to be added to the optimized actual cost function to simulate the swarming behavior, is the total number of bacteria, is the number of parameters to be optimized, and attract , attract , repellant , and ℎ repellant are the coefficients to be chosen properly.
Reproduction. After completion of chemotactic steps, a reproductive step follows. Health of th bacterium is determined as Then, in the descending order of their health, the bacteria are sorted. The least healthy bacteria die and the other healthier bacteria take part in reproduction. In reproduction, each healthy bacterium splits into two bacteria each containing identical parameters as that of the parent keeping the population of the bacteria constant.
Elimination and Dispersal. The bacterial population in a habitat may change gradually due to the constraint of food or, suddenly, due to environmental or any other factor. Every bacterium in a region might be killed or some might be scattered into a new location. It may have the possibility of annihilating chemotactic progress, but it also has the ability to help chemotaxis, since dispersal event may put the bacteria to near-good food sources.

Genetic Algorithm (GA).
GAs [45,46] are effective, flexible, and powerful optimization procedures governed by the standards of evolution and natural genetics. GAs have implied parallelism. This algorithm begins with the chromosomal modeling of a set of parameters that will be coded as a limited size string over letters in order of limited length. An arrangement of the chromosomes in a generation is known as population, the measure of which might be consistent or may change starting with one generation and then onto another.
In the initially defined population, the chromosomes are either produced randomly or utilizing domain-specific data information. The fitness function is designed, such that the strings or possible solutions that have high fitness values are characterized as best points in the feasible search region. This is known as the payoff information that is used by the GAs to search for probable solutions. During reproduction individual strings are replicated into a temporary new population called the mating pool, to convey genetic operations. The sum of copies received by an individual corresponds to the fitness value and these are used for the next generation. In general, the chromosome which is retained in the population till the final generation is treated as the best chromosome. Exchange of data between arbitrarily chosen parent chromosomes by combining details of their genetic information is treated as crossover. The efficiency of GAs mainly depends on the coding-crossover strategy. Chromosome's genetic structure can be altered by the process of mutation which is used to bring the genetic diversity into the population. There are many difficulties and issues in using GAs for image segmentation. The strategy of encoding should be confirmed to the Building Block Hypothesis; otherwise GA gives the poor result. The performance of GAs depends on the design of fitness function in such a way to reduce the computation time, choice of various genetic operators, termination criteria, and methods of keeping off premature convergence.

Fuzzy Local Gaussian Mixture Model (FLGMM).
In the case of ordinary GMM, it has been assumed that intensities of a region are sampled individually from an identical Gaussian distribution function. This stochastic assumption is not suitable for MR brain images because of the presence of bias field. However, in the recently proposed FLGMM [43] algorithm for MR brain image segmentation, the bias field is expressed as a slowly varying quantity and it can be overlooked inside a small window. The objective function of FLGMM is obtained by integrating the Gaussian Mixture Model (GMM) weighted energy function over the image. The function consists of a truncated Gaussian kernel to establish the spatial constraints and fuzzy memberships to balance the contribution of GMM for segmentation.
In the process of FLGMM, based on the fuzzy C-means model of the images with intensity inhomogeneity the local intensity clustering property or the image partitions are derived from the input image. A local objective function is formulated for the given image. Minimization of the energy function is performed by defining individual membership functions locally for each cluster by assuming that it satisfies the Gaussian Mixture Model. A bias-field equivalent to the intensity inhomogeneity is generated. Thus energy minimization generates a homogenous image which is termed as the intensity inhomogeneity corrected image.
The remaining part of the paper is methodized as follows. Section 2 describes the materials and methods utilized in this work. Section 3 consists of experimental results and discussion. Section 4 is the brief concluding section.

Materials and Methods
The present section describes the materials and methods used in this work. The overall algorithm is presented like a flow diagram in Figure 1. The stages involved in the implementation of the algorithm are explained in the subsections. The proposed method is implemented in MATLAB.

Brain MR Images.
The MR images used in this method are downloaded from the BrainWeb [47] database. These are the T1-weighted brain images of 10 different subjects.

Preprocessing.
In the preprocessing stage, two issues are considered. First is the skull stripping and second is improving SNR by using anisotropic diffusion filter.

Skull Stripping.
Skull stripping is an essential phenomenon to study the neuroimaging data. Numerous applications, like cortical surface reconstruction, presurgical planning, and brain morphometry, depend on accurate segmentation of brain region from nonbrain tissues such as skin, skull, and eyeballs. The algorithm for skull stripping is presented in Figure 2. This is based on brain anatomy and image intensity. It combines the estimation of adaptive threshold and morphological operations, to give better results. This is an automatic method which does not need any user interaction to choose any parameters for the brain matter extraction. Some of the existing techniques for skull stripping such as AFNI, FSL, and SPM require some parameter adjustments to get better results for various brain image data sets. Jaccard Similarity Coefficient (JSC) is used to compare the performance of the proposed skull stripping method with the above-mentioned methods. JSC measures the similarity between the skull stripped image and the ground-truth image and is defined as the size of the overlapping area of the two images divided by the size of the union of the two images.
The values of JSC are tabulated in Table 1. Exploratory outcomes guarantee that the proposed skull stripping process is appropriate for both synthetic and real images, though the real images are of low contrast. It works very well even for the brain images where the previously mentioned techniques fail.

Filtering.
In this proposed work noise presented in the MR images is decreased by using anisotropic diffusion filter designed by Perona and Malik [5]. This algorithm decreases the noise in the image by revising it through PDE. It smoothens the textures in an image by the law of diffusion on the intensities of pixels. Diffusion across edges is prevented by a threshold function; therefore it respects the edges presented in the image.

Segmentation.
MR images of the brain can be segmented by using MT. The existing MT techniques are computationally extravagant as they intensely inquire the best values for the optimization of an objective function. This work uses an advanced MT technique named as Electromagnetism-Optimization (EMO) algorithm [48]. This is formulated using the phenomenon of the force of "attraction-repulsion" between charges to make the associates of the population.  Use the morphological operation to get the maximum perimeter as the brain region Mask the gray image with the above mask to get skull stripped image where there is exchange of information between the members of population, in EMO each particle is affected by others within the population like in heuristics approaches such as Particle Swarm Optimization (PSO) and Ant Colony Optimization (ACO). Though it has few characteristics similar to other evolutionary optimized approaches [49], it exhibits a better accuracy with respect to its optimal parameters, optimal convergence [50], and decreased computation time compared to other methods for brain image segmentation. This has been utilized in communications, optimization in circuits, control systems, training of neural networks, and image processing.

Electromagnetism-Optimization Algorithm (EMO).
This method is designed to propose a global solution for a nonlinear optimization problem defined in the following form: where : R is a nonlinear function and = { ∈ R | ≤ ≤ , = 1, . . . , } represents bounded feasible search space limited by the lower limit and the upper limit . The algorithm uses N, n-dimensional points , , to represent the population for analyzing the set , and k is the iteration number. The original population being = 1 is = { 1, , 2, , . . . , , }, are uniformly distributed samples taken from . As the members of population are changed according to k the set of the population at the th iteration is denoted by . After defining , the algorithm extends the process iteratively until a terminating condition is reached. During the first step of iteration every point in shifts to another location using the mechanism of attractionrepulsion [51], and, in the next step, these already displaced points are further displaced locally with a local search and become the members of the set +1 in the ( +1)th iteration. It is the responsibility of Electromagnetism and the local search to drive the members of population , of the set to the proximity of the global optimization.
Analogous to the theory of Electromagnetism between charges, every point , ∈ in the region is treated like a charged particle and the charge associated with it is assumed as the value of objective function. Particles with the larger value of the objective function have associated with more charge than the particles with poor objective function. In the process of EMO the points with more charge exhibit force of attraction on the other points in , and the points with less charge will exhibit repulsion. Finally, the force vector , exerted on th point , , is computed by adding the forces on all charged points and each point , ∈ is moved along the total force direction to the destination position , . A simple local search is made to examine the proximity of each , by , to , . The members, of the ( + 1)th iteration, that is, , +1 ∈ +1 , can be found using The following stepwise algorithm shows the process of EMO.
Step 1. Get the input parameters max , local , , and where max is the maximal number of iterations. × local are the maximum number of locations , , inside within a distance from , for each dimension.
Step 2. For = 1, the points , are selected uniformly in , that is, ,1 as uni( ), where uni is the uniform distribution function. The values of the objective function ( , ) are calculated and the best point which produces the maximum value of ( , ) in the space is identified as Step 3. Each point , is assigned with a charge , . The charge , depends on the objective function ( , ). Points with the large value of the objective function have more amount of charge than the points with the poor value of objective function. The charge is calculated as follows: The force , between two points , and , is calculated using The total force corresponding to , is Step 4. Except for , each point , is moved along the total force using , = , + (Range) , = 1, 2, . . . , , ̸ = ,  where = unif(0, 1) for each coordinate of , . Range represents the allowed lower or upper bound.
Step 5. In the neighborhood of , , a maximum of local points are generated. Generation of local points is continued until either a better , is found or the × local number of iterations is reached.
The EMO algorithm has the analysis for its complete convergence [52]. This algorithm shows the existence of at least one sample of the population which is moving very close to the optimal solution in a single iteration. Hence EMO method can solve the complicated optimization problems in a minimum number of iterations. This is proved in several studies of EMO [53][54][55] where its less computational cost and its minimum iteration number were compared with other evolutionary algorithms for various engineering related issues.

Formation of
. Considering the intensity values of a gray scale image, the probability distribution of the intensity levels can be calculated as where is a particular intensity level between 0 and − 1, is the component of the image, and NP represents the total number of pixels in the image. The histogram ℎ is defined as the number of pixels having the th intensity level in component. The histogram is normalized to get the probability distribution ℎ . In the case of bilevel thresholding the two classes 1 and 2 are defined as , . . . , ℎ th , . . . , ℎ and here 0 ( ℎ) and 1 ( ℎ) are the probabilities distributions for the classes 1 and 2 : The mean values 0 and 1 of the classes and the betweenclass variance 2 can be written as where 1 and 2 are the variances of 1 and 2 : and here = 0 0 + 1 1 and 0 + 1 = 1. Based on the values of 1 and 2 the objective function is defined as follows: where 2 (th) is Otsu's variance for a given th value. Hence the optimization problem becomes to find a value of th that can maximize the above objective function. This bilevel method can be extended for the identification of multiple thresholds. Considering thresholds it is possible to separate the original image into classes as above. Then BioMed Research International 9 the objective function otsu (th) for multiple thresholds can be written as follows: otsu (TH) = max ( 2 (TH)) , 0 ≤ th ≤ − 1, = 1, 2, 3, . . . , , (24) where TH = [th 1 , th 2 , th 3 , . . . , th −1 ] is a vector containing multiple thresholds and the variances are computed as (25) and here represents the specific class and and represent the probability of occurrence and the mean of a class, respectively. For Multilevel Thresholding, these values are obtained as (26) and for the mean values

Segmentation
Using the Proposed Method. The designed segmentation algorithm can be coupled with two distinct objective functions proposed by Otsu and Kapur developing two different image segmentation algorithms. Kapur's convergence is unstable for certain range of thresholds, but Otsu's is the most stable. Hence, in this work, the EMO algorithm is combined with Otsu thresholding. In the proposed approach, image segmentation is described as an optimization problem that is stated as subject to th ∈ otsu (th) is the objective function defined above. The term th = [th 1 , th 2 , . . . , ] represents various thresholds. represents a bounded workable region in the interval [0 255] which corresponds to image intensity levels. In the optimization algorithm, every particle uses elements, as decision variables. These variables represent various thresholds used for the segmentation. Therefore, the total population is characterized as = [TH 1 , TH 2 , . . . , TH ] , where is the number of iterations, is the transpose operator, and is the population size. The parameter is set to 1 for gray scale images.

Implementation of EMO Algorithm.
We evaluated each method's sensitivity to the number of bins in the histogram and found that The stepwise implementation of the algorithms is as follows.
Step 1. Read the input gray scale image and name it as and set = 1.
Step 2. Obtain the histogram ℎ of the image.
Step 3. Calculate the probability distribution functions.
Step 5. Initialize the population having random particles and dimensions.
Step 6. Find the values of and . Compute the required to find the objective function Otsu .
Step 7. Calculate the amount of charge associated with each particle and also total force vector.
Step 8. Move the total population along the force vector.
Step 9. Local search is made in the moved population and best elements are selected based on the values of their objective functions.
Step 10. The iteration number is incremented in 1; if ≥ max the algorithm stops the iteration and jumps to Step 11; otherwise it jumps to Step 7.
Step 11. Using Otsu choose the particle that has the best objective function value.
Step 12. Use the thresholds values contained in to the entire image for segmentation.

Evaluation.
The objective or automatic evaluation of segmentation is very easy and it involves verifying the segmented pixels against a known pixel-wise ground truth. There are mainly three performance parameters for any segmentation process such as sensitivity, specificity, and segmentation accuracy.
Sensitivity. It indicates true positivity and it is the probability that a detected or segmented pixel belongs to the particular tissue.
Specificity. It indicates true negativity and it is the probability that a detected or segmented pixel does not belong to particular tissue but it belongs to the background. Segmentation Accuracy. It indicates the degree to which segmentation algorithm results match with reference or ground truths.
Here TP indicates "True Positive" which is the number of pixels exactly detected as particular tissue pixels. TN indicates "True Negative" which is the number of pixels exactly detected as not particular tissue pixels. FP indicates "False Positive" which is the number of pixels wrongly detected as particular tissue pixels. FN indicates "False Negative" which is the number of pixels wrongly detected as not particular tissue pixels.

Experimental Results and Discussion
This section presents the experimental results of the proposed algorithm in detecting various brain tissues and the comparison with other methods. The algorithm is implemented using MATLAB. The MR images of the brain are downloaded from the BrainWeb database. Around 20 different MR images are used for testing the proposed algorithm, but the results of 10 images are presented in the paper. The recommended segmentation process is evaluated using the measures sensitivity, specificity, and segmentation accuracy.
Figures 3-5 depict the visual results of three types of tissue detection from 10 different MR images of the brain for the proposed and the other methods such as -means [16,17], fuzzy -means [20,21], Otsu MT [22][23][24], Particle Swarm Optimization (PSO) [39], Bacterial Foraging Algorithm (BFA) [42,44], Genetic Algorithm (GA) [45,46], and FLGMM [43]. These results show that the proposed method is excellent compared to the others. The method is giving best results even for the images of complex intensity distributions. Results of all the 10 different persons' brain images demonstrate the successful detection of all the tissue types. Positions and sizes of all the tissues are detected correctly and all the segmentation performance measures are quite high for the proposed method. In future work, to increase the performance of segmentation additional features such as prior knowledge, shape, and models can be used during the segmentation. Tables 2-4 consist of the performance parameters of the proposed segmentation algorithm and the other existing methods in detecting White Matter (WM), Gray Matter (GM), and Cerebral Spinal Fluid (CSF), respectively. It came to be known from the tables that the performance of the

Conclusions
This paper proposed an excellent and innovative Multilevel Thresholding method to segment different tissues like White Matter (WM), Gray Matter (GM), and CSF from MRIs of the brain. Segmentation of WM and GM and CSF segmentation of brain image are vital in identifying disorders and treatment planning in the field of medicine. This method outperforms well in segmenting all tissues. This method uses the histogram and morphological operations for the skull stripping. Anisotropic diffusion filtering is used in preprocessing to eliminate the noise and also to smoothen the image. An Electromagnetism-Like algorithm which depends on the phenomenon of "attraction-repulsion" between the charges is used for the segmentation. This approach is a combination of effective search potentials of "attraction-repulsion" algorithm with the objective function of popular Otsu MT method. Different to other algorithms, EMO exhibits interesting search capabilities whereas it maintains a low computational overhead. The constraints of EMO are as follows: if the value of objective function reaches a very high value, the fraction value in the equation of charge (see (8)) becomes very small and creates an overflow problem to find the charge. This can be refrained by assuming a high floating point value for the points having a very high value of objective function. Overflow problem can also occur if the separation between the two points is much nearer to zero and it can be avoided by maintaining a minimum separation between the points based on the word length of the processor. When the force acting on the charged particles discards some parts of the feasible search space, premature convergence may occur which leads to the wrong result. This can be avoided by perturbing the present population so that no less than one point among all the points will have an opportunity to move to the discarded parts of the region. This point will be considered as the best point called "perturbed point" and the force is calculated by taking this perturbed point into account.
With regard to evaluating the performance of the proposed approach, the metrics like sensitivity, specificity, and segmentation accuracy are used, taking into account the similarity between the segmented image and the ground truth. The proposed approach is carried out on 10 different MRI images of the brain which are downloaded from the BrainWeb database.
The recommended approach has been compared with other segmentation algorithms such as Otsu MT [22][23][24],means [16,17], fuzzy -means [20,21], Particle Swarm Optimization (PSO) [39], Bacterial Foraging Algorithm (BFA) [42], Genetic Algorithm (GA) [36], and Fuzzy Local Gaussian Mixture Model [43]. The experimental results proved the outstanding performance of the proposed algorithm compared to the other existing methods. The performance of the proposed approach in detecting various tissues can be increased by designing an effective objective function. This soft tissues detection of the brain MR image is very important for surgical planning and to find and diagnose neurological diseases.