OpenCV: VideoCapture::get(CV_CAP_PROP_FPS) returns 0 FPS

前端 未结 4 2095
温柔的废话
温柔的废话 2020-12-17 17:49

I am trying to get the fps from my camera so that I can pass it to the VideoWriter for outputting the video. However, I am getting 0 fps by calling VideoC

4条回答
  •  半阙折子戏
    2020-12-17 18:54

    CV_CAP_PROP_FPS only works on videos as far as I know. If you want to capture video data from a webcam you have to time it correctly yourself. For example use a timer to capture a frame from the webcam every 40ms and then save as 25fps video.

提交回复
热议问题