1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
      Python怎么實(shí)現(xiàn)PS濾鏡功能之波浪特效

      本文小編為大家詳細(xì)介紹“Python怎么實(shí)現(xiàn)PS濾鏡功能之波浪特效”,內(nèi)容詳細(xì),步驟清晰,細(xì)節(jié)處理妥當(dāng),希望這篇“Python怎么實(shí)現(xiàn)PS濾鏡功能之波浪特效”文章能幫助大家解決疑惑,下面跟著小編的思路慢慢深入,一起來學(xué)習(xí)新知識(shí)吧。

      蘇州網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)建站!從網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、成都響應(yīng)式網(wǎng)站建設(shè)公司等網(wǎng)站項(xiàng)目制作,到程序開發(fā),運(yùn)營(yíng)維護(hù)。創(chuàng)新互聯(lián)建站成立于2013年到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)建站

      使用計(jì)算機(jī)編程語言實(shí)現(xiàn)警官濾鏡的波浪特效

      importnumpyasnp

      fromskimageimportimg  _ as  _ float

      importmatplotlib.pyplotasplt

      fromskimageimportio

      importnumpy.matlib

      importmath

      file  _ name  2=' d  :/VisualEffects/PSalgorithm/4。jpg  '

      img=io.imread(file_name2)

      img=img_as_float(img)

      row,col,channel=img.shape

      img_out=img*1.0

      =70.0

      =30.0

      度數(shù)=20.0

      center_x=(col-1)/2.0

      center_y=(row-1)/2.0

      xx=np.arange(col)

      yy=np.arange(行)

      x_mask=numpy.matlib.repmat(xx,row,1)

      y_mask=numpy.matlib.repmat(yy,col,1)

      y_mask=np。轉(zhuǎn)置(y_mask)

      xx_dif=x_mask-center_x

      yy_dif=center_y-y_mask

      x=度* NP。sin(2 *數(shù)學(xué)。pi  * YY  _ dif/alpha)xx  _ dif

      y=度數(shù)* NP。cos(2 *數(shù)學(xué)。pi  * xx  _ dif/beta)YY  _ dif

      x_new=x  center_x

      y_new=center_y-y

      int_x=np.floor(x_new)

      int_x=int_x.astype(int)

      int_y=np.floor(y_new)

      int_y=int_y.astype(int)

      foriiinrange(row):

      forjjirinrange(col):

      new_xx=int_x[ii,jj]

      new_yy=int_y[ii,jj]

      ifx_new[ii,jj]0orx_new[ii,jj]col-1:

      繼續(xù)

      ify_new[ii,jj]0ory_new[ii,jj]row-1:

      繼續(xù)

      img_out[ii,jj,]=img[new_yy,new_xx,]

      圖(1)

      plt.title('www.jb51.net  ')

      plt.imshow(img)

      plt.axis('off  ')

      圖(2)

      plt.title('www.jb51.net  ')

      plt.imshow(img_out)

      plt.axis('off  ')

      (附錄:PS  濾鏡——波浪 wave)

      % % %波浪

      %%%波浪效果

      色度控制中心

      全部清除

      關(guān)閉所有文件

      添加路徑(' e  : \ Photoshop  algorithm  \ image  processing  \ PSAlgorithm  ');

      I=im  read(' 4。jpg  ');

      image=double(I);

      %Image=0.2989*I(:1) 0.5870*I(:2) 0.1140*I(:3);

      [行、列、通道]=大小(圖像);

      R=floor(max(row,col)/2);

      圖像_新=圖像

      度數(shù)=30;%控制扭曲的程度

      center  _ X=(col  1)/2;

      中心_Y=(第一行)/2;

      fori=1:row

      forj=1:col

      x0=j-Center  _ X;

      y0=中心_ Y-I;

      x=度* sin(2 * pi  * y0/128)x0;

      y=度數(shù)* cos(2 * pi  * x0/128)y0;

      x=x  col/2;

      y=row/2-y;

      if(x1xcolylrow  1)

      x1=樓層(x);

      y1=樓層(y);

      p=x-x1;

      q=y-y1;

      Image_new(i,j,)=1-p)*(1-q)* Image(y1,x1,) p*(1-q)*Image(y1,x1 1,).

      q*(1-p)*Image(y1 1,x1,) p*q*Image(y1 1,x1 1,);

      結(jié)束

      結(jié)束

      結(jié)束

      圖,imshow(Image  _ new/255);本例Python運(yùn)行效果:

      原圖

      Python怎么實(shí)現(xiàn)PS濾鏡功能之波浪特效

      效果圖

      Python怎么實(shí)現(xiàn)PS濾鏡功能之波浪特效

      讀到這里,這篇“Python怎么實(shí)現(xiàn)PS濾鏡功能之波浪特效”文章已經(jīng)介紹完畢,想要掌握這篇文章的知識(shí)點(diǎn)還需要大家自己動(dòng)手實(shí)踐使用過才能領(lǐng)會(huì),如果想了解更多相關(guān)內(nèi)容的文章,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。


      網(wǎng)頁(yè)題目:Python怎么實(shí)現(xiàn)PS濾鏡功能之波浪特效
      標(biāo)題URL:http://www.ef60e0e.cn/article/pdgsdp.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        疏附县| 陕西省| 大洼县| 鄂托克前旗| 宁远县| 溧阳市| 庄河市| 湛江市| 三都| 龙岩市| 临夏市| 微山县| 博爱县| 瑞丽市| 云浮市| 巴南区| 安化县| 新津县| 武川县| 保德县| 安溪县| 深州市| 饶河县| 中山市| 景泰县| 云龙县| 敦化市| 棋牌| 佳木斯市| 无极县| 屯昌县| 万源市| 綦江县| 普洱| 南雄市| 富裕县| 祥云县| 平泉县| 桓台县| 夏河县| 旬阳县|