I am using python 3 and latest version of openCV. I am trying to resize an image using the resize function provided but after resizing the image is very distorted. Code :
img = cv2.resize(img, (int(img.shape[1]/2), int(img.shape[0]/2)))
will resize the image to half the original size. You can modify it for any other ratio. Note that the first argument passed to resize() is img.shape[1], and not img.shape[0]. This may be counter-intuitive. It is easy to overlook this reversal and get a very distorted picture.