Built-in camera not automatically detected in OpenCv 2.4.2 with OpenNI
Hi, I'm trying to get input from my laptop's built-in camera just by
VideoCapture capture;
capture.open(0);
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.
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.