It anyone else stumbles on this the solution is:

sudo rmmod uvcvideo && sudo modprobe uvcvideo nodrop=1 timeout=5000

On Thursday, 18 February 2016 11:29:50 UTC+11, joelk wrote:
>
> Has anybody managed to capture video from a usb webcam on a BBB with any 
> recent Linux distribution using OpenCV cv::VideoCapture functions?
>
> I'm using a Logitech C615 which works perfectly with OpenCV on x86 PCs and 
> on a Raspberry Pi 2 (a little slow but it works) running the latest 
> Raspbian Jessie image.
>
> But I haven't yet managed to get anything but completely black images 
> running the same program on my BBB.  I've tried it with a recent Arch Linux 
> image.  I've tried Ubuntu 14.04, Debian 7.9 and 8.3 (with a few different 
> kernels) from BeagleBoard.  Nothing!  No problems doing anything else in 
> OpenCV -- it can load and display individual images and videos from files, 
> just not from the camera.  And in all of these installations I can capture 
> video from the camera with other programs (using v4l2) -- just not with 
> OpenCV.
>
> I've seen Derek Molloy's videos demonstrating use of OpenCV on a BBB -- 
> but he was running it under Angstrom, and as far as I can see the last 
> Angstrom distro was at least 3 years ago.
>
> Any suggestions for something more recent?
>
> By the way, here's a sample of a program that's fails to capture any video 
> on the BBB (it displays the frame size and then just gives a series of 
> "select timeout" messages):
>
>
> #include <iostream>
>> #include <opencv2/highgui/highgui.hpp>
>>
>> int main(int argc, char *argv[]) {
>>   cv::VideoCapture cap;
>>
>>   cap.open(0);
>>
>>   if(!cap.isOpened()) {
>>     std::cout << "Did not connect to camera."  << std::endl;;
>>     return -1;
>>   }
>>
>>   double dWidth = cap.get(CV_CAP_PROP_FRAME_WIDTH);
>>   double dHeight = cap.get(CV_CAP_PROP_FRAME_HEIGHT);
>>
>>   std::cout << "Frame size: " << dWidth << " x " << dHeight << std::endl;
>>   cv::namedWindow("MyVideo",CV_WINDOW_AUTOSIZE);  
>>
>>   while(1) {
>>     cv::Mat frame;
>>     bool bSuccess = cap.read(frame);
>>     if(!bSuccess) {
>>       std::cout << "failed to read frame" << std::endl;
>>       break;
>>     }
>>     cv::imshow("MyVideo", frame);
>>     if(cv::waitKey(30) >= 0) break;
>>   }
>>     
>>   return 0;
>> }
>>
>
> Can't get much simpler than that.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/118adc3c-9ed4-4fd7-bf69-e56a4e713c54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to