특징 검출

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...