| [mmsebox] [Up] [mmsedisk] | Structuring Elements |
mmsecross creates the structuring element
B formed by
r successive Minkowski additions of the elementary cross (i.e., the 3x3 cross centered at the origin) with itself. If
r=0, B is the unitary set that contains the origin. If
r=1,
B is the elementary cross itself.
>>> b1 = mmsecross()
>>> print mmseshow(b1)
[[0 1 0] [1 1 1] [0 1 0]]
>>> b2 = mmsecross(2)
>>> print mmseshow(b2)
[[0 0 1 0 0] [0 1 1 1 0] [1 1 1 1 1] [0 1 1 1 0] [0 0 1 0 0]]
def mmsecross(r=1):
B = mmsesum(mmbinary([[0,1,0],
[1,1,1],
[0,1,0]]),r)
return B
| [mmsebox] [Up] [mmsedisk] | |
| Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center. |