代码 :
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
分别显示R,G,B 通道图片
image=np.asarray(image)
pic_red=image[:,:,0]
pic_green=image[:,:,1]
pic_b=image[:,:,2]
plt.figure(1)
plt.figure()
f,axarr=plt.subplots(3,1)
axarr[0].imshow(pic_red)
axarr[1].imshow(pic_green)
axarr[2].imshow(pic_b)
4. 方法二:
plt.subplot(311)
plt.imshow(pic_red)
plt.subplot(312)
plt.imshow(pic_green)