Ask Your Question

Built-in camera not automatically detected in OpenCv 2.4.2 with OpenNI

asked 2012-08-15 21:02:56 -0500

ambidextrvs gravatar image

Hi, I'm trying to get input from my laptop's built-in camera just by

VideoCapture capture;;

I also tried with different device numbers (1,2,3). However I'm getting the following error:

> CvCapture_OpenNI::CvCapture_OpenNI : Failed to enumerate production trees: Can't create any node of the requested type!

I don't have a kinect or any other camera connected to my laptop so its weird that its trying to open the kinect device instead of my built-in camera. I'm on Ubuntu 12.10 using OpenCV 2.4.2 installed with openni support.

My camera is recognized correctly with Cheese and other applications. I checked the USB devices to verify that the kinect wasn't present, and that the camera was:

ambidextrvs@zenbook:~/install/OpenCV-2.4.2$ ls -l /dev/video0 
crw-rw----+ 1 root video 81, 0 Aug 14 09:10 /dev/video0
ambidextrvs@zenbook:~/install/OpenCV-2.4.2$ ls -l /dev/v4l/
total 0
drwxr-xr-x 2 root root 60 Aug 14 09:10 by-id
drwxr-xr-x 2 root root 60 Aug 14 09:10 by-path
ambidextrvs@zenbook:~/install/OpenCV-2.4.2$ ls -l /dev/v4l/by-id/
total 0
lrwxrwxrwx 1 root root 12 Aug 14 09:10 usb-Chicony_Electronics_Co._Ltd._USB2.0_HD_UVC_WebCam_200901010001-video-index0 -> ../../video0
ambidextrvs@zenbook:~/install/OpenCV-2.4.2$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 012: ID 1bcf:0007 Sunplus Innovation Technology Inc. Optical Mouse
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 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0bda:0139 Realtek Semiconductor Corp. Card reader
Bus 002 Device 003: ID 04f2:b330 Chicony Electronics Co., Ltd

Any ideas how to get my camera working? Thanks.

edit retag flag offensive close merge delete


I installed OpenCv 2.4.2 on my UBUNTU 12.04 system. I can take images using Logitech hd720p usb webcam. But econ_ecam-32 is not working with opencv.

sumith gravatar imagesumith ( 2012-10-02 06:33:00 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-07-23 05:00:09 -0500

I've got exactly the same problem as asked here. I'm using Ubuntu 13.04 + OpenNI 1.5.4 with a Kinect.

Do you have a solution now?

Best Regards Pei

edit flag offensive delete link more


Are you using openCV A fix for camera interfacing has been released due to a critical error in openCV 2.4.6 built.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-23 05:46:30 -0500 )edit

Hi, Steven, Thank you for your prompt reply. Yup, now, I upgraded to OpenCV However, I don't know why cheese is not able to detect Kinect but with lsusb Bus 002 Device 009: ID 045e:02ad Microsoft Corp. Xbox NUI Audio Bus 002 Device 008: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor Bus 002 Device 010: ID 045e:02ae Microsoft Corp. Xbox NUI Camera

Now, OpenCV is able to start capturing from the Logitech C920 . Does that mean, I need to re-install OpenNI? oh, I'm using OpenNI 1.5.4, do I have to upgrade it to OpenNI 2.2 ?

Thanks again.

jiapei100 gravatar imagejiapei100 ( 2013-07-25 19:35:20 -0500 )edit

No idea, just knew about the critical error :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-26 03:54:20 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2012-08-15 21:02:56 -0500

Seen: 2,311 times

Last updated: Jul 23 '13