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

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

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

本文用 Python 實(shí)現(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() 

實(shí)現(xiàn)效果:

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

相關(guān)文章

最新評(píng)論

广平县| 巴林左旗| 元谋县| 耒阳市| 安顺市| 海门市| 正安县| 麻栗坡县| 玉屏| 沁水县| 永修县| 永城市| 阳朔县| 轮台县| 伊宁市| 宜章县| 枣阳市| 宁陵县| 仪征市| 和龙市| 苗栗县| 中宁县| 汉川市| 灵丘县| 五家渠市| 堆龙德庆县| 通道| 清新县| 湖南省| 宁都县| 云龙县| 安吉县| 岑巩县| 镶黄旗| 湘乡市| 原平市| 毕节市| 南投市| 金寨县| 莎车县| 阿荣旗|