March 2018
Beginner to intermediate
306 pages
9h 54m
English
For this recipe, we need the following steps to be executed:
img = cv2.imread('../data/Lena.png')print('original image shape:', img.shape)
width, height = 128, 256resized_img = cv2.resize(img, (width, height))print('resized to 128x256 image shape:', resized_img.shape)
w_mult, h_mult = 0.25, 0.5resized_img = cv2.resize(img, (0, 0), resized_img, w_mult, h_mult)print('image shape:', resized_img.shape)