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

您的位置:首頁技術(shù)文章
文章詳情頁

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

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

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

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

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

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

標(biāo)簽: Python 編程
相關(guān)文章:
主站蜘蛛池模板: 时尚| 常州市| 依安县| 同心县| 县级市| 吉首市| 太康县| 手游| 射阳县| 西乡县| 长兴县| 六枝特区| 安泽县| 镇坪县| 乐昌市| 常山县| 崇阳县| 化州市| 左云县| 互助| 礼泉县| 赤壁市| 铜梁县| 梁山县| 达孜县| 金山区| 乐平市| 慈利县| 鄂托克旗| 建始县| 云梦县| 溆浦县| 红原县| 平定县| 同仁县| 古蔺县| 曲沃县| 高陵县| 曲靖市| 乌海市| 拉孜县|