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

Course Content

Fundamentals of Image Manipulation with Python

bookImport and Show the Image

In order to read (import) an image in Python with the OpenCV library, you can use the cv2.imread() function. This function takes one parameter, which is the file path of the image you want to import. The function returns the image as a NumPy array, which can then be used for further processing.

Task
test

Swipe to show code editor

  1. Import the cv2 library and the pyplot module of matplotlib with plt alias.
  2. Read the image "image1.jpg".
  3. Show the image as a plot.

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 order to read (import) an image in Python with the OpenCV library, you can use the cv2.imread() function. This function takes one parameter, which is the file path of the image you want to import. The function returns the image as a NumPy array, which can then be used for further processing.

Task
test

Swipe to show code editor

  1. Import the cv2 library and the pyplot module of matplotlib with plt alias.
  2. Read the image "image1.jpg".
  3. Show the image as a plot.

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 2
AVAILABLE TO ULTIMATE ONLY
We're sorry to hear that something went wrong. What happened?
some-alt