■ binary_erosion 함수에서 침식(Erosion) 필터를 사용하는 방법을 보여준다.
▶ 예제 코드 (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) erosionImageNDArray = morphology.binary_erosion(grayscaleImageNDArray) io.imshow(erosionImageNDArray) io.show() |