OpenCv with c930e logitech webcam

Here is the situation:

we managed to get the camera to work with OpenCv 2.4.0 and Qt 5.0.2. It is estimated that the camera will be able to record 1080p video at 30 frames per second.

However, we are stuck at 10 frames per second when recording at 1920x1080.

Here is the code we use:

Capture cv::VideoCapture; Capture.open(0); Capture.set(CV_CAP_PROP_FRAME_WIDTH, 1920): Capture.set(CV_CAP_PROP_FRAME_HEIGHT, 1080); 

We already tried to use this command (which we got from 1080p Capture at 30 frames per second from logitech c920 using openCV 2.4.3 ):

 Capture.set(CV_CAP_PROP_FOURCC, 'M', 'J', 'P', 'G'); 

but without any success.

We believe that the camera stream can be captured in h264 (thanks to the internal conversion of the camera) or in mjpg.

As we said, we are a little confused / lost.

Any suggestion is welcome! Thanks

+4
source share
1 answer

The solution to your problem was already mentioned in another question that you contacted: before installing the required permission, you must install the codec:

 Capture cv::VideoCapture; Capture.open(0); Capture.set(CV_CAP_PROP_FOURCC, CV_FOURCC('M','J','P','G')) Capture.set(CV_CAP_PROP_FRAME_WIDTH, 1920): Capture.set(CV_CAP_PROP_FRAME_HEIGHT, 1080); 
+1
source

Source: https://habr.com/ru/post/1502041/


All Articles