SciPy - Image Processing (scipy.ndimage)
The following code is intended to perform erosion on a binary image, but it raises an error. What is the problem?
import numpy as np
from scipy.ndimage import erosion
image = np.array([[1, 1, 0],
[1, 0, 0],
[0, 0, 1]])
result = erosion(image)
print(result)