Is it possible to read webcam frames in parallel?

百般思念 提交于 2019-12-02 11:29:32

When waiting for the first frame to be completely read before starting plenty of threads, the VIDIOC_QBUF: Invalid argument goes away!

...
try: 
    ret, frame = cap.read()
    while(cap.isOpened()):
        thread = MyThread()
        thread.start()
        threads.append(thread)
        time.sleep(0.035)
...

Note that even if all the CPU cores are being used with this algorithm, the maximum FPS I have been able to reach is 24.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!