基于Python的PIL库学习详解


Posted in Python onMay 10, 2019

摘要

对于图像识别,大量的工作在于图像的处理,处理效果好,那么才能很好地识别,因此,良好的图像处理是识别的基础。在Python中,有一个优秀的图像处理框架,就是PIL库,本博文会分模块,介绍PIL库中的各种方法,并列举相关例子。

参考:http://pillow-cn.readthedocs.io/zh_CN/latest/reference/index.html

网站上列举了PIL库中所有的模块和方法,但是没有相关的例子,博文中会尽量给出相关的例子和进行简单的讲解。

基于的环境:Win10,Python2.7,PIL 1.1.7。

Image模块

开篇的例子

首先,给出Image模块中的一个简单的例子。例子实现的功能是:读取图片,并进行45°旋转,然后进行可视化。

# -*- coding:utf-8 -*-
# Image模块开篇例子
from PIL import Image
im = Image.open('test.bmp') # 读取图片
im.rotate(45).show() # 将图片旋转,并用系统自带的图片工具显示图片

创建缩略图

# -*- coding:utf-8 -*-
# PIL中创建缩略图(create thumbnails)
from PIL import Image
import glob,os

size = 128,128

for infile in glob.glob("*.jpg"): # glob的作用是文件搜索,返回的是一个列表
  file,ext = os.path.splitext(infile) # 将文件的文件名和拓展名分开,用于之后的保存重命名
  im = Image.open(infile)
  im.thumbnail(size,Image.ANTIALIAS) # 等比例缩放
  im.save(file+".thumbnail","JPEG")
  #im.show() # 显示缩略图
  #print im.size,im.mode

缩略图不能直接双击打开,而可以使用PIL.image的open读取,然后使用show()方法进行显示。

图像处理

PIL.image.alpha_composite(im1,im2)

PIL.image.blend(im1,im2,alpha)

PIL.Image.composite(im1,im2,mask)

这三个方法都属于图片的合成或者融合。都要求im1和im2的mode和size要一致,alpha代表图片占比的意思,而mask是mode可以为”1”,”L”或者”RGBA”的size和im1、im2一致的。

# coding:utf-8 -*-
from PIL import Image
# 图片合成

# PIL的alpha_composite(im1,im2) 图像通道融合
# im2要和im1的size和mode一致,且要求格式为RGBA
im1 = Image.open("test.png")
im2 = Image.open("test2.png")

newim1 = Image.alpha_composite(im1,im2) # 将im2合成到im1中,如果其一是透明的,
# 才能看到结果,不然最终结果只会显示出im2
newim1.show()
#print(im1.mode)

# -----------------------------------------
# image.blend(im1,im2,alpha)
# alpha为透明度
newim2 = Image.blend(im1,im2,0.5)
newim2.show()

# -----------------------------------------
mask = Image.open("mask.png")
newim3 = Image.composite(im2,im1,mask)
newim3.show()

PIL.image.eval(image,*args)

程序:

# -*- coding:utf-8 -*-
from PIL import Image
im = Image.open("test.png")

imnew = Image.eval(im,lambda i:i*2) # 将原图片的像素点,都乘2,返回的是一个Image对象
#print imnew.mode
imnew.show()
im.show()

创建图像

(1) PIL.image.new(mode,size,color=0)

使用模式和大小,创建一个新的图像。其中,mode可以是”L”,”RGB”,”RGBA”;而size则是一个tuple(元组),color应该和mode相对应。

下面例子,分别创建”L”、”RGB”和”RGBA”的图片。

# -*- coding:utf-8 -*-
from PIL import Image
# 创建图像
# 创建一个灰度图像

newL = Image.new("L",(28,28),255)
newL.show()

# 创建一个RGb图像
newrgb = Image.new("RGB",(28,28),(20,200,45))
newrgb.show()

newrgba = Image.new("RGBA",(28,28),(20,200,45,255))
newrgba.show()
print "The frist image:",newL.size,newL.mode
print "The second image:",newrgb.size,newrgb.mode
print "The third image:",newrgba.size,newrgba.mode

(2)以其他形式创建图像

a. 以数组的形式创建图像,PIL.image.fromarray(obj,mode=None)

obj - 图像的数组,类型可以是numpy.array()

mode - 如果不给出,会自动判断

本人觉得这个功能还是挺实用的,可以将一个数组(具体一点就是像素数组)转换为图像,从图像的本质去处理图像。

下面一段程序,就是用fromarray()函数实现图像的灰度化(使用了两种方法)。

# -*- coding:utf-8 -*-
from PIL import Image
import numpy as np
a = Image.open("fromimg.png")
a.show()
b = a.resize((28,28))
datab = list(b.getdata())
#print type(datab)
obj1 = []
obj2 = []
for i in range(len(datab)):
  obj1.append([sum(datab[i])/3]) # 灰度化方法1:RGB三个分量的均值
  obj2.append([0.3*datab[i][0]+0.59*datab[i][1]+0.11*datab[i][2]])
  #灰度化方法2:根据亮度与RGB三个分量的对应关系:Y=0.3*R+0.59*G+0.11*B

obj1 = np.array(obj1).reshape((28,28))
obj2 = np.array(obj2).reshape((28,28))
print obj1
print obj2

arrayimg1 = Image.fromarray(obj1)
arrayimg2 = Image.fromarray(obj2)
arrayimg1.show()
arrayimg2.show()

显然,两种方法都能成功灰度化。

还有:

PIL.Image.frombytes(mode,size,data,decoder_name='raw',*args)

PIL.Image.fromstring(*args,**kw)

PIL.Image.frombuffer(mode,size,data,decoder_name='raw',*args)

感觉不常用,没有仔细研究。

Image模块下的Image类

下面的Image是一个图像对象,而不是模块!

(1) Image.convert(mode=None,matrix=None,dither=None,palette=0,color=256)

该方法,同样可以实现上面的灰度化处理。

# -*- coding:utf-8 -*-
from PIL import Image
img = Image.open("test.png")
# 灰度化:将RGB/RGBA -> L
img = img.convert("L")
img.show()

(2) Image.copy()

将读取的图片复制一份。

# -*- coding:utf-8 -*-
from PIL import Image
img = Image.open("test.png")
# 灰度化:将RGB/RGBA -> L
img = img.convert("L")
#img.show()

# ------ copy()----------
img1 = img.copy()
img1.show()

将灰度化的图片复制一份,因此该程序的运行结果和之前的一致。

(3) Image.filter(filter)

该函数是用于图像滤波的,PIL中自带了很多的滤波器,就是括号中的filter的参数。filter应该是一个ImaageFilter模块下的对象。这里把ImageFilter模块讲了。其实,该模块就是提供滤波器。自带的滤波器有:

使用中值滤波:

# -*- coding:utf-8 -*-
from PIL import Image
from PIL import ImageFilter

# BLUR - 模糊处理
# CONTOUR - 轮廓处理
# DETAIL - 增强
# EDGE_ENHANCE - 将图像的边缘描绘得更清楚
# EDGE_ENHANCE_NORE - 程度比EDGE_ENHANCE更强
# EMBOSS - 产生浮雕效果
# SMOOTH - 效果与EDGE_ENHANCE相反,将轮廓柔和
# SMOOTH_MORE - 更柔和
# SHARPEN - 效果有点像DETAIL
testimg = Image.open("filter1.png")
testimg.show()
filterimg = testimg.filter(ImageFilter.MedianFilter)
filterimg.show()

(4) 使用各种方法/函数获取图片的基本信息

Image.getbands()

Image.geebbox()

Image.getcolors(maxcolor=256)

Image.getdata(band=None)(一般和list()结合使用)

Image.getextrema()

Image.getpixel((x,y))

Image.histogram(mask=None,extrema=None)

# -*- coding:utf-8 -*-
from PIL import Image
img1 = Image.open("test.png")
img1.show()

# getbands() - 显示该图像的所有通道,返回一个tuple
bands = img1.getbands()
print bands

# getbbox() - 返回一个像素坐标,4个元素的tuple
bboxs = img1.getbbox()
print bboxs

# getcolors() - 返回像素信息,是一个含有元素的列表[(该种像素的数量,(该种像素)),(...),...]
colors = img1.getcolors()
print colors

# getdata() - 返回图片所有的像素值,要使用list()才能显示出具体数值
#data = list(img1.getdata())
#print data

# getextrema() - 获取图像中每个通道的像素最小和最大值,是一个tuple类型
extremas = img1.getextrema()
print extremas

# getpixel() - 获取该坐标
pixels = img1.getpixel((87,180))
print pixels

# histogram() - 返回图片的像素直方图
print(img1.histogram())

运行结果:

('R', 'G', 'B', 'A')
(0, 0, 338, 238)
[(73463, (255, 255, 255, 255)), (32, (252, 249, 252, 255)), (1, (255, 189, 143, 255)), (12, (255, 199, 160, 255)), (22, (247, 239, 247, 255)), (3, (255, 242, 246, 255)), (9, (238, 221, 238, 255)), (9, (235, 215, 235, 255)), (5, (232, 209, 232, 255)), (1, (255, 228, 209, 255)), (2, (255, 210, 225, 255)), (1, (255, 202, 201, 255)), (3, (255, 158, 92, 255)), (22, (218, 181, 218, 255)), (1, (217, 181, 218, 255)), (2, (255, 232, 217, 255)), (16, (255, 195, 153, 255)), (22, (212, 169, 212, 255)), (3, (211, 169, 212, 255)), (1, (204, 153, 204, 255)), (1, (255, 229, 238, 255)), (53, (255, 131, 46, 255)), (9, (255, 203, 167, 255)), (1, (255, 157, 90, 255)), (3, (186, 119, 187, 255)), (2, (255, 217, 229, 255)), (6, (183, 113, 184, 255)), (1, (255, 212, 227, 255)), (14, (214, 175, 215, 255)), (2, (255, 182, 131, 255)), (12, (166, 79, 167, 255)), (2, (255, 180, 127, 255)), (4309, (255, 127, 39, 255)), (737, (163, 73, 164, 255)), (4, (255, 252, 253, 255)), (3, (255, 232, 216, 255)), (9, (255, 250, 233, 255)), (1, (255, 245, 248, 255)), (34, (255, 239, 228, 255)), (3, (255, 142, 64, 255)), (1, (255, 162, 98, 255)), (19, (255, 247, 241, 255)), (7, (255, 223, 201, 255)), (2, (255, 133, 49, 255)), (16, (255, 221, 232, 255)), (58, (255, 235, 221, 255)), (1, (255, 225, 204, 255)), (2, (255, 219, 194, 255)), (21, (255, 175, 120, 255)), (6, (255, 182, 206, 255)), (37, (255, 243, 235, 255)), (3, (255, 179, 127, 255)), (6, (255, 207, 223, 255)), (3, (255, 232, 240, 255)), (1, (255, 134, 51, 255)), (2, (255, 222, 233, 255)), (2, (255, 218, 192, 255)), (1, (255, 186, 186, 255)), (1, (255, 163, 99, 255)), (1, (255, 207, 173, 255)), (8, (255, 151, 80, 255)), (1, (255, 184, 201, 255)), (19, (255, 211, 180, 255)), (1, (255, 143, 65, 255)), (9, (255, 233, 158, 255)), (18, (255, 215, 187, 255)), (1, (255, 185, 136, 255)), (7, (255, 227, 237, 255)), (22, (255, 163, 100, 255)), (1, (255, 221, 198, 255)), (5, (255, 184, 208, 255)), (10, (255, 195, 215, 255)), (5, (255, 239, 182, 255)), (1, (255, 197, 157, 255)), (1, (255, 154, 85, 255)), (1, (255, 136, 55, 255)), (8, (255, 240, 190, 255)), (14, (255, 216, 229, 255)), (3, (255, 179, 204, 255)), (1, (255, 143, 67, 255)), (1, (255, 196, 155, 255)), (19, (255, 249, 227, 255)), (2, (255, 211, 181, 255)), (10, (255, 230, 142, 255)), (4, (255, 187, 140, 255)), (195, (255, 201, 14, 255)), (2, (255, 129, 42, 255)), (1, (255, 131, 47, 255)), (12, (255, 231, 214, 255)), (1, (255, 181, 151, 255)), (8, (249, 244, 249, 255)), (13, (246, 238, 246, 255)), (44, (244, 234, 244, 255)), (1, (243, 232, 244, 255)), (7, (240, 226, 241, 255)), (25, (255, 167, 107, 255)), (24, (255, 215, 229, 255)), (22, (230, 206, 230, 255)), (6, (229, 204, 229, 255)), (3, (255, 130, 45, 255)), (11, (227, 200, 228, 255)), (4, (226, 198, 226, 255)), (3, (255, 127, 40, 255)), (5, (223, 192, 223, 255)), (9, (220, 186, 221, 255)), (172, (255, 174, 201, 255)), (16, (255, 231, 239, 255)), (1, (255, 171, 113, 255)), (33, (209, 164, 209, 255)), (1, (255, 192, 213, 255)), (6, (255, 247, 250, 255)), (2, (255, 136, 54, 255)), (9, (255, 253, 247, 255)), (1, (255, 171, 114, 255)), (2, (255, 147, 73, 255)), (5, (255, 181, 130, 255)), (7, (189, 124, 190, 255)), (1, (255, 199, 161, 255)), (13, (255, 183, 134, 255)), (3, (255, 152, 82, 255)), (2, (255, 156, 88, 255)), (32, (255, 143, 66, 255)), (5, (178, 102, 178, 255)), (6, (175, 96, 176, 255)), (8, (255, 129, 43, 255)), (4, (172, 90, 173, 255)), (1, (255, 168, 109, 255)), (1, (255, 153, 83, 255)), (1, (255, 174, 118, 255)), (1, (255, 172, 115, 255)), (1, (255, 148, 75, 255)), (8, (255, 244, 248, 255)), (1, (255, 130, 43, 255)), (5, (255, 205, 222, 255)), (1, (255, 210, 177, 255)), (1, (255, 170, 110, 255)), (1, (255, 157, 89, 255)), (1, (255, 197, 134, 255)), (13, (255, 155, 86, 255)), (3, (255, 137, 56, 255)), (2, (255, 138, 57, 255)), (11, (255, 227, 208, 255)), (1, (255, 190, 145, 255)), (2, (255, 155, 87, 255)), (1, (169, 84, 170, 255)), (4, (255, 202, 220, 255)), (6, (255, 139, 59, 255)), (1, (255, 128, 42, 255)), (1, (255, 158, 91, 255)), (1, (255, 198, 158, 255)), (5, (255, 130, 44, 255)), (1, (255, 202, 165, 255)), (1, (255, 187, 154, 255)), (1, (255, 132, 48, 255)), (1, (255, 154, 84, 255)), (1, (255, 235, 241, 255)), (7, (255, 135, 53, 255)), (62, (255, 159, 93, 255)), (2, (255, 177, 124, 255)), (4, (255, 187, 210, 255)), (11, (255, 251, 248, 255)), (1, (255, 229, 211, 255)), (1, (255, 208, 176, 255)), (1, (255, 133, 50, 255)), (2, (255, 219, 231, 255)), (2, (255, 141, 63, 255)), (2, (255, 146, 71, 255)), (1, (255, 160, 95, 255)), (2, (255, 184, 135, 255)), (1, (255, 208, 175, 255)), (1, (255, 139, 61, 255)), (1, (255, 189, 211, 255)), (2, (255, 145, 69, 255)), (263, (255, 191, 147, 255)), (4, (255, 187, 141, 255)), (3, (255, 250, 252, 255)), (1, (255, 147, 72, 255)), (5, (255, 177, 203, 255)), (1, (255, 169, 109, 255)), (62, (255, 207, 174, 255))]
((163, 255), (73, 255), (14, 255), (255, 255))
(255, 127, 39, 255)
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 737, 0, 0, 12, 0, 0, 1, 0, 0, 4, 0, 0, 6, 0, 0, 5, 0, 0, 0, 0, 6, 0, 0, 3, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 33, 0, 3, 22, 0, 14, 0, 0, 1, 22, 0, 9, 0, 0, 5, 0, 0, 4, 11, 0, 6, 22, 0, 5, 0, 0, 9, 0, 0, 9, 0, 7, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80444]

(5) 图像粘贴操作(paste)

Image.paste(im,box=None,maske=None)

使用im粘贴到原图片中。注意:两个图片的mode和size要求一致,不一致可以使用convert()和resize()进行调整。

# -*- coding:utf-8 -*-
from PIL import Image
rawimg = Image.open("qqtou.png")
print rawimg.size

im = Image.open("number.png")
print im.size

# rawimg的size和im的size要相同,不然不能匹配
# paste(用来粘贴的图片,(位置坐标)),可以通过设置位置坐标来确定粘贴图片的位置
# 该方法没有返回值,直接作用于原图片
rawimg.paste(im,(75,-90))
rawimg.show()

(6) 各种put操作

Image.putalpha(alpha) - 添加多一层alpha层,没看出具体效果

Image.putdata(data,scale=1.0,offset=0.0) - 添加一个像素序列到原图像。

# -*- coding:utf-8 -*-
from PIL import Image

img = Image.open("qqtou.png")
img = img.convert("L")
img.show()

imgdata = list(img.getdata())
print imgdata

addlist = []
for i in range(len(imgdata)):
  if imgdata[i]>250:
    addlist.append(imgdata[i]-100)
  else:
    addlist.append(imgdata[i])


# putdata - 将一个序列添加进原图像,没有返回值,直接作用在原图像中
img.putdata(addlist)
img.show()

显然,原始图像(左图)已经发生了改变。

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持三水点靠木。

Python 相关文章推荐
Python FTP操作类代码分享
May 13 Python
极简的Python入门指引
Apr 01 Python
python进程管理工具supervisor的安装与使用教程
Sep 05 Python
python批量实现Word文件转换为PDF文件
Mar 15 Python
pyQt4实现俄罗斯方块游戏
Jun 26 Python
新手入门Python编程的8个实用建议
Jul 12 Python
python使用rsa非对称加密过程解析
Dec 28 Python
python实现录屏功能(亲测好用)
Mar 02 Python
解决Django部署设置Debug=False时xadmin后台管理系统样式丢失
Apr 07 Python
在python里创建一个任务(Task)实例
Apr 25 Python
Python 按比例获取样本数据或执行任务的实现代码
Dec 03 Python
Python还能这么玩之用Python做个小游戏的外挂
Jun 04 Python
python导入坐标点的具体操作
May 10 #Python
python简单验证码识别的实现方法
May 10 #Python
eclipse创建python项目步骤详解
May 10 #Python
Python实现字符型图片验证码识别完整过程详解
May 10 #Python
使用python PIL库实现简单验证码的去噪方法步骤
May 10 #Python
使用selenium模拟登录解决滑块验证问题的实现
May 10 #Python
python队列Queue的详解
May 10 #Python
You might like
php 字符转义 注意事项
2009/05/27 PHP
一个很不错的PHP翻页类
2009/06/01 PHP
PHP中使用curl入门教程
2015/07/02 PHP
php英文单词统计器
2016/06/23 PHP
php中错误处理操作实例分析
2019/08/23 PHP
PHP常用字符串函数用法实例总结
2020/06/04 PHP
NiftyCube——轻松实现圆角边框
2007/02/20 Javascript
你真的了解JavaScript吗?
2007/02/24 Javascript
JS获取页面窗口大小的代码解读
2011/12/01 Javascript
做好七件事帮你提升jQuery的性能
2014/02/06 Javascript
javascript用函数实现对象的方法
2015/05/14 Javascript
jQuery下拉友情链接美化效果代码分享
2015/08/26 Javascript
学习javascript面向对象 实例讲解面向对象选项卡
2016/01/04 Javascript
基于zepto的移动端轻量级日期插件--date_picker
2016/03/04 Javascript
javascript实现下雨效果
2017/03/27 Javascript
Vue网页html转换PDF(最低兼容ie10)的思路详解
2017/08/24 Javascript
JS和jQuery通过this获取html标签中的属性值(实例代码)
2017/09/11 jQuery
React实践之Tree组件的使用方法
2017/09/30 Javascript
jQuery中的$是什么意思及 $. 和 $().的区别
2018/04/20 jQuery
手写简单的jQuery雪花飘落效果实例
2018/04/22 jQuery
微信小程序聊天功能的示例代码
2020/01/13 Javascript
js实现经典贪吃蛇小游戏
2020/03/19 Javascript
[44:41]Fnatic vs Liquid 2018国际邀请赛小组赛BO2 第二场 8.16
2018/08/17 DOTA
Python 字典与字符串的互转实例
2017/01/13 Python
pygame游戏之旅 添加碰撞效果的方法
2018/11/20 Python
python打包exe开机自动启动的实例(windows)
2019/06/28 Python
浅谈PyTorch的可重复性问题(如何使实验结果可复现)
2020/02/20 Python
scrapy-redis分布式爬虫的搭建过程(理论篇)
2020/09/29 Python
校园安全教育广播稿
2014/02/17 职场文书
协议书范本
2014/04/23 职场文书
北京申奥口号
2014/06/19 职场文书
2014年世界艾滋病日演讲稿
2014/11/28 职场文书
2014年幼儿园德育工作总结
2014/12/17 职场文书
标准版个人借条怎么写?以及什么是借条?
2019/08/28 职场文书
win10+anaconda安装yolov5的方法及问题解决方案
2021/04/29 Python
background-position百分比原理详解
2021/05/08 HTML / CSS