简体   繁体   中英

How can I use the built-in Kinect driver on Linux?

In the newest Linux kernel, it supports Kinect through a driver . I want access to the RGB and D (depth) streams and put them into a 2D array, either 64bit ints, or two separate arrays will work. C# is preferred, C++ is acceptable.

So my question is: where can I find more information about this, eg, articles and documentation? What would a simple example program look like, eg, printing the color and depth at position 100x100?

I'll up-vote any good links, and accept the first working code sample.

Thanks, Frankie

Ps, I'm aware of the OpenKinect, NITE, Microsoft SDK, etc., projects. I want this to be easy for me to install on other computers and Linux distros which is why the common kernel driver is preferred. My main use will be a web-cam that replaces pixels further away than depth X and saves to disk.

Update

Since asking I haven't gotten much further. I found this article . I checked out the Git repo, which doesn't seem to have been updated since April and I don't see any connection to the Linux Kernel or it ever being incorporated. There's no mention of Kinect in any later blog posts there, other than this unrelated one .

Update 2

I can't seem to find who applied the Kinect driver to the kernel. There is a mirror of the kernel on GitHub . I tried using Google to search it, but this query and variations didn't turn up anything. Then I tried searching GitHub with no positive hits. Does anyone have any information?

The driver doesn't support a D stream according to the link you posted:

[media] gspca - kinect: New subdriver for Microsoft Kinect

The Kinect sensor is a device used by Microsoft for its Kinect project, which is a system for controller-less Human-Computer interaction targeted for Xbox 360.

In the Kinect device, RGBD data is captured from two distinct sensors: a regular RGB sensor and a monochrome sensor which, with the aid of a IR structured light, captures what is finally exposed as a depth map; so what we have is basically a Structured-light 3D scanner.

The Kinect gspca subdriver just supports the video stream for now, exposing the output from the RGB sensor or the unprocessed output from the monochrome sensor; it does not deal with the processed depth stream yet, but it allows using the sensor as a Webcam or as an IR camera (an external source of IR light might be needed for this use).

The low level implementation is based on code from the OpenKinect project (http://openkinect.org).

From source of the driver it appeares the author is Antonio Ospite reachable at ospite@studenti.unina.it

As already suggested by the comments the author should be able to answer all questions you asked since what you want is really dependent on what is exactly exposed by the driver (which might even be version dependent).

Unfortunately, the driver doesn't support the depth stream, only an unprocessed image from the monochrome sensor. So it's not possible using only the kernel driver. See also a blog post I wrote on this subject. If you remove the built-in kernel modules, you can do it with libfreenect though.

You can find the driver file here on GitHub: kinect.c .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM