色综合图-色综合图片-色综合图片二区150p-色综合图区-玖玖国产精品视频-玖玖香蕉视频

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

Python 實(shí)現(xiàn)PS濾鏡的旋渦特效

瀏覽:4日期:2022-07-03 13:49:15

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

Python 實(shí)現(xiàn)PS濾鏡的旋渦特效

實(shí)現(xiàn)代碼

import numpy as npfrom skimage import img_as_floatimport matplotlib.pyplot as pltfrom skimage import ioimport mathimport numpy.matlibfile_name2=’D:/2020121173119242.png’ # 圖片路徑img=io.imread(file_name2)img = img_as_float(img)row, col, channel = img.shapeimg_out = img * 1.0degree = 70center_x = (col-1)/2.0center_y = (row-1)/2.0xx = np.arange (col) yy = np.arange (row)x_mask = numpy.matlib.repmat (xx, row, 1)y_mask = numpy.matlib.repmat (yy, col, 1)y_mask = np.transpose(y_mask)xx_dif = x_mask - center_xyy_dif = center_y - y_maskr = np.sqrt(xx_dif * xx_dif + yy_dif * yy_dif)theta = np.arctan(yy_dif / xx_dif)mask_1 = xx_dif < 0theta = theta * (1 - mask_1) + (theta + math.pi) * mask_1theta = theta + r/degreex_new = r * np.cos(theta) + center_xy_new = center_y - r * np.sin(theta) int_x = np.floor (x_new)int_x = int_x.astype(int)int_y = np.floor (y_new)int_y = int_y.astype(int)for ii in range(row): for jj in range (col): new_xx = int_x [ii, jj] new_yy = int_y [ii, jj] if x_new [ii, jj] < 0 or x_new [ii, jj] > col -1 : continue if y_new [ii, jj] < 0 or y_new [ii, jj] > row -1 : continue img_out[ii, jj, :] = img[new_yy, new_xx, :]plt.figure (1)plt.imshow (img)plt.axis(’off’)plt.figure (2)plt.imshow (img_out)plt.axis(’off’)plt.show()

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

標(biāo)簽: Python 編程
相關(guān)文章:
主站蜘蛛池模板: 久久黄色一级视频 | 国产三级精品久久三级国专区 | 国产日本一区二区三区 | 日韩高清成人毛片不卡 | 成人a毛片免费全部播放 | 国产在线视频区 | 久在线播放 | 九九热视频精品 | 中文字幕在线视频在线看 | 新版天堂资源中文8在线 | 久久国产成人福利播放 | 国产成人a一区二区 | 美女张开腿让男人桶爽动漫视频 | 草草视频在线观看 | 亚洲国产第一区二区香蕉日日 | 亚洲综合在线视频 | 欧美一级特黄高清免费 | 国产区最新 | 高清韩国a级特黄毛片 | 国产毛片基地 | 欧美在线高清视频播放免费 | 欧美一区二区日韩一区二区 | 中国嫩模一级毛片 | 亚洲欧洲国产成人精品 | 韩国美女一区二区 | 在线观看视频一区 | 日本黄色官网 | 欧产日产国产精品精品 | 亚洲综合久久1区2区3区 | 欧美精品国产制服第一页 | 欧美日韩一区二区三区视视频 | 欧美精品首页 | 日韩中文字幕精品久久 | 国产热久久精 | 亚洲成人影院在线 | 玖草在线观看 | 日本三级一区二区三区 | 欧美精品成人一区二区视频一 | 久久视频免费观看 | 久久精品视频在线观看榴莲视频 | 成人国产网站 |