久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

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

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

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

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

實現(xiàn)效果:

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

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

標(biāo)簽: Python 編程
相關(guān)文章:
主站蜘蛛池模板: 桑日县| 广水市| 克什克腾旗| 镇安县| 池州市| 昆山市| 抚州市| 滁州市| 涞水县| 德保县| 怀来县| 称多县| 开平市| 威宁| 竹溪县| 门头沟区| 封丘县| 高陵县| 泾源县| 无锡市| 长葛市| 连平县| 庆城县| 沙湾县| 金门县| 玉山县| 通化县| 上犹县| 平果县| 莒南县| 麻江县| 沙洋县| 桂东县| 资溪县| 阿瓦提县| 衡东县| 金山区| 景泰县| 巴东县| 土默特左旗| 昂仁县|