用Python进行图像赋值,在1RGB基础上,加入光流两个通道,代码如下所示: import numpy as np import cv2 import matplotlib.pyplot as plt path = 'frame_00003_rgb.png' img = cv2.imread(path) img1 = np.zeros([480, 640, 5]) img1[:, :, 0:3] = np.array(img) cv2.imshow('test1', np.array(img)[:,:,2]) cv2.imshow('test2', img1[:, :, 0]) cv2.w