Accessing Microsoft Webcam with OpenCV

848 views
Skip to first unread message

Mustafa Aldemir

unread,
Nov 28, 2011, 9:53:16 AM11/28/11
to beagl...@googlegroups.com
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(TM)
[ 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

djlewis

unread,
Nov 28, 2011, 10:32:28 AM11/28/11
to Beagle Board
have you tried the camera with other programs? mplayer, gstreamer
etc...
This might eliminate opencv library and your code as the culprit.

djlewis
---------

Mustafa Aldemir

unread,
Nov 28, 2011, 11:43:05 AM11/28/11
to beagl...@googlegroups.com

2011/11/28 djlewis <djl...@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?

Mustafa Aldemir

unread,
Nov 29, 2011, 9:14:10 AM11/29/11
to beagl...@googlegroups.com
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 <mus...@aldemir.net>

Robert Nelson

unread,
Nov 29, 2011, 12:57:24 PM11/29/11
to beagl...@googlegroups.com
On Tue, Nov 29, 2011 at 8:14 AM, Mustafa Aldemir <mus...@aldemir.net> wrote:
> 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?

you should see /dev/video*

and the driver loaded in: lsmod

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Mustafa Aldemir

unread,
Nov 29, 2011, 5:24:45 PM11/29/11
to beagl...@googlegroups.com
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 <robert...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Beagle Board" group.
To post to this group, send email to beagl...@googlegroups.com.
To unsubscribe from this group, send email to beagleboard...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en.


Mustafa Aldemir

unread,
Dec 2, 2011, 10:59:35 AM12/2/11
to beagl...@googlegroups.com
2011/11/30 Mustafa Aldemir <mus...@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

Reply all
Reply to author
Forward
0 new messages