0
3.7kviews
Given a following image segment, use Hit or Miss transform to find the top edge of the square.

enter image description here

1 Answer
0
108views

Use two structuring elements shown below

enter image description here

Since we have two different structuring elements, we shall use the formula:

$A⨂B=(A ⊝B_1 )∩(A^c⊝B_2)$

The structuring elements for erosion contain boyh 1’s as well as 0’s

The pixels in the structuring element containing 1’s define the neighbourhood of the structuring element. Only this neighborhood is considered for erosion.

enter image description here

Now we have to place the structuring element, this is done by looking at the neighboring 1’s, choosing the minimum value and placing it at the center.

Now ,

enter image description here

Hence only the top edge of the original square matrix is detected.

Please log in to add an answer.