发布时间:2019-08-28 09:09:34编辑:auto阅读(2214)
PythonWare公司提供了免费的图像处理工具包PIL(Python Image Library),该软件包提供了基本的图像处理功能,本文介绍了使用PIL工具包中的Image模块进行比对的过程。
Sonic1.jpg Sonic2.jpg
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import Image, ImageChops
img1 = Image.open(r'C:\cygwin\tmp\Sonic1.jpg') 
img2 = Image.open(r'C:\cygwin\tmp\Sonic2.jpg') Diff.jpg
img3 = ImageChops.invert(img2)
Image.blend(img1,img3,0.5).show()
上一篇: python获取linux中top信息
下一篇: 使用python中出现的错误及解决办法
51316
50768
41362
38169
32650
29541
28385
23259
23229
21554
1629°
2363°
1966°
1910°
2239°
1947°
2640°
4425°
4266°
3037°