This function resizes the image down to or up to the specified size.
cv2.resize(src, dsize[, dst[, fx[, fy[,interpolation]]]]) → dst
cv2.CV_8U, cv2.CV_16U, cv2.CV_16S, cv2.CV_32F or cv2.CV_64F.dsize = Size(round(fx * src.cols), round(fy * src.rows)).(double)dsize.width/src.cols. Default is 0. (double)dsize.height/src.rows. Default is 0.cv2.INTER_*): Interpolation method. INTER_LINEAR is default. Choose from:
Resizing, by default, does only change the width and height of the image. The aspect ratio can be preserved or not, based on the requirement.
dsize or both fx and fy must be non-zero.dst type or size are not taken into account. Instead the size and type are derived from the src, dsize, fx, and fy.