1
9.6kviews
Explain HIT or MISS Transform using an example.
1 Answer
0
210views

i. The morphological hit-or-miss transform is a basic tool for shape detection. We introduce this concept with the aid of Fig. 1a, which shows a set A consisting of three shapes (subsets), denoted C, D, and E.

ii. The shading in Figs. 1(a) through (c) indicates the original sets, whereas the shading in Figs. 1(d) and (e) indicates the result of morphological operations. The objective is to find the location of one of the shapes, say, D.

enter image description here enter image description here

iii. Let the origin of each shape be located at its center of gravity. Let D be enclosed by a small window, W. The local background of D with respect to W is defined as the set difference (W - D), as shown in Fig. 1(b).

iv. Figure 1(c) shows the complement of A, which is needed later. Figure 1(d) shows the erosion of A by D (the dashed lines are included for reference). The erosion of A by D is the set of locations of the origin of D, such that D is completely contained in A.

v. Interpreted another way, A € D may be viewed geometrically as the set of all locations of the origin of D at which D found a match (hit) in A. Keep in mind that in Fig. 1 A consists only of the three disjoint sets C, D, and E.

vi. Figure 1(e) shows the erosion of the complement of A by the local background set (W - D). The outer shaded region in Fig.1(e) is part of the erosion. From Figs. 1(d) and (e) we note that the set of locations for which D exactly fits inside A is the intersection of the erosion of A by D and the erosion of A' by (W - D) as shown in Fig. 1(f).

vii. This intersection is precisely the location sought. In other words, if B denotes the set composed of D and its background, the match (or set of matches) of B in A, denoted A & B, is

$A\otimes B=(A\Theta D)\cap [A^c \Theta (W-D)]$ (Equation 1)

viii. We can generalize the notation somewhat by letting B = (B1, B2), where Bi is the set formed from elements of B associated with an object and B2 is the set of elements of B associated with the corresponding background. assuming B = D and B2 = (W – D). With this notation, the above equation becomes.

$A\otimes B =(A\Theta B_1)\cap (A^c\Theta B_2)$ (Equation 2)

ix. Thus, set A & B contains all the (origin) points at which, simultaneously, B, found a match (“hit”) in A and B2 found a match in A*. By using the definition of set differences and the dual relationship between erosion and dilation ,we can write equation 2 as

$A\otimes B=(A\Theta B_1) -(A\oplus \hat{B_2})$ (Equation 3)

x. However, Eq. (2) is considerably more intuitive. We refer to any of the preceding three equations as the morphological hit-or-miss transform.

Please log in to add an answer.