SciPy - Image Processing (scipy.ndimage)
What will be the output of the following code snippet?
import numpy as np from scipy.ndimage import binary_dilation img = np.array([[0,0,0],[0,1,0],[0,0,0]]) dilated = binary_dilation(img, structure=np.ones((3,3))) print(dilated.astype(int))
