[mmvmin] [Up] [mmhmax] Connected Operators

mmvmax
Remove domes with volume less than v.

Synopsis

function y = mmvmax ( f , v , Bc )

Input

f Image Gray-scale (uint8 or uint16) image
v Double

Default: 1

Volume parameter.

Bc Structuring Element

Default: 3x3 elementary cross

Structuring element (connectivity).

Output

y Image Gray-scale (uint8 or uint16) or binary image

Description

mmvmax This operator removes connected domes with volume less than v. This function is very similar to mmhmax , but instead of using a gray scale criterion (contrast) for the dome, it uses a volume criterion.

Examples

Numerical example:
a = uint8([...
    4,  3,  6,  1,  3,  5,  2;...
    2,  9,  6,  1,  6,  7,  3;...
    8,  9,  3,  2,  4,  9,  4;...
    3,  1,  2,  1,  2,  4,  2]);
b = mmvmax(a,10,mmsebox)
b =
    4    3    6    1    3    5    2
    2    6    6    1    5    5    3
    6    6    3    2    4    5    4
    3    1    2    1    2    4    2
Signal example:
f = mmreadgray('r4x2_256.tif');
s=f(10,1:end/2);
t = mmvmax(s,20);
plot(s);
plot([s',t']);
s t
Image example:
f = mmreadgray('astablet.tif');
mmshow(f);
fb = mmvmax(f,80000);
mmshow(fb);
mmshow(mmregmax(fb));
f fb
mmregmax(fb)

See also

mmsebox Create a box structuring element.
mmsecross Diamond structuring element and elementary 3x3 cross.
mmfreedom Control automatic data type conversion.
mmhmin Remove basins with contrast less than h.
mmvmin Remove basins with volume less than v.
mmareaopen Area opening
[mmvmin] [Up] [mmhmax]