1、打开IDLE:IDLE的界面如下。

3、读取图片:读取我们要处理的图片,并进行灰度化处理,这里读取skimage库中的图片。img=color.rgb2gray(data.camera())

5、查看效果:plt.figure('filters')plt.subplot(121)plt.imshow(img,plt.cm.gray)plt.subplot(122)plt.imshow(dst,plt.cm.gray)plt.show()

1、打开IDLE:IDLE的界面如下。
3、读取图片:读取我们要处理的图片,并进行灰度化处理,这里读取skimage库中的图片。img=color.rgb2gray(data.camera())
5、查看效果:plt.figure('filters')plt.subplot(121)plt.imshow(img,plt.cm.gray)plt.subplot(122)plt.imshow(dst,plt.cm.gray)plt.show()