Python, Machine Learning, Artificial Intelligence, Data Science, Data Analytics.
we can use Sobel, a gradient operator- Image Processing with SciPy and NumPy — Edge Detection >>> sx=ndimage.sobel(im,axis=0,mode=’constant’) >>> sy=ndimage.sobel(im,axis=1,mode=’constant’) >>> sob=np.hypot(sx,sy) b. Segmentation >>> n,l=10,256 >>> im=np.zeros((l,l)) >>> np.random.seed(1) >>>