1) I get this errors while handling two logitech c310 cameras with OpenCV(updated Kubuntu Linux)
VIDIOC_STREAMON: No space left on device
Whole error log is as below
**IDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument**
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
**libv4l2: error turning on stream: No space left on device**
**VIDIOC_STREAMON: No space left on device**
OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupported array type) in cvGetMat, file /home/rjdp/Computer_Vision/0_Installers/OpenCV-2.4.2/modules/core/src/array.cpp, line 2482
terminate called after throwing an instance of 'cv::Exception'
what(): /home/rjdp/Computer_Vision/0_Installers/OpenCV-2.4.2/modules/core/src/array.cpp:2482: error: (-206) Unrecognized or unsupported array type in function cvGetMat
2) It happens only when Handling two cameras, Even at default low res 640×480. I still tried to lower resolution in code to 320×240 which also did not work.
3) I searched in lot of other posts here & on other sites. Which told me there is not enough USB cam bandwidth available. So I tried to plug one cam in front USB & one in the back side which also failed 🙁
My Question is :
Is it possible to solve this issue of bandwith/memory & run two or
more cameras together on opencv 2.4.2 ?? OpenCV uses ffmpeg to handle I/O so can i tell my camera hardware with some ffmpeg command to take input stream with compressed MPEG mode instead of bandwidth consuming normal mode.
CODE IS AS BELOW :
#include "opencv2/opencv.hpp"
#include <stdio.h>
using namespace cv;
int main(int, char**)
{
VideoCapture cap01(0); // open the default camera
cap01.set(CV_CAP_PROP_FRAME_WIDTH,320);
cap01.set(CV_CAP_PROP_FRAME_HEIGHT,240);
//sleep(1);
if(!cap01.isOpened()) // check if we succeeded
return -1;
namedWindow("Camera01",1);
VideoCapture cap02(1); // open the default camera
cap02.set(CV_CAP_PROP_FRAME_WIDTH,320);
cap02.set(CV_CAP_PROP_FRAME_HEIGHT,240);
if(!cap02.isOpened()) // check if we succeeded
return -1;
namedWindow("Camera02",1);
for(;;)
{
Mat frame, frame_1;
//Mat frame02;
cap02 >> frame;
imshow("Camera01", frame);
if(waitKey(30) >= 0) break;
Mat frame_1;
cap02 >> frame_1;
imshow("Camera02", frame_1);
if(waitKey(30) >= 0) break;
}
return 0;
}
Using PCI usb extension card solved the same problem for me since a webcam accupies all available bandwith on usb bus. Using pci usb extension card provides you with second usb bus which you can connect your second webcam