高斯模糊
import mahotas as mh
import numpy as np
from matplotlib import pyplot as plt
image=mh.imread('image/building05.jpg')
image=mh.colors.rgb2gray(image)
im8=mh.gaussian_filter(image,8)
im16=mh.gaussian_filter(image,16)
im32=mh.gaussian_filter(image,32)
plt.gray();
plt.subplot(131)
plt.imshow(im8)
plt.subplot(132)
plt.imshow(im16)
plt.subplot(133)
plt.imshow(im32)
plt.show()
参考资料:
机器学习系统设计,p159