Hit and Miss Transformations
Hit and Miss Transformations
Hit and Miss Transformations
Operations
If the foreground and background pixels in the structuring element exactly match foreground and background pixels in the image, then the pixel underneath the origin of the structuring element is set to the foreground color. If it doesn't match, then that pixel is set to the background color.
After obtaining the locations of corners in each orientation, we can then simply OR all these images together to get the final result .
The operations of erosion, dilation, opening, closing, thinning and thickening can all be derived from the hitand-miss transform in conjunction with simple set operations.
1) is used to locate isolated points in a binary image. 2) is used to locate the end points on a binary skeleton.
Note that this structuring element must be used in all its orientations, and thus the four hit-and-miss passes are required.
3a) and 3b) are used to locate the triple points on a skeleton.
Both structuring elements must be run in all orientations so eight hit-and-miss passes are required.
The hit-and-miss transform outputs single foreground pixels at each end point by structuring element 2). This image was dilated once using a square-shaped structuring element, and this was then ORed with the original skeleton.
Hit-and-miss Transform
Used to look for particular patterns of foreground and background pixels Very simple object recognition All other morphological operations can be derived from it!! Input:
Binary Image Structuring Element, containing 0s and 1s!!
4-May-13 9
Hit-and-miss Transform
Example for a Hit-and-miss Structuring Element Contains 0s, 1s and dont cares. Usually a 1 at the origin!
4-May-13
10
Hit-and-miss Transform
Similar to Pattern Matching: If foreground and background pixels in the structuring element exactly match foreground and background pixels in the image, then the pixel underneath the origin of the structuring element is set to the foreground color.
4-May-13
11
Hit-and-miss Transform
Similar to Pattern Matching: If foreground and background pixels in the structuring element exactly match foreground and background pixels in the image, then the pixel underneath the origin of the structuring element is set to the foreground color.
4-May-13
12
4-May-13
13
4-May-13
14