| [mmregmax] [Up] [mmsuprec] | Connected Operators |
| User Feedback |
| f | Image Gray-scale (uint8 or uint16) image |
| Bc | Structuring Element
Default: (connectivity). |
| option | String
Default: Choose one of: BINARY: output a binary image; VALUE: output a grayscale image with points at the regional minimum with the pixel values of the input image; DYNAMICS: output a grayscale image with points at the regional minimum with its dynamics; AREA-DYN: int32 image with the area-dynamics; VOLUME-DYN: int32 image with the volume-dynamics. |
| y | Image Gray-scale (uint8 or uint16) or binary image |
mmregmin creates a binary image f by computing the regional minima of f, according to the connectivity defined by the structuring element Bc. A regional minimum is a flat zone not surrounded by flat zones of lower gray values. A flat zone is a maximal connected component of a gray-scale image with same pixel values. There are three output options: binary image; valued image; and generalized dynamics. The dynamics of a regional minima is the minimum height a pixel has to climb in a walk to reach another regional minima with a higher dynamics. The area-dyn is the minimum area a catchment basin has to raise to reach another regional minima with higher area-dynamics. The volume-dyn is the minimum volume a catchment basin has to raise to reach another regional minima with a higher volume dynamics.
The dynamics concept was first introduced in [GR92] and it is the basic notion for the hierarchical or multiscale watershed transform.
a = uint8([...
10, 10, 10, 10, 10, 10, 10;...
10, 9, 6, 18, 6, 5, 10;...
10, 9, 6, 18, 6, 5, 10;...
10, 9, 9, 15, 4, 9, 10;...
10, 9, 9, 15, 12, 10, 10;...
10, 10, 10, 10, 10, 10, 10]);
b = mmregmin(a)
b =
0 0 0 0 0 0 0
0 0 1 0 0 1 0
0 0 1 0 0 1 0
0 0 0 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
b = mmregmin(a,mmsecross,'value')
b =
0 0 0 0 0 0 0
0 0 6 0 0 5 0
0 0 6 0 0 5 0
0 0 0 0 4 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
b = mmregmin(a,mmsecross,'dynamics')
b =
0 0 0 0 0 0 0
0 0 4 0 0 1 0
0 0 4 0 0 1 0
0 0 0 0 14 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
Typically, the regional minima is very numerous in a real image. To filter the regional minima, one can use the mmhmin , mmclose , mmareaclose , or other functions that simplifies basins.
f1=mmreadgray('bloodcells.tif');
m1=mmregmin(f1,mmsebox);
mmshow(f1,m1);
f2=mmhmin(f1,70);
mmshow(f2);
m2=mmregmin(f2,mmsebox);
mmshow(f2,m2);
![]() |
![]() |
|
| f1,m1 | f2 |
![]() |
|
| f2,m2 |
To build a pyramid of nested segmentations, use the marker for the watershed only the minima above a given dynamic. Two levels of this pyramid are build below, one with dynamic above 20 and the other, above 40.

function y=mmregmin_equ( f, bc) fplus = mmaddm(f,1); g = mmsubm(mmsuprec(fplus,f,bc),f); y = mmunion(mmthreshad(g,1),mmthreshad(f,0,0));
| mmfreedom | Control automatic data type conversion. |
| mmregmax | Regional Maximum. |
| mmsebox | Create a box structuring element. |
| mmsecross | Diamond structuring element and elementary 3x3 cross. |
| mmhmin | Remove basins with contrast less than h. |
| mmareaclose | Area closing |
| mmvmin | Remove basins with volume less than v. |
| [mmregmax] [Up] [mmsuprec] | |
| User Feedback | |
| Copyright (c) 1998-2008 by SDC Information Systems |