1、打开IDLE:IDLE是Python shell界面的另一种称呼。

2、导入软件包:这里用到了相关的软件库包,可采用以下代码实现,舁捡侣惭若是报错可能没有安装相关的软件包,from ski罪焐芡拂mage import data,colorimport matplotlib.pyplot as pltfrom skimage.morphology import diskimport skimage.filters.rank as sfr

3、读入图片:这里读入一张库包内部的图片,代码如下,img =color.rgb2gray(data.coffee())

4、滤波运算:采用以下代码进行高级滤波处理,dst =sfr.equalize(img, disk(5))

5、查看结果:可溽朽孑臾查看以下程序显示结果,plt.figure('equalize')plt.subplot(121)plt.imshow(img,plt.cm.gray)plt.subplot(122)plt.imshow(dst,plt.cm.gray)plt.show()

6、效果如下。
