国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術文章
文章詳情頁

Python實現PS濾鏡中的USM銳化效果

瀏覽:148日期:2022-07-03 10:51:07

本文用 Python 實現 PS 濾鏡中的 USM 銳化效果

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()

實現效果:

Python實現PS濾鏡中的USM銳化效果

以上就是Python實現PS濾鏡中的USM銳化效果的詳細內容,更多關于python usm銳化的資料請關注好吧啦網其它相關文章!

標簽: Python 編程
相關文章:
主站蜘蛛池模板: 雷山县| 博乐市| 白玉县| 辰溪县| 西贡区| 汽车| 三江| 民乐县| 中牟县| 镇原县| 二连浩特市| 海城市| 乳山市| 含山县| 卓资县| 桐柏县| 丰台区| 彩票| 韶关市| 贞丰县| 枣庄市| 信丰县| 清徐县| 泗阳县| 青浦区| 曲沃县| 渝中区| 萝北县| 资兴市| 松原市| 额济纳旗| 临湘市| 公安县| 新建县| 磐安县| 大埔区| 濮阳县| 大丰市| 隆回县| 元谋县| 黎川县|