[mmopentransf] [Up] [mmflood] Connected Operators

mmclohole
Close holes of binary and gray-scale images.

Synopsis

function y = mmclohole ( f , Bc )

Input

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

Default: 3x3 elementary cross

( connectivity).

Output

y Image

(same datatype of f).

Description

mmclohole creates the image y by closing the holes of the image f, according with the connectivity defined by the structuring element Bc.The images can be either binary or gray-scale.

Examples

Binary image:
a = mmreadgray('pcb1bin.tif');
b = mmclohole(a);
mmshow(a);
mmshow(b);
a b
Gray-scale image:
a = mmreadgray('boxdrill-B.tif');
b = mmclohole(a);
mmshow(a);
mmshow(b);
a b

Equation

Algorithm

function y=mmclohole_equ( f, bc)
  delta_f = mmframe(f);
  y = mmneg(mminfrec(delta_f,mmneg(f),bc)); 

See also

mmfreedom Control automatic data type conversion.
mminfrec Inf-reconstruction.
mmframe Create a frame image.
mmsecross Diamond structuring element and elementary 3x3 cross.
mmareaclose Area closing
[mmopentransf] [Up] [mmflood]