高斯滤波
本代码只是利用高斯滤波API原理还是一样
from PIL import Image
from pylab import *
from numpy import*
from scipy.ndimage import filters
import copy
im = array(Image.open("E:/zhz/lena.jpg"))
r = im[:,:,0]
g = im[:,:,1]
b = im[:,:,2]
r = filters.gaussian_filter(r,2)
g = filters.gaussian_filter(g,2)
b = filters.gaussian_filter(b,2)
img2 = copy.deepcopy(im)
img2[:,:,0] = r
img2[:,:,1] = g
img2[:,:,2] = b
subplot(121)
title('source')
axis('off')
imshow(im)
subplot(122)
title('after')
axis('off')
imshow(img2)
show()