StructureElement#

Routines to generate structure elements for filters.

cube(shape=(3, 3))[source]#

Cube structuring element.

disk(shape=(3, 3))[source]#

Disk structuring element.

sphere(shape=(3, 3))[source]#

Disk structuring element.

structure_element(shape=(3, 3), form='Disk', ndim=None)[source]#

Creates specific 2d and 3d structuring elements

Arguments

shapearray or tuple

shape of the structure element

formstr

structure element type

ndim: int or None

dimension of the structuring element

Returns

array

structure element

structure_element_offsets(shape)[source]#

Calculates offsets to center for a structural element given its shape.

Arguments

shapearray or tuple

Shape of the structure element

Returns

offsetsarray

Offsets to center taking care of even/odd number of elements.