【发布时间】:2019-06-12 11:21:50
【问题描述】:
我的 FPB 较低 ~5,我在不同的相机罗技 c270 和罗技 9000 上检查了此代码,情况相同。
我完成了关于关闭右灯等的所有提示。
import urllib.request as urllib
import cv2
import numpy as np
import time
while True:
# Use urllib to get the image and convert into a cv2 usable format
cap = cv2.VideoCapture(0)
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
hiegh = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
ret, frame = cap.read()
# put the image on screen
cv2.imshow('Webcam', frame)
if cv2.waitKey(1) & 0xFF == 27:
break
cap.release()
cv2.destroyAllWindows()
提高FPS应该怎么做?
【问题讨论】:
-
你在另一台机器上测试过这个吗?
-
你为什么在里面提到了
urllib?您是否以某种方式通过“网络”阅读?
标签: python opencv camera frame-rate