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

mmhbasin - Remove basins with contrast smaller than h.


Synopsis
y = mmhbasin( f, h, Bc )
Input
f: Gray-scale (uint8 or uint16) image.
h: Contrast parameter. Default: 1.
Bc: Structuring element. Structuring element (connectivity). Default: Elementary cross (mmsecross).
Output
y: Gray-scale (uint8 or uint16) or binary image (logical uint8).
Description
mmhbasin sup-reconstructs the gray-scale image f from the marker created by the addition of the positive integer value h to f, using the connectivity Bc. This operator removes connected basins with contrast smaller than h. This function is very userful for simplifying the basins of the image.
Examples

Numerical example:

a = uint8([...
    10    3    6   18   16   15   10;...
    10    9    6   18    6    5   10;...
    10    9    9   15    4    9   10;...
    10   10   10   10   10   10   10]);
b = mmhbasin(a,1,mmsebox)

b =
    10     4     6    18    16    15    10
    10     9     6    18     6     5    10
    10     9     9    15     5     9    10
    10    10    10    10    10    10    10

Signal example:

f = mmreadgray('r4x2_256.tif');
s=f(10,1:end/2);
t = mmhbasin(s,20);
plot(s);
plot([s',t']);
image
(s)
image
(t)

Image example:

f = mmreadgray('r4x2_256.tif');
mmshow(f);
fb = mmhbasin(f,70);
mmshow(fb);
mmshow(mmregmin(fb));
image
(f)
image
(fb)
image
(mmregmin(fb))
Equation

equation

Algorithm
function y=mmhbasin_equ( f, h, bc)
 g = mmaddm(f,h);
 y = mmsuprec(g,f,bc); 
See Also
mmareaclose - Area closing
mmfreedom - Control automatic data type conversion.
mmhdome - Remove peaks with contrast smaller than h.
mmsebox - Create a box structuring element.
mmsecross - Cross structuring element.
mmvdome - Remove domes 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