最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Python實現(xiàn)PS濾鏡中的USM銳化效果

 更新時間:2020年12月04日 16:48:39   作者:未雨愁眸  
這篇文章主要介紹了Python實現(xiàn)PS濾鏡中的USM銳化效果,幫助大家更好的利用python處理圖片,感興趣的朋友可以了解下

本文用 Python 實現(xiàn) PS 濾鏡中的 USM 銳化效果

import matplotlib.pyplot as plt
from skimage import io
from skimage.filters import gaussian

file_name='D:/Visual Effects/PS Algorithm/4.jpg';
img=io.imread(file_name)

img = img * 1.0
gauss_out = gaussian(img, sigma=5, multichannel=True)

# alpha 0 - 5
alpha = 1.5
img_out = (img - gauss_out) * alpha + img

img_out = img_out/255.0

# 飽和處理
mask_1 = img_out < 0 
mask_2 = img_out > 1

img_out = img_out * (1-mask_1)
img_out = img_out * (1-mask_2) + mask_2

plt.figure()
plt.imshow(img/255.0)
plt.axis('off')

plt.figure(2)
plt.imshow(img_out)
plt.axis('off')

plt.show() 

實現(xiàn)效果:

以上就是Python實現(xiàn)PS濾鏡中的USM銳化效果的詳細內(nèi)容,更多關(guān)于python usm銳化的資料請關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評論

洛阳市| 井陉县| 榆林市| 嵩明县| 巴楚县| 琼中| 深州市| 凤城市| 徐水县| 房产| 华池县| 汉阴县| 怀安县| 西贡区| 兴仁县| 大田县| 内丘县| 康定县| 石门县| 福建省| 唐河县| 南投县| 西吉县| 洞口县| 桦甸市| 广南县| 平湖市| 乌什县| 民权县| 陕西省| 茂名市| 丰台区| 阳谷县| 迭部县| 和平县| 南华县| 富锦市| 丘北县| 旅游| 阳谷县| 收藏|