特徴検出

Python による生体医療画像解析

Stephen Bailey

Instructor

エッジ:輝度の急激な変化

エッジ検出用カーネル

Python による生体医療画像解析
im=imageio.imread('foot-xray.jpg')

weights = [[+1, +1, +1], [ 0, 0, 0], [-1, -1, -1]]
edges = ndi.convolve(im, weights)
plt.imshow(edges, cmap='seismic')

足のエッジ

Python による生体医療画像解析

Sobelフィルター

Sobel水平フィルター

Sobel垂直フィルター

Python による生体医療画像解析

Sobelフィルター

ndi.sobel(im, axis=0)

水平エッジ

ndi.sobel(im, axis=1)

垂直エッジ

Python による生体医療画像解析

Sobelフィルターのマグニチュード

水平・垂直エッジデータを距離計算で統合:

$$z = \sqrt{x^2 + y^2}$$

edges0=ndi.sobel(im, axis=0)
edges1=ndi.sobel(im, axis=1)

edges=np.sqrt(np.square(edges0) + 
              np.square(edges1))
plt.imshow(edges, cmap='gray')

結合エッジ

Python による生体医療画像解析

練習しましょう!

Python による生体医療画像解析

Preparing Video For Download...