April 2018
Beginner
552 pages
13h 58m
English
import cv2
import numpy as np
image = cv2.imread('image_4.jpg')
cv2.imshow("Original", image)
cv2.waitKey(0)
# np.ones(shape, dtype) # 5 x 5 is the dimension of the kernel, uint8: is an unsigned integer (0 to 255) kernel = np.ones((5,5), dtype = "uint8")
# cv2.erode(image, kernel, iterations) erosion = cv2.erode(image, kernel, iterations = 1)