[mmimg2se] [Up] [mmsecross] Structuring Elements

mmsebox
Create a box structuring element.

Synopsis

B = mmsebox( r = 1 )

Implemented in Python.

Input

r Double Non-negative integer.

Radius.

Default: 1

Description

mmsebox creates the structuring element B formed by r successive Minkowski additions of the elementary square (i.e., the 3x3 square 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 square itself.

Examples

>>> b1 = mmsebox()

              
>>> mmseshow(b1)
array([[1, 1, 1],
       [1, 1, 1],
       [1, 1, 1]],'1')
>>> b2 = mmsebox(2)

              
>>> mmseshow(b2)
        
array([[1, 1, 1, 1, 1],
       [1, 1, 1, 1, 1],
       [1, 1, 1, 1, 1],
       [1, 1, 1, 1, 1],
       [1, 1, 1, 1, 1]],'1')

Equation

Source Code

def mmsebox(r=1):
    B = mmsesum(mmbinary([[1,1,1],
                          [1,1,1],
                          [1,1,1]]),r)
    return B
    

See also

mmfreedom Control automatic data type conversion.
mmsecross Diamond structuring element and elementary 3x3 cross.
mmsedisk Create a disk or a semi-sphere structuring element.
mmseshow Display a structuring element as an image.
mmdil Dilate an image by a structuring element.
mmseline Create a line structuring element.
[mmimg2se] [Up] [mmsecross] Python