[mmcloseth] [Up] [mmopenrecth] Residues

mmgradm
Morphological gradient.

Synopsis

y = mmgradm ( f , Bdil = NullStrel, Bero = NullStrel )

Input

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

Bdil Structuring Element

for the dilation.

Default: NullStrel (3x3 elementary cross)

Bero Structuring Element

for the erosion.

Default: NullStrel (3x3 elementary cross)

Output

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

(same type of f).

Description

mmgradm creates the image y by the subtraction of the erosion of the image f by Bero of the dilation of f by Bdil.

Examples

Binary image:
Binary image, internal and external gradient:
Gray-scale
a = mmreadgray('small_bw.tif')
b = mmgradm(a)
mmshow(a)
mmshow(b)
a b
Binary image, internal and external gradient:
c=mmgradm(a,mmsecross(0),mmsecross())
d=mmgradm(a,mmsecross(),mmsecross(0))
mmshow(a,c)
mmshow(a,d)
a,c a,d
Gray-scale
a = mmreadgray('bloodcells.tif')
b = mmgradm(a)
mmshow(a)
mmshow(b)
a b

Equation

See also

mmfreedom Control automatic data type conversion.
mmdil Dilate an image by a structuring element.
mmero Erode an image by a structuring element.
[mmcloseth] [Up] [mmopenrecth]