EM-MPM Image Segmentation Algorithm

Segments a grayscale image using the EM-MPM algorithm.
2.7K Downloads
Updated 9 Sep 2013

View License

Is = emmpm(I) returns an uint8 matrix Is representing the segmented image. Each entry of Is is an integer between 1 and 'regions'. 'regions' defines in how many regions the image I will be segmented.

EMMPM defines optional arguments:

EMMPM(I, regions, steps, mpmSteps, coolMax, coolInc)

steps: Defines the number of iterations in the segmentation process (default = 5);
mpmSteps: Defines the number of repetitions of the MPM algorithm at each iteration of the segmentation process (default = 1);

The EM/MPM method is iterative that stabilizes after a number of iterations. Usually, a higher number of iterations yelds better segmentation but increases segmentation time. Use a lower values for 'steps' and 'mpmSteps' to reduce time.

coolMax: Defines the maximum cooling rate (default = 1.2);
coolInc: Defines how much the cooling rate is incremented at each iteration (default = 0.025).

coolMax and coolInc control the segmentation cooling rate. Higher cooling rates stabilize the segmentation process. In early stages of segmentation, it is desired to have a low cooling rate.

Example:

% Binary segmentation.
I = imread('coins.png');
Is = emmpm(I, 2);
imshow(Is, []); % Show the segmented image.

% 5 regions segmentation.
I = imread('peppers.png');
Is = emmpm(I, 3);
imshow(Is, []); % Show the segmented image (note that emmpm does not use color information).


Example image from radiopaedia.org

Cite As

Alceu Costa (2024). EM-MPM Image Segmentation Algorithm (https://www.mathworks.com/matlabcentral/fileexchange/43410-em-mpm-image-segmentation-algorithm), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
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!
Version Published Release Notes
1.0.0.0