1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        MahotasPython圖像處理

        聯(lián)合創(chuàng)作 · 2023-09-29 18:02

        Mahotas 是一個 Python 的圖像處理庫,包含大量的圖像處理算法,使用 C++ 實現(xiàn)的算法,處理性能相當好。

        示例代碼:

        import numpy as np
        import mahotas
        import pylab
        
        img = mahotas.imread('test.jpeg')
        T_otsu = mahotas.thresholding.otsu(img)
        seeds,_ = mahotas.label(img > T_otsu)
        labeled = mahotas.cwatershed(img.max() - img, seeds)
        
        pylab.imshow(labeled)

        計算距離變換:

        import pylab as p
        import numpy as np
        import mahotas
        
        f = np.ones((256,256), bool)
        f[200:,240:] = False
        f[128:144,32:48] = False
        # f is basically True with the exception of two islands: one in the lower-right
        # corner, another, middle-left
        
        dmap = mahotas.distance(f)
        p.imshow(dmap)
        p.show()

        瀏覽 21
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        評論
        圖片
        表情
        推薦
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            色骚骚aⅴ| 玖玖视频 | 日韩中文字幕第一页 | 乳妇喂奶被强伦子 | 精品国产精品一区二区夜夜嗨 | 我把女的日出白液视频 | 影音男人 | 嫩草午夜少妇在线影视 | 麻豆国产一区二区 | 免费一级A毛片夜夜看 |