基于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中unittest用法实例
Sep 25 Python
浅谈python字典多键值及重复键值的使用
Nov 04 Python
详解Python进程间通信之命名管道
Aug 28 Python
详解使用 pyenv 管理多个版本 python 环境
Oct 19 Python
CentOS7.3编译安装Python3.6.2的方法
Jan 22 Python
Python实现的基于优先等级分配糖果问题算法示例
Apr 25 Python
python pycurl验证basic和digest认证的方法
May 02 Python
python3.x 将byte转成字符串的方法
Jul 17 Python
python实现三次样条插值
Dec 17 Python
Python向excel中写入数据的方法
May 05 Python
Python3 selenium 实现QQ群接龙自动化功能
Apr 17 Python
tensorflow中tf.reduce_mean函数的使用
Apr 19 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学习之function的用法
2012/07/14 PHP
php中字符串和正则表达式详解
2014/10/23 PHP
PHP解析目录路径的3个函数总结
2014/11/18 PHP
php打包网站并在线压缩为zip
2016/02/13 PHP
PHP消息队列实现及应用详解【队列处理订单系统和配送系统】
2019/05/20 PHP
解决laravel资源加载路径设置的问题
2019/10/14 PHP
JS 对象介绍
2010/01/20 Javascript
javascript正则表达式中参数g(全局)的作用
2010/11/11 Javascript
JS中获取函数调用链所有参数的方法
2015/05/07 Javascript
JavaScript事件委托实例分析
2015/05/26 Javascript
谈谈js中的prototype及prototype属性解释和常用方法
2015/11/25 Javascript
详解JavaScript基本类型和引用类型
2015/12/09 Javascript
Bootstrap3制作搜索框样式的方法
2016/07/11 Javascript
Bootstrap 3多级下拉菜单实例
2017/11/23 Javascript
nodejs使用socket5进行代理请求的实现
2020/02/21 NodeJs
使用Python脚本生成随机IP的简单方法
2015/07/30 Python
Python Web框架Tornado运行和部署
2020/10/19 Python
Python 记录日志的灵活性和可配置性介绍
2018/02/27 Python
python 通过logging写入日志到文件和控制台的实例
2018/04/28 Python
Python自然语言处理 NLTK 库用法入门教程【经典】
2018/06/26 Python
Python django使用多进程连接mysql错误的解决方法
2018/10/08 Python
使用python对文件中的单词进行提取的方法示例
2018/12/21 Python
python-pyinstaller、打包后获取路径的实例
2019/06/10 Python
Python整数对象实现原理详解
2019/07/01 Python
Scrapy实现模拟登录的示例代码
2021/02/21 Python
美国最好的保健品打折网店:Swanson
2017/08/04 全球购物
荷兰超市:DEEN
2018/03/14 全球购物
xml有哪些解析技术?区别是什么
2016/04/26 面试题
周年庆促销方案
2014/03/15 职场文书
大学毕业寄语大全
2014/04/10 职场文书
2014红色之旅心得体会
2014/10/07 职场文书
介绍信的写法
2015/01/31 职场文书
2015年新农村建设工作总结
2015/05/22 职场文书
摩登时代观后感
2015/06/03 职场文书
开工典礼致辞
2015/07/29 职场文书
一次SQL如何查重及去重的实战记录
2022/03/13 MySQL