我正在为Raspbian(Raspberry Pi 2)中的Python开发视频捕获脚本,由于在内存映射缓冲区方面没有成功,因此无法为v4l2使用Python绑定。
我需要的:
我尝试过的
我读过的东西:
我的问题:
这是我的(缓慢的)OpenCV工作示例:
import cv2
import time
video = cv2.VideoCapture(0)
print 'Starting video-capture test...'
t0 = time.time()
for i in xrange(100):
success, image = video.read()
ret, jpeg = cv2.imencode('.jpg',image)
t1 = time.time()
t = ( t1 - t0 ) / 100.0
fps = 1.0 / t …Run Code Online (Sandbox Code Playgroud)