[mmero] [Up] [mmasf] Morphological Filters

mmcenter
Center filter.

Synopsis

function y = mmcenter ( f , b )

Input

f Image Gray-scale (uint8 or uint16) or binary image
b Structuring Element

Default: 3x3 elementary cross

Output

y Image

Description

mmcenter creates the image y by computing recursively the morphological center, relative to the structuring element b, of the image f .

Examples

f=mmreadgray('gear.tif');
g=mmcenter(f,mmsedisk(2));
mmshow(f);
mmshow(g);
f g

Equation

Center filter primitive:
Center filter:

Algorithm

function y=mmcenter_equ( f, b )
y = f;
diff = 0;
while(diff~=1)
   aux = y;
   beta1 = mmasf(y,'COC',b,1);
   beta2 = mmasf(y,'OCO',b,1);
   y = mmunion(mmintersec(y,beta1),beta2);
   diff = mmisequal(aux,y);
end; 

See also

mmfreedom Control automatic data type conversion.
mmclose Morphological closing.
mmopen Morphological opening.
mmimg2se Create a structuring element from a pair of images.
mmsebox Create a box structuring element.
mmsecross Diamond structuring element and elementary 3x3 cross.
[mmero] [Up] [mmasf]