0
3.7kviews
Given a following image segment, use Hit or Miss transform to find the top edge of the square.
1 Answer
written 7.7 years ago by |
Use two structuring elements shown below
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.
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 ,
Hence only the top edge of the original square matrix is detected.