0

I'm trying to write a simple python script to capture an image from a webcam using OpenCV. This is running on Ubuntu 11.10 32-bit.

when I run lsusb in the terminal i get:

Bus 002 Device 002: ID 045e:00f7 Microsoft Corp. LifeCam VX-1000

Which leads me to believe that the driver for the camera is installed

In a python shell I type: capture=cv.CaptureFromCAM(0) # also tried -1, 1, 2, 3

but capture is always null.

I also tried: capture = cv.CreateCameraCapture(0)

But i get the same results.

Would appreciate any help

Cheers,

2 Answers 2

1

Merely probing the driver does not validate that the camera will work.

Here is a ubuntu support page on testing your camera with vlc

Basically you should try something like :

$ vlc v4l2:///dev/video0
Sign up to request clarification or add additional context in comments.

Comments

0

I don't think this camera is supported by OpenCV.

OpenCV has a compatibility list, check if yours is there.

1 Comment

Thank you for that. I'll try a different hardware and see if the problem persists. The list you pointed out is very useful

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.