[Top] [Up] [Prev] [Next] [Up] [Basic Concepts] [Demonstrations] [Functions] SDC Morphology Toolbox V1.1 15Jan02

mmregmin - Regional Minimum (with generalized dynamics).


Synopsis
y = mmregmin( f, Bc, option )
Input
f: Gray-scale (uint8 or uint16) image.
Bc: Structuring element. (connectivity). Default: Elementary cross (mmsecross).
option: String. 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. Default: "binary".
Output
y: Gray-scale (uint8 or uint16) or binary image (logical uint8).
Description
mmregmin creates a binary image f by computing the regional minima of f, according to the connectivity defined by the structuring element Bc. 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 lower value in the input topographic surface image. The area-dyn is the minimum area a catchment basin has to raise to reach another regional minima. The volume-dyn is the minimum volume a catchment basin has to raise to reach another regional minima.

The dynamics concept was first introduced in [GR92] and it is the basic notion for the hierarchical or multiscale watershed transform.

Examples

Numerical example:

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

Image example, filtering the regional minima:

Typically, the regional minima is very numerous in a real image. To filter the regional minima, one can use the mmhbasin, mmclose, mmareaclose, or other functions that simplifies basins.

f1=mmreadgray('bloodcells.tif');
m1=mmregmin(f1,mmsebox);
mmshow(f1,m1);
f2=mmhbasin(f1,70);
mmshow(f2);
m2=mmregmin(f2,mmsebox);
mmshow(f2,m2);
image
(f1,m1)
image
(f2)
image
(f2,m2)

Multiscale watershed

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.

f=mmreadgray('cameraman.tif');
g=mmgradm(f);
mh=mmregmin(g,mmsecross,'dynamics');
ws1=mmcwatershed(g, mmthreshad(mh, uint8(20)));
ws2=mmcwatershed(g, mmthreshad(mh, uint8(40)));
mmshow(ws1);
mmshow(ws2);
image
(ws1)
image
(ws2)
Equation

equation

Algorithm
function y=mmregmin_equ( f, bc)
 fminus = mmsubm(f,1);
 g = mmsubm(mmsuprec(f,fminus,bc),fminus);
 y = mmunion(mmthreshad(g,1),mmthreshad(f,0,0)); 
See Also
mmareaclose - Area closing
mmfreedom - Control automatic data type conversion.
mmhbasin - Remove basins with contrast smaller than h.
mmregmax - Regional Maximum.
mmsebox - Create a box structuring element.
mmsecross - Cross structuring element.
mmvbasin - Remove basins with volume smaller than v.

[Top] [Up] [Prev] [Next] [Up] [Basic Concepts] [Demonstrations] [Functions] Valid XHTML 1.0!
Copyright (c) 1998-2002 by SDC Information Systems