September 2019
Intermediate to advanced
420 pages
10h 29m
English
By performing the following steps, you will be able to visualize the true-color palette of a color image:
In [1]: import cv2... import numpy as np... lena = cv2.imread('data/lena.jpg', cv2.IMREAD_COLOR)
In [2]: import matplotlib.pyplot as plt... %matplotlib inline... plt.style.use('ggplot')
In [3]: plt.rc('axes', **{'grid': False})
In [4]: plt.imshow(cv2.cvtColor(lena, cv2.COLOR_BGR2RGB)) ...
Read now
Unlock full access