1、需要winPython中包含有sk坡纠课柩image和matplotlib库;打开Python shell 也就IDLE载入枷讹般身相关的工具箱:from skimage import io,data,filters,colorimport matplotlib.pyplot as plt
2、读入我们的图片,并将其灰度化处理:img=color.rgb2gray(data.coffee())
3、采用下面指令获得垂直的纹理:edge=filters.scharr_v(img)
4、查看我们的结果图片:plt.imshow(edge,plt.cm.gray)plt.show()
5、我们的结果如下图。