| [mmcdil] [Up] [mmdil] | Dilations And Erosions |
Implemented in Python.
| 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:
|
| n | Double Non-negative integer.
(number of iterations). Default:
|
| y | Image |
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.
def mmcero(f, g, b=None, n=1):
if b is None: b = mmsecross()
y = mmunion(f,g)
for i in range(n):
aux = y
y = mmunion(mmero(y,b),g)
if mmisequal(y,aux): break
return y
| [mmcdil] [Up] [mmdil] | |
| Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center. |