In this section, we will see the various transformations on an image, and how to implement them in OpenCV.
Scaling is the resizing of the image, which can be accomplished by the
cv2.resize() function. It takes image, scaling factor, and interpolation method as inputs.
The interpolation method parameter can have any one of the following values:
INTER_LINEAR: This deals with bilinear interpolation (default value)
INTER_NEAREST: This deals with the nearest-neighbor interpolation
INTER_AREA: This is associated with resampling using pixel area relation (preferred for shrinking)
INTER_CUBIC: This deals with bicubic interpolation over 4 x 4 pixel neighborhood (preferred for zooming)
INTER_LANCZOS4: This deals with Lanczos interpolation ...