目录
图像处理方式
1、图像轮廓和直方图
from PIL import Image
from pylab import *
import matplotlib.pyplot as plt
im=array(Image.open('girl.png').convert('L')) #读取图像到数组中
figure() #新建一个图像
gray() #不使用颜色信息
contour(im,origin='image') #在原点的左上角显示轮廓图像
axis('equal')
axis('off')
figure()
hist(im.flatten(),128)
show()
运行结果:
2、高斯模糊
from PIL import Image
from numpy import *
from scipy.ndimage import filters
import matplotlib.pyplot as plt
im=array(Image.open('girl.jpg').convert('L'))
i