| [mmero] [Up] [mmasf] | Morphological Filters |
Implemented in Python.
| f | Image Gray-scale (uint8 or uint16) or binary image. |
| b | Structuring Element Default:
|
| y | Image |
mmcenter creates the image
y by computing recursively the morphological center, relative to the structuring element
b, of the image
f .
def mmcenter(f, b=None):
if b is None: b = mmsecross()
y = f
diff = 0
while not diff:
aux = y
beta1 = mmasf(y,'COC',b,1)
beta2 = mmasf(y,'OCO',b,1)
y = mmunion(mmintersec(y,beta1),beta2)
diff = mmisequal(aux,y)
return y
| [mmero] [Up] [mmasf] | |
| Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center. |