使用 OpenCV 与 Python 绑定,执行以下代码时:
import cv2
cap = cv2.VideoCapture('video.mp4')
while (cap.isOpened()):
ret, frame = cap.read()
# ...
# ...
Run Code Online (Sandbox Code Playgroud)
我如何知道frame[:, :, 0]、frame[:, :, 1]和中的每个颜色通道是哪个颜色通道frame[:, :, 2]。我的意思是,RGB、RBG、GBR、GRB、BRG 还是 BGR?
非常感谢!