So for the last couple of days i've been trying to use my Kinect v1(1414) as a webcam for a project with OpenCV (Im using Ubuntu 16.04). I already installed Openkinect freenect (multiple times) and OpenNI, and i do get a video output when i run
sudo freenect-glview. When I run
lsusb it recognizes the camera and the motor.
Bus 001 Device 017: ID 045e:02ae Microsoft Corp. Xbox NUI Camera Bus 001 Device 014: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor Bus 001 Device 016: ID 045e:02bb Microsoft Corp.
The problem comes when i try to use the camera as a simple webcam for python-OpenCV proyect. So, when in python i run
cv2.VideoCapture(0), the console shows the following error:
[ WARN:0] VIDEOIO(V4L2:/dev/video0): can't open camera by index
So i read that using
cv2.VideoCapture(-1) could work, but then the following error appears:
[ WARN:0] VIDEOIO(V4L2): can't find camera device
After searching for the error over internet people were saying that if i couldn't find
v4l2src, then it was needed to install Gstream, so i did, tried with 1.0 and 0.10, but neither of those worked. I also tried running
ls -ltrh /dev/video* but showed
ls: cannot access '/dev/video*': No such file or directory or running
v4l2-ctl --list-devices shows
Failed to open /dev/video0: No such file or directory
In the end, i figured out that i needed to find a way to make the camera be recognized by the system
(dev/video0).but until now, i haven't been able to succeed, so now i come to you asking if anyone has had the same problem before and/or if you know how to solve it.
Thanks in advance.