File Exchange

image thumbnail

A multilevel thresholding algorithm using Electromagnetism Optimization

version (442 KB) by Diego Oliva
An implementation of Electromagnetism Optimization for multilevel image thresholding


Updated 26 Jun 2014

View Version History

View License

Segmentation is one of the most important tasks in image processing. It consist in classify the pixels into two or more groups depending on their intensity levels and a threshold value. The quality of the segmentation depends on the method applied to select the threshold. The use of the classical implementations for multilevel thresholding is computationally expensive since they exhaustively search the best values to optimize the objective function. Under such conditions, the use of optimization evolutionary approaches has been extended. The Electromagnetism Like algorithm (EMO) is an evolutionary method which mimics the attraction repulsion mechanism among charges to evolve the members of a population. Different to other algorithms, EMO exhibits interesting search capabilities whereas maintains a low computational overhead. In this paper, a multilevel thresholding (MT) algorithm based on the EMO is introduced. The approach combines the good search capabilities of EMO algorithm with objective functions proposed by the popular MT methods of Otsu and Kapur. The algorithm takes random samples from a feasible search space inside the image histogram. Such samples build each particle in the EMO context whereas its quality is evaluated considering the objective that is function employed by the Otsu or Kapur method. Guided by these objective values the set of candidate solutions are evolved through the EMO operators until an optimal solution is found. The approach generates a multilevel segmentation algorithm which can effectively identify the threshold values of a digital image in a reduced number of iterations. Experimental results show performance evidence of the implementation of EMO for digital image segmentation.
****The main file for OTSU is MTHEMO.m and for KAPUR is EMO.m ****
The proposed algorithm was published in:
Diego Oliva, Erik Cuevas, Gonzalo Pajares, Daniel Zaldivar, Valentín Osuna.
A Multilevel Thresholding algorithm using electromagnetism optimization, Neurocomputing, 139, (2014), 357-381.

Download link:

Cite As

Diego Oliva (2021). A multilevel thresholding algorithm using Electromagnetism Optimization (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

How to implement Multilevel thresholding otsu and kapur method in equilibrium optimiser in matlab



Very good

It works well for me

Thank you

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!