Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Camera is not working in OpenCV on Ubuntu 12.04 with version 2.3.1 or 2.4.2

I have tried to build the example but am getting a NULL when trying to capture the device.

Feel free to grab my code here at test for yourself:

The camera works fine as I'm able to use it with Cheese, Guvcview. I have tested a lot of variations to the cvCaptureFromCAM( CV_CAP_ANY ), as in 0,1,2,-1, etc. I also tried using the VideoCapture function, but doesn't appear to be working.

I'm not sure what I need to do to get it working. I've tried building OpenCV 2.3.1 and 2.4.2 from source, everything builds fine, I can import in python, just can't seem to get the webcam to work. I have also tested a few external logitech webcams I have laying around. Any help would be appreciated.