Python Imaging Library: ImageFilter Module(图像滤波模块)
来源:互联网 发布:铁三手表 知乎 编辑:程序博客网 时间:2024/06/15 08:18
Python Imaging Library: ImageFilter Module(图像滤波模块)
ImageFilter模块包含一个预定义的滤波器集,它可以与图像类的滤波方法一起使用。
Example:图像滤波
import ImageFilterim1 = im.filter(ImageFilter.BLUR)
im2 = im.filter(ImageFilter.MinFilter(3))
im3 = im.filter(ImageFilter.MinFilter) # same as MinFilter(3)
Filters:滤波器
当前版本的库提供了以下一组预定义的图像增强过滤器:- BLUR
- CONTOUR
- DETAIL
- EDGE_ENHANCE
- EDGE_ENHANCE_MORE
- EMBOSS
- FIND_EDGES
- SMOOTH
- SMOOTH_MORE
- and SHARPEN
Kernel:内核
Kernel(size, kernel, scale=None, offset=0)
(版本1.1.5)创建一个给定大小的卷积内核。在当前版本中,大小必须是(3, 3)或(5, 5),而内核参数必须是一个包含9或25个整数或浮点权重的序列。如果给出了缩放比例,那么将内核应用到每个像素的结果就是按比例值缩放的。默认值是内核权重的总和。
如果给出了偏移量,则将该值添加到按比例进行缩放的结果中。
如果给出了偏移量,则将该值添加到按比例进行缩放的结果中。
RankFilter
RankFilter(size, rank)
(版本1.1.5)创建一个给定大小的排序滤波器。对于输入图像中的每个像素,排序滤波器根据像素值对(size, size)环境中的所有像素进行排序,并将排序值复制到输出图像中。MinFilter
MinFilter(size=3)
(版本1.1.5)创建一个给定大小的最小值滤波器。对于输入图像中的每个像素,该过滤器将(size, size)环境的最小值复制到输出图像。MedianFilter
MedianFilter(size=3)
(版本1.1.5)创建一个给定大小的中值滤波器。对于输入图像中的每个像素,该过滤器将(size, size)环境的中值复制到输出图像。MaxFilter
MaxFilter(size=3)
(版本1.1.5)创建一个给定大小的最大值滤波器。对于输入图像中的每个像素,该过滤器将(size, size)环境的最大值复制到输出图像。ModeFilter
ModeFilter(size=3)
(版本1.1.5)创建一个给定大小的波模滤波器(众数滤波器)。对于输入图像中的每个像素,该过滤器将(size, size)环境中的最常见的像素值复制到输出图像。如果没有一个像素值超过一次,则使用原始像素值。阅读全文
0 0
- Python Imaging Library: ImageFilter Module(图像滤波模块)
- Python Imaging Library: ImageColor Module(图像颜色模块)
- Python Imaging Library: ImageChops Module(图像通道操作模块)
- Python Imaging Library:ImageDraw Module(图像绘制模块)
- Python Imaging Library: ImageEnhance Module(图像增强模块)
- Python Imaging Library: ImageGrab Module(图像采集模块)
- Python Imaging Library: ImageMath Module(图像数学运算模块)
- Python Imaging Library: ImageOps Module(图像运算模块)
- Python Imaging Library: ImagePalette Module(图像调色板模块)
- Python Imaging Library: ImagePath Module(图像路径模块)
- Python Imaging Library: ImageQt Module(图像QT模块)
- Python Imaging Library: ImageSequence Module(图像序列模块)
- Python Imaging Library: ImageStat Module(图像统计模块)
- Python Imaging Library: ImageTk Module(图像Tkinter模块)
- Python Imaging Library: ImageWin Module(图像Windows模块)
- Python Imaging Library: ImageFile Module(图像文件模块)
- Python Imaging Library: PSDraw Module(Postscript打印机模块)
- 【python图像处理】图像的滤波(ImageFilter类详解)
- 从无到有,发布一个你自己的npm package
- linux系统磁盘 、分区扩展
- Kaptcha验证码生成
- 数据结构上机1——线性表
- 报错 Error:Could not create the Java Virtual Machine
- Python Imaging Library: ImageFilter Module(图像滤波模块)
- 商城网站带支付如何建设? 远离bug支付平台很重要!
- Javascript模块化编程(二):AMD规范
- 优雅高效的MyBatis-Plus工具快速入门使用
- TortoiseSVN 无论什么操作,都报同一个错误:请求的操作需要提升
- linux c copyFile接口实现
- 机器学习入门讲解:什么是特征和特征选择
- CLI 命令行实用程序开发实战
- 通辽市科区人才,科区就业和人才公共服务中心