问题
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
回答1:
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)
来源:https://stackoverflow.com/questions/54134295/what-is-the-method-for-edge-detection-of-a-binary-image-in-python