[Image] [Up] [Interval] Data Types

Strel
Toolbox structuring element type

Synopsis

class Strel
{
public:
    Strel();
    Strel(Strel& se);
    ~Strel();
    Strel& operator=(Strel& se);
};

Description

The structuring element is normally represented by a binary or int32 matrix that by convention the position of the origin [0,0] is at the center of the matrix. The structuring elements can be flat, represented by a binary matrix or non-flat, represented by an uint32 matrix. Sometimes, the structuring element can be represented by an internal data structure so that the best way to visualize a structuring element is by calling the function mmseshow which converts the structuring element to a matrix with the above conventions.

Class Methods

The following public methods are intended for use by application programs:

Technical Notes

The class Strel is a proxy for the internal toolbox structuring element type. It takes care of chores like memory release and exception catching. When a toolbox function returns a structuring element, an object of this class is created to be returned to the caller. The object constructor catches any error ocurred in the function implementation and, in case of error, throws a morphException .

To free your code of the memory allocation statements, keep your structuring elements created in local space, so the underlying C++ system will take care of the memory releasing. Only in the case of returning to another procedure, create the structuring element in the heap with the new operator.

See the code of the demonstrations for examples of use of the Strel class.

See also

mmSeshow Display a structuring element as an image.
mmSedil Dilate one structuring element by another
mmSeunion Union of structuring elements
mmSetrans Translate a structuring element
mmSesum N-1 iterative Minkowski additions
[Image] [Up] [Interval]