[mmsetrans] [Up] [mmsedil] | Structuring Elements |
Implemented in Python.
mmsereflect reflects a structuring element by rotating it 180 degrees.
>>> b1 = mmseline(5,30)
>>> print mmseshow(b1)
[[0 0 0 0 0 0 0] [0 0 0 0 0 0 0] [0 0 0 1 0 0 0] [0 0 0 0 1 1 0] [0 0 0 0 0 0 1]]
>>> b2 = mmsereflect(b1)
>>> print mmseshow(b2)
[[1 0 0 0 0 0 0] [0 1 1 0 0 0 0] [0 0 0 1 0 0 0] [0 0 0 0 0 0 0] [0 0 0 0 0 0 0]]
def mmsereflect(Bi): Bo = mmserot(Bi, 180) return Bo
[mmsetrans] [Up] [mmsedil] | ![]() |
Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center. |