OpenCV Video capture and fps problem

前端 未结 4 1828
时光取名叫无心
时光取名叫无心 2021-01-06 23:53

I\'m capturing video from my webcam using OpenCV on MacOSX. It works fine but when I try to play on QuickTime my captured video it plays too fast. i.e. I capture from camera

4条回答
  •  醉酒成梦
    2021-01-07 00:08

    I was having similar performance as you mentioned (about 10fps) and found that successive retrieveFrame() calls were taking forever. I found that getCaptureProperty(CV_CAP_PROP_FPS) was at a default value of 0. I changed this value to 25 using setCaptureProperty(CV_CAP_PROP_FPS,25.0) and was able to capture much faster.

提交回复
热议问题