newHeight = 500.0
oldHeight = image.shape[0]
oldWidth = image.shape[1]
r = newHeight / oldHeight
newWidth = int(oldWidth * r)
dim = newHeight, newWidth
image = cv2.resize(image, dim, interpolation=cv2.INTER_AREA)
aspectRatio = image.shape[1] / image.shape[0]
Resizing an image in open cv