# Scaling (Resizing) Images - Cubic, Area, Linear Interpolations
# Interpolation is a method of estimating values between known data points 

import cv2

import numpy as np # Import Numerical Python package - numpy as np

image = cv2.imread('image_2.jpg')

cv2.imshow("Original", image)

cv2.waitKey()

scaling_cubic = cv2.resize(image, None, fx=.75, fy=.75, interpolation = cv2.INTER_CUBIC) # cv2.resize(image, output image size, x scale, y scale, interpolation), Scaling using cubic interpolation

cv2.imshow('Cubic Interpolated', scaling_cubic)

cv2.waitKey()

scaling_skewed = cv2.resize(image, (600, 300), interpolation = cv2.INTER_AREA) # Scaling using area interpolation

cv2.imshow('Area Interpolated', scaling_skewed) 

cv2.waitKey()

scaling_linear  = cv2.resize(image, None, fx=0.5, fy=0.5, interpolation = cv2.INTER_LINEAR) # Scaling using linear interpolation

cv2.imshow('Linear Interpolated', scaling_linear) 

cv2.waitKey()

cv2.destroyAllWindows() # Close all windows

96bb7710e6c07fb2813b0f720cd33f02b52ce053
<mask token>

<mask token>
cv2.imshow('Original', image)
cv2.waitKey()
<mask token>
cv2.imshow('Cubic Interpolated', scaling_cubic)
cv2.waitKey()
<mask token>
cv2.imshow('Area Interpolated', scaling_skewed)
cv2.waitKey()
<mask token>
cv2.imshow('Linear Interpolated', scaling_linear)
cv2.waitKey()
cv2.destroyAllWindows()

<mask token>
image = cv2.imread('image_2.jpg')
cv2.imshow('Original', image)
cv2.waitKey()
scaling_cubic = cv2.resize(image, None, fx=0.75, fy=0.75, interpolation=cv2
    .INTER_CUBIC)
cv2.imshow('Cubic Interpolated', scaling_cubic)
cv2.waitKey()
scaling_skewed = cv2.resize(image, (600, 300), interpolation=cv2.INTER_AREA)
cv2.imshow('Area Interpolated', scaling_skewed)
cv2.waitKey()
scaling_linear = cv2.resize(image, None, fx=0.5, fy=0.5, interpolation=cv2.
    INTER_LINEAR)
cv2.imshow('Linear Interpolated', scaling_linear)
cv2.waitKey()
cv2.destroyAllWindows()

import cv2
import numpy as np
image = cv2.imread('image_2.jpg')
cv2.imshow('Original', image)
cv2.waitKey()
scaling_cubic = cv2.resize(image, None, fx=0.75, fy=0.75, interpolation=cv2
    .INTER_CUBIC)
cv2.imshow('Cubic Interpolated', scaling_cubic)
cv2.waitKey()
scaling_skewed = cv2.resize(image, (600, 300), interpolation=cv2.INTER_AREA)
cv2.imshow('Area Interpolated', scaling_skewed)
cv2.waitKey()
scaling_linear = cv2.resize(image, None, fx=0.5, fy=0.5, interpolation=cv2.
    INTER_LINEAR)
cv2.imshow('Linear Interpolated', scaling_linear)
cv2.waitKey()
cv2.destroyAllWindows()

# Scaling (Resizing) Images - Cubic, Area, Linear Interpolations
# Interpolation is a method of estimating values between known data points 

import cv2

import numpy as np # Import Numerical Python package - numpy as np

image = cv2.imread('image_2.jpg')

cv2.imshow("Original", image)

cv2.waitKey()

scaling_cubic = cv2.resize(image, None, fx=.75, fy=.75, interpolation = cv2.INTER_CUBIC) # cv2.resize(image, output image size, x scale, y scale, interpolation), Scaling using cubic interpolation

cv2.imshow('Cubic Interpolated', scaling_cubic)

cv2.waitKey()

scaling_skewed = cv2.resize(image, (600, 300), interpolation = cv2.INTER_AREA) # Scaling using area interpolation

cv2.imshow('Area Interpolated', scaling_skewed) 

cv2.waitKey()

scaling_linear  = cv2.resize(image, None, fx=0.5, fy=0.5, interpolation = cv2.INTER_LINEAR) # Scaling using linear interpolation

cv2.imshow('Linear Interpolated', scaling_linear) 

cv2.waitKey()

cv2.destroyAllWindows() # Close all windows
