Accessing Microsoft Webcam with OpenCV

Hello,

I am trying to access my webcam with OpenCV. I installed OpenCV, and the samples are working fine. But I can’t make the webcam work. It’s a Microsoft LifeCam Cinema. I know that there are some issues with it (http://www.ideasonboard.org/uvc/#footnote-13) but it’s said to be working.

Here is the output of dmesg:
[ 8925.347137] usb 2-2.4.3: new high speed USB device using ehci-omap and address 8
[ 8925.489044] usb 2-2.4.3: New USB device found, idVendor=045e, idProduct=075d
[ 8925.496490] usb 2-2.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8925.504333] usb 2-2.4.3: Product: Microsoft�� LifeCam Cinema™
[ 8925.510528] usb 2-2.4.3: Manufacturer: Microsoft
[ 8926.635742] 8:3:1: cannot get freq at ep 0x82

and here is the output of lsusb:

lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 002 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 002 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 002 Device 005: ID 04d9:1603 Holtek Semiconductor, Inc.
Bus 002 Device 006: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 002 Device 008: ID 045e:075d Microsoft Corp.

I installed v4l-utils, libv4l-dev and kernel-module-uvcvideo with opkg. I don’t see uvcvideo module in the lsmod output. Should I do something else to load the module?

lsmod

Module Size Used by
ipv6 249063 10

In my program, the function cvCaptureFromCAM() is always failing.
CvCapture * capture;
capture = cvCaptureFromCAM(-1);

Do you have any recommendations?

best wishes,
Mustafa

have you tried the camera with other programs? mplayer, gstreamer
etc...
This might eliminate opencv library and your code as the culprit.

djlewis

2011/11/28 djlewis <djlewis@tcworks.net>

have you tried the camera with other programs? mplayer, gstreamer
etc…
This might eliminate opencv library and your code as the culprit.

djlewis

Hi,

I installed mplayer, gstreamer and vlc. But I don’t know the video device name.

I installed cheese, it says “No device found.” May it be related to the kernel module?

Hello,

I tried with another webcam (Logitech C310) But the webcam still can not be found.

How can I be sure that the module is loaded correctly? Should I install a driver or something?

bye,
Mustafa

2011/11/28 Mustafa Aldemir <mustafa@aldemir.net>

you should see /dev/video*

and the driver loaded in: lsmod

Regards,

no, there is no device like /dev/video*

and the driver is not listed with lsmod. I installed it with the command “opkg install kernel-module-uvcvideo” Should I install something else? Or activate it somehow?

best wishes,

2011/11/29 Robert Nelson <robertcnelson@gmail.com>

2011/11/30 Mustafa Aldemir <mustafa@aldemir.net>

no, there is no device like /dev/video*

and the driver is not listed with lsmod. I installed it with the command “opkg install kernel-module-uvcvideo” Should I install something else? Or activate it somehow?

best wishes,

I have discovered that kernel-module-uvcvideo package contains the driver (uvcvideo) but does not automatically load it. I loaded it with the command:

insmod /lib/modules/2.6.32/kernel/drivers/media/video/uvc/uvcvideo.ko

Then, to load it every time the BB boots, I created a file under /etc/modutils and updated the modules.

echo “uvcvideo” > /etc/modutils/uvcvideo

update-modules