img = cv2 . imread. (‘dige. png’)
cv2.imshow(‘img’. img)
cv2.waitkey(0)
cv2.destroy摧毁 All windows()
kernel 内核= np. ones(5.5. np.ntf8)
erosin.腐蚀=cv2. erode侵蚀(img.kernel.iterations=1)
eration作用
cv2.imshow(‘erosin’. erosin)
cv2.waitkey(0)
cv2.destroy摧毁 All windows()