[mmcdil] [Up] [mmdil] Dilations And Erosions

mmcero
Erode an image conditionally.

Synopsis

function y = mmcero ( f , g , b , n )

Input

f Image Gray-scale (uint8 or uint16) or binary image
g Image Gray-scale (uint8 or uint16) or binary image

Conditioning image.

b Structuring Element

Default: 3x3 elementary cross

n Double Non-negative integer.

Default: 1

(number of iterations).

Output

y Image

Description

mmcero creates the image y by eroding the image f by the structuring element b conditionally to g. This operator may be applied recursively n times.

Examples

f = mmneg(mmtext('hello'));
mmshow(f);
g = mmdil(f,mmseline(7,90)) ;
mmshow(g);
a1=mmcero(g,f,mmsebox) ;
mmshow(a1);
a13=mmcero(a1,f,mmsebox,13);
mmshow(a13) ; 
f g a1 a13

Equation

Algorithm

function y=mmcero_equ(f,g,b,n)
  y = mmunion(f,g);
  for i=1:n
    ero = mmero(y,b);
    y = mmunion(ero,g);
  end

See also

mmero Erode an image by a structuring element.
mmfreedom Control automatic data type conversion.
mmimg2se Create a structuring element from a pair of images.
mmsebox Create a box structuring element.
mmsecross Diamond structuring element and elementary 3x3 cross.
mmsuprec Sup-reconstruction.
[mmcdil] [Up] [mmdil]