Morphological edges detection
Edges can be detected also with morphological operations. Edge := IMG0 <sub> ERODE(IMG0). SUB - is substraction/complements, see Binary Operations or Set operations on Wikipedia. Input image and result of morphological edge detection:
Original image:
Output image: