July 2020
Intermediate to advanced
568 pages
9h 51m
English
Solution:
# Load modules
import cv2
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
Note
Before proceeding, ensure that you can change the path to the images (highlighted) based on where the image is saved in your system.
The code is as follows:
# Load image
img = cv2.imread("../data/lion.jpg")
plt.imshow(img[:,:,::-1])
plt.show()
The output is as follows:

Figure 1.42: Image ...
Read now
Unlock full access