Goeduhub:- AI, ML, HADOOP, Python and IOT Training provider.
Register for Free Certified Workshop on AI & Machine Learning :: 26-01-2020 || Career options for aspiring CS/IT, ECE, EE or EIC or EEE Engineers
0 like 0 dislike
4 views

1 Answer

0 like 0 dislike
by (6.7k points)
 
Best answer

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

# Import Computer Vision package - cv2
import cv2

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

# Read the image using imread built-in function
image = cv2.imread('image_2.jpg')

# Display original image using imshow built-in function
cv2.imshow("Original", image)

# Wait until any key is pressed
cv2.waitKey()

# cv2.resize(image, output image size, x scale, y scale, interpolation)

# Scaling using cubic interpolation


scaling_cubic = cv2.resize(image, None, fx=.75, fy=.75, interpolation = cv2.INTER_CUBIC)

# Display cubic interpolated image
cv2.imshow('Cubic Interpolated', scaling_cubic)

# Wait until any key is pressed
cv2.waitKey()

# Scaling using area interpolation


scaling_skewed = cv2.resize(image, (600, 300), interpolation = cv2.INTER_AREA)

# Display area interpolated image
cv2.imshow('Area Interpolated', scaling_skewed) 

# Wait until any key is pressed
cv2.waitKey()

# Scaling using linear interpolation


scaling_linear  = cv2.resize(image, None, fx=0.5, fy=0.5, interpolation = cv2.INTER_LINEAR)

# Display linear interpolated image
cv2.imshow('Linear Interpolated', scaling_linear) 

# Wait until any key is pressed
cv2.waitKey()

# Close all windows
cv2.destroyAllWindows()

|| New Year Discount on summer training-2020 ||

20% OFF | on all summer training courses

|| Offer valid till 31-JAN-2020 (Extended Date) ||

Courses & Fee

  1. Augmented Reality & Virtual Reality - INR 15000/-
  2. AI, ML & Deep Learning - INR 12000/-
  3. Robotic Process Automation (RPA) - INR 12000/-
  4. Big Data HADOOP - INR 12,000/-
  5. Internet of Things (IoT) - INR 10,000/-
  6. Web development using python (Django) - INR 8000/-
  7. Industrial Automation (PLC-SCADA) - INR 8000/- 

Limited time offer !! Hurry up!!

[[ CALL - 07976731765 ]]

Register for Training

 Go to your Branch CSE or IT | ECE | EE, EIC or EEEMECE
 Know About Popular Colleges/Universities  List of IITsList of NITs | RTU-KOTA | Manipal University-Jaipur | JECRC University | Amity University Jaipur | BIT Mesra-Jaipur | MODY UNIVERSITY | LNMIIT-Jaipur | JK Lakshmipat | Banasthali Vidyapith | POORNIMA University
 Exams:   List of Exams After Graduation | List of Engineering Entrance Examinations (UG/PG) | JEE Main | JEE Advanced | GATE | IES | ISROList of PSUs
Placements:  List of companies | Logical Reasoning Questions | Quantitative Aptitude Questions | General English Questions | Technical-MCQ and Interview Questions
 Download Previous Year Papers For:  GATE | IES | RAJASTHAN TECHNICAL UNIVERSITY (RTU-Kota)RPSC Technical Exams | ISRO
 Online Free Training:  Artificial Intelligence(AI) & Machine Learning | Python Programming | Internet of Things-IoT | OpenCV (Open Source Computer Vision Library) | LINUX | Big Data : Hadoop | 
 Goeduhub
About Us | Contact Us   Social::   |  | 
...