最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Python圖像處理模塊ndimage用法實例分析

 更新時間:2019年09月05日 11:57:24   作者:cakincqm  
這篇文章主要介紹了Python圖像處理模塊ndimage用法,結(jié)合實例形式分析了Python圖像處理模塊ndimage基本功能及常見的圖形運算操作實現(xiàn)技巧,需要的朋友可以參考下

本文實例講述了Python圖像處理模塊ndimage用法。分享給大家供大家參考,具體如下:

一 原始圖像

1 代碼

from scipy import misc
from scipy import ndimage
import matplotlib.pyplot as plt
face = misc.face()#face是測試圖像之一
plt.figure()#創(chuàng)建圖形
plt.imshow(face)#繪制測試圖像
plt.show()#原始圖像

2 運行結(jié)果

二 高斯濾波

1 代碼

from scipy import misc
from scipy import ndimage
import matplotlib.pyplot as plt
face = misc.face()#face是測試圖像之一
plt.figure()#創(chuàng)建圖形
blurred_face = ndimage.gaussian_filter(face, sigma=7)#高斯濾波
plt.imshow(blurred_face)
plt.show()

2 運行結(jié)果

三 邊緣銳化處理

1 代碼

from scipy import misc
from scipy import ndimage
import matplotlib.pyplot as plt
face = misc.face()#face是測試圖像之一
plt.figure()#創(chuàng)建圖形
blurred_face1 = ndimage.gaussian_filter(face, sigma=1)#邊緣銳化
blurred_face3 = ndimage.gaussian_filter(face, sigma=3)
sharp_face = blurred_face3 +6*(blurred_face3-blurred_face1)
plt.imshow(sharp_face)
plt.show()

2 運行結(jié)果

四 中值濾波

1 代碼

from scipy import misc
from scipy import ndimage
import matplotlib.pyplot as plt
face = misc.face()#face是測試圖像之一
plt.figure()#創(chuàng)建圖形
median_face = ndimage.median_filter(face,7)#中值濾波
plt.imshow(median_face)
plt.show()

2 運行結(jié)果

更多關(guān)于Python相關(guān)內(nèi)容可查看本站專題:《Python圖片操作技巧總結(jié)》、《Python數(shù)據(jù)結(jié)構(gòu)與算法教程》、《Python函數(shù)使用技巧總結(jié)》、《Python字符串操作技巧匯總》及《Python入門與進階經(jīng)典教程

希望本文所述對大家Python程序設(shè)計有所幫助。

相關(guān)文章

  • Python3.6筆記之將程序運行結(jié)果輸出到文件的方法

    Python3.6筆記之將程序運行結(jié)果輸出到文件的方法

    下面小編就為大家分享一篇Python3.6筆記之將程序運行結(jié)果輸出到文件的方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2018-04-04
  • 最新評論

    南城县| 昌江| 司法| 沁阳市| 彭水| 祥云县| 亚东县| 察哈| 湖北省| 滁州市| 新绛县| 土默特左旗| 聂荣县| 桐梓县| 信宜市| 天长市| 哈巴河县| 临桂县| 始兴县| 化德县| 昭觉县| 漳州市| 梅河口市| 渭源县| 湖州市| 丽江市| 龙井市| 绿春县| 宝清县| 象州县| 屏东县| 望奎县| 黎平县| 固安县| 含山县| 恩平市| 凤庆县| 绥滨县| 灵川县| 温宿县| 杭锦旗|