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 :
If you need to modify the image resolution and keep your aspect ratio use the function imutils (check documentation). something like this:
img = cv2.imread(file , 0) img = imutils.resize(img, width=1280) cv2.imshow('image' , img)
hope that helps, good luck !