Ask Your Question

Revision history [back]

Use 2 cameras simultaneously

Hello I try use 2 webcams in opencv 3.10 simultaneously

It seems that framerate drops down from 25 fps to ~ 20 fps on one webcam and from 30 to ~20 fps on the other. If I comment all code relevant to one of the webcams fps comes back to 25 fps or 30 fps depending on webcam.

I tried different methods

VideoCapture >> UMat; //or
VideoCapture.grab(); VideoCapture.retrive();

Also I tried to grab fames in different threads using std::async.

The result is always the same.

The code is simple loop with waitKey(30) and imshow

Platform: Windows 10 x64 Visual Studio 2015 community, 
Build type is win32