我尝试在控制台中打印摄像机捕获的实时矩阵,它显示的所有内容都是0元素矩阵,但是当我读取随机图像并尝试打印图像矩阵时,它起作用了:< / p>
import cv2 , time
#THIS IS THE IMAGE AI READ
image = cv2.imread("C:\\Users\\user\\Desktop\\LionKing.jpg")
print("Your image matrix is :",image)
#This is the capture
video = cv2.VideoCapture(0)
check, frame = video.read()
print(check)
print("Your capture matrix is :",frame)
video.release()
print(frame)
的结果: