In mathematical morphology, a structuring element is a shape, used to probe or interact with a given image, with the purpose of drawing conclusions on how this shape fits or misses the shapes in the image. It is typically used in morphological operations, such as dilation, erosion, opening, and closing, as well as the hit-or-miss transform. According to Georges Matheron, knowledge about an object depends on the manner in which we probe it. In particular, the choice of a certain structuring element for a particular morphological operation influences the information one can obtain. There are two main characteristics that are directly related to structuring elements:
Shape. For example, the structuring element can be a "ball" or a line; convex or a ring, etc. By choosing a particular structuring element, one sets a way of differentiating some objects from others, according to their shape or spatial orientation.
Size. For example, one structuring element can be a square or a square. Setting the size of the structuring element is similar to setting the observation scale, and setting the criterion to differentiate image objects or features according to size.
Structuring elements are particular cases of binary images, usually being small and simple. In mathematical morphology, binary images are subsets of a Euclidean spaceRd or the integer gridZd, for some dimension d. Here are some examples of widely used structuring elements :
Let E=R2; B is an open disk of radius r, centered at the origin.
Let E=Z2; B is a 3x3 square, that is, B=.
Let E=Z2; B is the "cross" given by: B=.
In the discrete case, a structuring element can also be represented as a set of pixels on a grid, assuming the values 1 or 0. When used by a hit-or-miss transform, usually the structuring element is a composite of two disjoint sets, one associated to the foreground, and one associated to the background of the image to be probed. In this case, an alternative representation of the composite structuring element is as a set of pixels which are either set, not set or "don't care".