Hit-or-miss transform
Encyclopedia
In mathematical morphology
Mathematical morphology
Mathematical morphology is a theory and technique for the analysis and processing of geometrical structures, based on set theory, lattice theory, topology, and random functions...

, hit-or-miss transform is an operation that detects a given configuration (or pattern) in a binary image
Binary image
A binary image is a digital image that has only two possible values for each pixel. Typically the two colors used for a binary image are black and white though any two colors can be used. The color used for the object in the image is the foreground color while the rest of the image is the...

, using the morphological erosion
Erosion (morphology)
For use of "Erosion" in dermatopathology, see Erosion Erosion is one of two fundamental operations in Morphological image processing from which all other morphological operations are based...

 operator and a pair of disjoint structuring element
Structuring element
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...

s. The result of the hit-or-miss transform is the set of positions, where the first structuring element fits in the foreground of the input image, and the second structuring element misses it completely.

Mathematical definition

In binary morphology, an image is viewed as a subset
Subset
In mathematics, especially in set theory, a set A is a subset of a set B if A is "contained" inside B. A and B may coincide. The relationship of one set being a subset of another is called inclusion or sometimes containment...

 of an Euclidean space
Euclidean space
In mathematics, Euclidean space is the Euclidean plane and three-dimensional space of Euclidean geometry, as well as the generalizations of these notions to higher dimensions...

  or the integer grid , for some dimension d. Let us denote this space or grid by E.

A structuring element is a simple, pre-defined shape, represented as a binary image, used to probe another binary image, in morphological operations such as erosion
Erosion (morphology)
For use of "Erosion" in dermatopathology, see Erosion Erosion is one of two fundamental operations in Morphological image processing from which all other morphological operations are based...

, dilation
Dilation (morphology)
Dilation is one of the basic operations in mathematical morphology. Originally developed for binary images, it has been expanded first to grayscale images, and then to complete lattices...

, opening
Opening (morphology)
In mathematical morphology, opening is the dilation of the erosion of a set A by a structuring element B:A\circ B = \oplus B, \, where \ominus and \oplus denote erosion and dilation, respectively....

, and closing
Closing (morphology)
In mathematical morphology, the closing of a set A by a structuring element B is the erosion of the dilation of that set,A\bullet B = \ominus B, \, where \oplus and \ominus denote the dilation and erosion, respectively....

.

Let and be two structuring elements satisfying . The pair (C,D) is sometimes called composite structuring element. The hit-or-miss transform of a given image A by B=(C,D) is given by:
,


where is the set complement of A.

That is, a point x in E belongs to the hit-or-miss transform output if C translated to x fits in A, and D translated to x misses A (fits the background of A).

Thinning

Let , and consider the eight composite structuring elements, composed by:
and , and
and the three rotations of each by , , and . The corresponding composite structuring elements are denoted .

For any i between 1 and 8, and any binary image X, define
,

where denotes the set-theoretical difference.

The thinning of an image A is obtained by cyclically iterating until convergence:
.

Other applications

  • Pattern detection. By definition, the hit-or-miss transform indicates the positions where a certain pattern (characterized by the composite structuring element B) occurs in the input image.

  • Pruning
    Pruning (morphology)
    The pruning algorithm is a technique used in digital image processing based on mathematical morphology. It is used as a complement to the skeleton and thinning algorithms to remove unwanted parasitic components. In this case 'parasitic' components refer to branches of a line which are not key to...

    . The hit-or-miss transform can be used to identify the end-points of a line to allow this line to be shrunk from each end to remove unwanted branches.

  • Computing the Euler number.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK