MatLab function for Multiple Image Segmentation using PSO (Particle Swarm Optimization), DPSO (Darwinian PSO), FO-DPSO (Fractional-Order DPSO) and exhaustive methods based on the image histogram shape. The exhaustive method is still in development. The exhaustive method is still in development.
Iout = segmentation(I)
Iout - segmented image.
I - any type of image with multiple intensity levels(e.g., grayscale, color).
[Iout,intensity] = segmentation(I)
intensity - returns the intensity that maximizes the between-class variance. size(intensity)=[size(I,3) level].
[Iout,intensity,fitness] = segmentation(I)
fitness - returns the fitness of the between-class variance. size(fitness)=[size(I,3) 1]
[Iout,intensity,fitness,time] = segmentation(I)
time - returns the CPU computation time
[Iout,intensity] = segmentation(I,level)
level - segmentation level. Must be integer ... (Default 2). If level>2
then the segmented image Iout will be an RGB image.
[Iout,intensity] = segmentation(I,level,method)
method - choose the method to perform the multi-segmentation of the image. The pso, dpso, fodpso and exhaustive are the only ones implemented yet. Default pso).
Example: Iout = segmentation(I,4,'pso')
For a detailed description on multiple image segmentation using PSO algorithms please refer to:
Pedram Ghamisi, Micael S. Couceiro, Jón Atli Benediktsson & Nuno M.F. Ferreira. “An Efficient Method for Segmentation of Images Based on Fractional Calculus and Natural Selection”, Expert Systems with Applications, Elsevier, 2012.
Micael S. Couceiro & J. Miguel A. Luz
Last Update 16/01/2012
Micael Couceiro (2023). Segmentation (https://www.mathworks.com/matlabcentral/fileexchange/29517-segmentation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired: TRIM: Triangulating Image
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
A scientific reference describing the methodology behind the code was added in the description.
A new segmentation method based on the Fractional-Order Darwinian Particle Swarm Optimization was added.
A new segmentation method based on the Darwinian Particle Swarm Optimization was implemented
There was some bugs on RGB multi-segmentation that were fixed.