Python: PS 滤镜--USM 锐化
来源:互联网 发布:amx cdc数据 编辑:程序博客网 时间:2024/04/28 15:14
本文用 Python 实现 PS 滤镜中的 USM 锐化效果,具体的算法原理和效果可以参考之前的博客:
http://blog.csdn.net/matrix_space/article/details/51169960
import matplotlib.pyplot as pltfrom skimage import iofrom skimage.filters import gaussianfile_name='D:/Visual Effects/PS Algorithm/4.jpg';img=io.imread(file_name)img = img * 1.0gauss_out = gaussian(img, sigma=5, multichannel=True)# alpha 0 - 5alpha = 1.5img_out = (img - gauss_out) * alpha + imgimg_out = img_out/255.0# 饱和处理mask_1 = img_out < 0 mask_2 = img_out > 1img_out = img_out * (1-mask_1)img_out = img_out * (1-mask_2) + mask_2plt.figure()plt.imshow(img/255.0)plt.axis('off')plt.figure(2)plt.imshow(img_out)plt.axis('off')plt.show()
阅读全文
0 0
- Python: PS 滤镜--USM 锐化
- PS 图像滤镜— — USM 锐化
- 锐化USM
- OpenCV实现USM锐化
- OpenCV实现USM锐化
- USM锐化公式
- Python: PS 滤镜--马赛克
- Python: PS 滤镜--素描
- Delphi图像处理 -- USM锐化
- 图像处理之USM锐化
- Python: PS 滤镜--扇形变换
- Python: PS 滤镜-- Fish lens
- Python: PS 滤镜--碎片特效
- Python: PS 滤镜--万花筒效果
- Python: PS 滤镜--波浪特效
- Python: PS滤镜--径向模糊
- Python: PS 滤镜--旋转模糊
- Python: PS 滤镜--表面模糊
- PBE加解密
- Servlet API中主要的接口与类
- 输入两棵二叉树A,B,判断B是不是A的子结构。(ps:我们约定空树不是任意一个树的子结构)
- python:12:模块和包
- 78. Subsets
- Python: PS 滤镜--USM 锐化
- 从王者荣耀聊聊游戏的帧同步
- 自定义view圆角图片带边框
- 再见,csdn!
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
- Palindromic Substrings
- 关于centOs下Apache不解析php文件问题的解决方法
- OpenCV 2.4.13.4 documentation » OpenCV Tutorials » Introduction to OpenCV »
- java基础二