Morphologycal-edge-detection-using-erosion-and-dialation

the task is to detect object boundary using erosion or dialation .
Here, use the kernel or structure element such as 3×3
1 1 1
1 1 1
1 1 1

if initial binary image is A and after erosion we get B
then , boundary = A – B

for dialation ,
boundary = B – A

input image

This is an image

erosion output

This is an image

boundary detection from erosion

This is an image

dialation output

This is an image

boundary detection from dialation

This is an image

GitHub

View Github