Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have a binary image [0,1]. I want to use Python to find the edge of the image. I have tried sobel method on the binary but it provides a bad result. I expect the output like the image
The best way is to apply a 1-pixel morphological erosion, then take the difference between the input image and the result. In pseudo-code:
edges = image - erosion(image)
Add a comment
edges = image - ndimage.morphology.binary_dilation(image)
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.