I have the following RGB image imRGB
import cv2
import matplotlib.pyplot as plt
#Loading the RGB image
imRGB = cv2.imread('*path*')
imRGB.shape
>>(128L, 128L, 3L)
#plotting
plt.imshow(imRGB)
I convert this to a grayscale image imGray
imGray = cv2.cvtColor(imRGB, cv2.COLOR_BGR2GRAY)
imGray.shape
>>(128L, 128L)
#plotting
plt.imshow(imGray)
Question: Why does the grayscale image imGray
is shown in color?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…