python图像处理PIL中ImageEnhance的应用
2018-11-08 18:45
471 查看
版权声明:本文为博主原创文章,未经允许,不得转载,如需转载请注明出处 https://blog.csdn.net/ssjdoudou/article/details/83860369
写在最前面:
只是对图像的一点点处理,效果只能说一般吧。
原始图片:
对比度增强:
[code]from PIL import Image,ImageEnhance # 打开图片 im = Image.open('1.jpg','r') # 对比度增强 enh_con = ImageEnhance.Contrast(im) contrast = 10 image_contrasted = enh_con.enhance(contrast) image_contrasted.show()
锐度增强:
[code]from PIL import Image,ImageEnhance # 打开图片 im = Image.open('1.jpg','r') im.show() # 锐度增强 enh_sha = ImageEnhance.Sharpness(im) sharpness = 10.0 image_sharped = enh_sha.enhance(sharpness) image_sharped.show()
色度增强:
[code]from PIL import Image,ImageEnhance # 打开图片 im = Image.open('1.jpg','r') im.show() # 色度增强 enh_col = ImageEnhance.Color(im) color = 10 image_colored = enh_col.enhance(color) image_colored.show()
亮度增强:
[code]from PIL import Image,ImageEnhance # 打开图片 im = Image.open('1.jpg','r') im.show() # 亮度增强 enh_bri = ImageEnhance.Brightness(im) brightness = 10 image_brightened = enh_bri.enhance(brightness) image_brightened.show()
阅读更多
相关文章推荐
- Python图像处理库PIL的ImageEnhance模块介绍
- PIL python的一个图像处理库 支持 python3
- Win7 64位下Python安装PIL图像处理库
- Python图像处理库PIL-convert()函数
- python图像处理:pytesseract和PIL
- PIL python图像处理库
- 在python3下用PIL做图像处理
- Python图像处理(Pillow/PIL)入门
- PIL---使用Python处理图像
- Python图像处理库:PIL中Image,ImageDraw等基本模块介绍
- Python图像处理库PIL的基本模块介绍
- 树莓派 - 2 Python - b 图像处理包:PIL, Pillow
- Windows安装Python图像处理库:PIL模块
- 在python3下用PIL做图像处理
- Python图像处理库PIL中图像格式转换
- Python图像处理库PIL的ImageFilter模块介绍
- vs2013在图像处理中的应用(7):开发Python扩展
- 【opencv+python】图像处理之二、几何变换(仿射与投影)的应用
- python图像处理库PIL高清晰保存缩放图片
- matplotlib--python绘制图表 | PIL--python图像处理