Python图像处理库 PIL

码农软件 · 软件分类 · 图形/图像处理 · 2019-09-08 09:42:50

软件介绍

PythonWare公司提供了免费的图像处理工具包PIL(Python Image Library),该软件包提供了基本的图像处理功能,如:改变图像大小,旋转图像,图像格式转换,色场空间转换,图像增强,直方图处理,插值和滤波等等。虽然在这个软件包上要实现类似MATLAB中的复杂的图像处理算法并不太适合,但是Python的快速开发能力以及面向对象等等诸多特点使得它非常适合用来进行原型开发。

在PIL中,任何一副图像都是用一个Image对象表示,而这个类由和它同名的模块导出,因此,要加载一副图像,最简单的形式是这样的:

import Image
img = Image.open(“dip.jpg”)

注意:第一行的Image是模块名;第二行的img是一个Image对象; Image类是在Image模块中定义的。关于Image模块和Image类,切记不要混淆了。现在,我们就可以对img进行各种操作了,所有对img的 操作最终都会反映到到dip.img图像上。

本文地址:https://codercto.com/soft/d/14131.html

Introduction to the Design and Analysis of Algorithms

Introduction to the Design and Analysis of Algorithms

Anany Levitin / Addison Wesley / 2006-2-24 / USD 122.00

Based on a Based on a new classification of algorithm design techniques and a clear delineation of analysis methods, "Introduction to the Design and Analysis of Algorithms" presents the subject in a c......一起来看看 《Introduction to the Design and Analysis of Algorithms》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具