三个摄像头 如何设置按多少秒(或帧),或者抓取张数来保存图片
sysRun = 1
while sysRun == 1:
ret1, frame1 = cap1.read()
img1 = cv2.resize(frame1,(200,200))
# cv2.imshow(ip1,frame1)
ret2, frame2 = cap2.read()
img2 = cv2.resize(frame2,(200,200))
# cv2.imshow(ip2,frame2)
ret3, frame3 = cap3.read()
img3 = cv2.resize(frame3,(200,200))
# cv2.imshow(ip3,frame3)
image = np.hstack((img1,img2,img3))
cv2.imshow('camera',image)
#按下q键关闭窗体
if cv2.waitKey(1) & 0xFF == ord('q'):
break
time.sleep延时或者time.datetime时间戳判断经过的时间