■ binary_dilation 함수에서 팽창(Dilation) 필터를 사용하는 방법을 보여준다.
▶ 예제 코드 (PY)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import matplotlib from skimage import color from skimage import data from skimage import io from skimage import morphology matplotlib.use("TkAgg") io.use_plugin("matplotlib") imageNDArray = io.imread("source.png") grayscaleImageNDArray = color.rgb2gray(imageNDArray) dilationImageNDArray = morphology.binary_dilation(grayscaleImageNDArray) io.imshow(dilationImageNDArray) io.show() |