Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Image Resizing | Fundamentals of Image Manipulation with Python
Fundamentals of Image Manipulation with Python
course content

Course Content

Fundamentals of Image Manipulation with Python

bookImage Resizing

In OpenCV, image resizing is the process of changing the size of an image. This is done by either increasing or decreasing the number of pixels in the image. The cv2.resize() function is used to perform this operation.

The function requires three parameters: the image to be resized, the desired size of the output image (specified as a tuple of width and height), and an interpolation method. Although there is a default interpolation method, specifying one explicitly can help determine how the pixel values of the new image will be computed based on those of the original image.

Task
test

Swipe to show code editor

  1. Read the image image1.jpg.
  2. Resize this image in various ways using the correct function.
  3. When stretching the image, specify interpolation=cv2.INTER_LINEAR.

Mark tasks as Completed
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

In OpenCV, image resizing is the process of changing the size of an image. This is done by either increasing or decreasing the number of pixels in the image. The cv2.resize() function is used to perform this operation.

The function requires three parameters: the image to be resized, the desired size of the output image (specified as a tuple of width and height), and an interpolation method. Although there is a default interpolation method, specifying one explicitly can help determine how the pixel values of the new image will be computed based on those of the original image.

Task
test

Swipe to show code editor

  1. Read the image image1.jpg.
  2. Resize this image in various ways using the correct function.
  3. When stretching the image, specify interpolation=cv2.INTER_LINEAR.

Mark tasks as Completed
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 1. Chapter 5
AVAILABLE TO ULTIMATE ONLY
We're sorry to hear that something went wrong. What happened?
some-alt