亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

您的位置:首頁技術文章
文章詳情頁

Python庫skimage繪制二值圖像代碼實例

瀏覽:36日期:2022-07-30 13:50:38

二值圖像的凸殼指的是包圍輸入二值圖像白色區域的最小的凸多邊形的像素集合。

skimage中的函數

from skimage.morphology import convex_hull_imagechull = convex_hull_image(image)

完整代碼:

'''===========Convex Hull===========The convex hull of a binary image is the set of pixels included in thesmallest convex polygon that surround all white pixels in the input.A good overview of the algorithm is given on `Steve Eddin’s blog<http://blogs.mathworks.com/steve/2011/10/04/binary-image-convex-hull-algorithm-notes/>`__.'''import matplotlib.pyplot as pltfrom skimage.morphology import convex_hull_imagefrom skimage import data, img_as_floatfrom skimage.util import invert# The original image is inverted as the object must be white.image = invert(data.horse())chull = convex_hull_image(image)fig, axes = plt.subplots(1, 2, figsize=(8, 4))ax = axes.ravel()ax[0].set_title(’Original picture’)ax[0].imshow(image, cmap=plt.cm.gray)ax[0].set_axis_off()ax[1].set_title(’Transformed picture’)ax[1].imshow(chull, cmap=plt.cm.gray)ax[1].set_axis_off()plt.tight_layout()plt.show()####################################################################### We prepare a second plot to show the difference.#chull_diff = img_as_float(chull.copy())chull_diff[image] = 2fig, ax = plt.subplots()ax.imshow(chull_diff, cmap=plt.cm.gray)ax.set_title(’Difference’)plt.show()

實驗輸出

Python庫skimage繪制二值圖像代碼實例

Python庫skimage繪制二值圖像代碼實例

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持好吧啦網。

標簽: Python 編程
相關文章:
主站蜘蛛池模板: 青青黄色 | 国产日韩一区二区三区在线播放 | 国产在线麻豆一区二区 | 在线免费黄 | 57pao一国产成视频永久免费 | 日本国产在线视频 | 成年大片免费高清在线观看 | 亚洲首页在线观看 | 久久中文字幕不卡一二区 | 久久日本精品国产精品白 | 68久久久久欧美精品观看 | 麻豆md国产在线观看 | 香蕉视频在线观看网站 | 国产一区高清视频 | 亚洲三级成人 | 国产精品剧情原创麻豆国产 | 欧美日韩在线一区二区三区 | 中文字幕一区2区 | 国产精品情侣久久婷婷文字 | 色老头xxxxbbbb视频 | 欧美激情人成日本在线视频 | 高清欧美不卡一区二区三区 | 免费日韩视频 | 天天影视色香欲综合网天天录日日录 | 毛片激情 | 在线看黄色片 | 国产一级大片免费看 | 久久这里只有精品2 | 国产乱人视频免费观看 | 亚洲va老文色欧美黄大片人人 | 香蕉久久视频 | 欧美一级毛片久久精品 | 国产精品拍自在线观看 | 欧美一级成人免费大片 | 国产一级一级毛片 | 91视频免费网址 | 亚洲视频精品在线观看 | 在线观看亚洲精品专区 | 在线亚洲观看 | 国产一区二区亚洲精品 | 6699久久久久久久77777'7 66av99精品福利视频在线 |