March 2019
Intermediate to advanced
532 pages
13h 2m
English
height, width = image.shape[:2]M = np.float32([[1, 0, 150], [0, 1, 300]])dst_image = cv2.warpAffine(image, M, (width, height))
height, width = image.shape[:2]M = cv2.getRotationMatrix2D((width / 2.0, height / 2.0), 30, 1)dst_image = cv2.warpAffine(image, M, (width, height))
kernel = np.ones((5, 5), np.float32) / 25smooth_image = cv2.filter2D(image, -1, ...