c++ - libv4l2 error : No space left on device -
i have 2 different cameras. used below simple code , error. there similar question on site there isn't accepted answer. error message :
libv4l2: error turning on stream: no space left on device vidioc_streamon: no space left on device opencv error: assertion failed (size.width>0 && size.height>0) in imshow, file /home/opencv/opencv-2.4.10/modules/highgui/src/window.cpp, line 269
code :
videocapture cap(2); videocapture cap2(1); if(!cap.isopened()) // check if succeeded { cout << "webcam cannot open!\n" ; return -1; } if(!cap2.isopened()) // check if succeeded { cout << "webcam2 cannot open!\n" ; return -1; } namedwindow( "window1", cv_window_autosize ); namedwindow( "window2", cv_window_autosize ); for(;;) { ikey = waitkey(5); if (ikey == esc) { break; } cap >> frame; cap2 >> frame2; imshow("window1", frame); imshow("window2", frame2); }
edit 1 these camera use same hub according search on web.i did test , output below. don't understand should solve problem.
sudo cat /sys/kernel/debug/usb/devices | grep "b: " b: alloc= 0/900 ( 0%), #int= 0, #iso= 0 b: alloc= 37/900 ( 4%), #int= 2, #iso= 0 b: alloc= 0/900 ( 0%), #int= 0, #iso= 0 b: alloc= 0/900 ( 0%), #int= 0, #iso= 0 b: alloc= 0/900 ( 0%), #int= 0, #iso= 0 b: alloc= 0/900 ( 0%), #int= 0, #iso= 0 b: alloc= 0/800 ( 0%), #int= 0, #iso= 0 b: alloc= 0/800 ( 0%), #int= 0, #iso= 0
i got same problem 2 depth sense cameras (usb) on 2 usb ports next each other. used same usb bus inside , much, switched 1 usb 3.0 port (which bus) , works.
Comments
Post a Comment