安装或设置

有关设置或安装 kinect 的详细说明。设置 Kinect 传感器

适用于 Windows 1.5,1.6,1.7,1.8 的 Kinect

以下是使 Kinect 传感器启动并运行的一些简单步骤。

步骤 1:将传感器安装在稳定的表面上

将传感器放置在稳定的表面上,使其在使用过程中不会掉落或撞击。以下是一些其他提示。

Do not place the Kinect on or in front of a speaker or on a surface that vibrates or makes noise.
Keep the Kinect out of direct sunlight.
Use the Kinect within its specified operating temperature range of 41 to 95 degrees Fahrenheit (5 to 35 degrees Celsius). If the sensor is exposed to an environment outside of its prescribed temperature range, turn it off and allow the temperature to stabilize within the specified range before you use the sensor again.
Do not tilt a Kinect on its base. Manually tilting the Kinect can damage the sensor. The Kinect tilt angle is controlled by software; see Kinect Explorer - WPF C# Sample for an example.

第 2 步:安装 Kinect for Windows SDK

If you haven't done so already, download and install the free SDK from the Kinect for Windows download page.
If you haven't done so already, download and install the free Developer Toolkit from the Kinect for Windows download page.

第 3 步:插入 Kinect 传感器

Connect the power supply for your Kinect to an external power source.
Connect the Kinect to a USB port on your PC and wait for Windows to recognize it.
All the drivers, including audio, will load seamlessly.

安装 Kinect for Windows SDK 时,安装包中包含 Kinect 驱动程序。当 Kinect 驱动程序安装在基于 Windows 的 PC 上时,插入 PC 的 USB 端口的 Kinect 显示为多组件 USB 设备。

关于 USB 主机控制器兼容性存在已知问题。

加载驱动程序后,你需要设置开发环境。如果你使用的是 Visual Studio,请继续配置开发环境以帮助你创建第一个 C#或 C++应用程序。

故障排除提示

以下提示将帮助你开始使用 Kinect:

If a non-Microsoft driver for the Kinect is installed on your computer, the Kinect for Windows drivers might not install or function correctly. To fix this, uninstall the non-Microsoft drivers before installing the Kinect for Windows SDK.
Connect the power supply for the Kinect to an external power source; if the Kinect has only power from the USB connection, it will be minimally functional and light the LED, but it must be connected to an external power source to be fully functional.
No tools are required for calibration of audio and video.
Your Kinect should be the only device plugged into a USB hub on your computer. If you have more than one Kinect, connect them to different USB controllers. If 2 hubs are connected to the same controller, only 1 Kinect can work at a time.
The Kinect is protected from overheating by a fan. It is controlled by the sensor's firmware, which turns off the camera at 90 degrees Celsius. There is no software interface for applications to control the fan.
Reasonable lighting, neither extremely dark nor extremely bright, is important for capturing images with the RGB camera. Incandescent, fluorescent, and natural lighting provide no special obstacles, but do not point an intense or constant light source at the camera because this can blind the RGB sensor.
The depth sensor functions adequately in typical and reduced lighting, although in near darkness there is increased noise in the signal.
The depth sensor reads depth information from reflected light. Objects that are highly reflective (mirrors and shiny metal) or highly absorptive (fluffy and/or dark materials) may not be registered by the depth sensor as successfully as other objects.

资源

Linux

Ubuntu / Debian 官方软件包

从 Ubuntu 11.10(Oneiric) 和 Debian 7(Wheezy) 开始,Ubuntu 和 Debian 提供了 libfreenect 的官方软件包。你可以在控制台中轻松安装它们:

$ sudo apt-get install freenect

Ubuntu 12.04 中gspca 内核驱动程序阻止 libfreenect 在用户模式下声明 Kinect 设备。删除并将模块列入黑名单

$ sudo modprobe -r gspca_kinect 
$ sudo modprobe -r gspca_main
$ echo "blacklist gspca_kinect" |sudo tee -a /etc/modprobe.d/blacklist.conf

或安装最新版本的 libfreenect ,它可以通过为 Ubuntu 12.04 添加更新的 libfreenect 软件包 Florian Echtler libtisch PPA(见下文)来自动分离内核驱动程序。

所述 freenect 装置将属于该组的 plugdev 任何用户可访问。默认情况下,桌面用户属于 plugdev 组,但如果需要将其添加到组:

$ sudo adduser $USER plugdev

然后注销并再次登录 NeuroDebian 存储库

如果你想要最新版本的 libfreenect,无论你使用哪个版本的 Debian 或 Ubuntu,最后发布的 libfreenect 都支持所有支持的 Debian 和 Ubuntu 版本(即 Ubuntu Lucid(10.04),Maverick(10.10),Natty(11.04)NeuroDebian 存储库中可以获得 Oneiric(11.10) 和 Debian Squeeze 和 Wheezy(撰写本文时)。这里提供的软件包是由官方 Debian 软件包的维护者创建的,遵循 Debian / Ubuntu 的标准。

要启用 NeuroDebian 存储库:

$ wget -O- http://neuro.debian.net/lists/$(lsb_release -cs).us-nh | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
$ sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 2649A5A9
$ sudo apt-get update

安装 libfreenect 与以前一样:

$ sudo apt-get install freenect

确保你的用户属于 plugdev 组(桌面用户的默认设置),以便在没有 root 权限的情况下访问设备。如果不是这样,请按以下方式添加:

$ sudo adduser $USER plugdev

并注销并再次登录 libtisch PPA

可以通过此链接获得 Lucid(10.04),Maverick(10.10),Natty(11.04),Oneiric(11.10)和 Pangolin(12.04) 的 Ubuntu 启动板 ppa。

使用它,打开一个控制台并执行:

$ sudo add-apt-repository ppa:floe/libtisch
$ sudo apt-get update

之后,你可以使用:

$ sudo apt-get install libfreenect libfreenect-dev libfreenect-demos

这将安装 libfreenect,开发标题和演示应用程序。

之后,你需要将自己添加到视频组并重新登录。该软件包已包含 udev 守护程序的必要规则,以便组视频中的用户可以访问该设备。

$ sudo adduser $USER video

请务必注销并重新登录。你无需重启,只需立即插入 kinect 设备(如果已连接,请拔下插头并重新插入)。

要启动演示应用程序,请使用:

$ freenect-glview

访问设备的问题

如果出现问题,请运行

$ lsusb | grep Xbox

应该列出 3 个设备

> lsusb | grep Xbox                                                 Bus
> 001 Device 021: ID 045e:02ae Microsoft Corp. Xbox NUI Camera Bus 001
> Device 019: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor Bus 001 Device
> 020: ID 045e:02ad Microsoft Corp. Xbox NUI Audio

如果它们不存在,请运行

echo -1 | sudo tee -a /sys/module/usbcore/parameters/autosuspend

并且应该列出重新连接 Kinekt 和 Kinect Camera

你可以找到以 freenect-前缀开头的所有演示应用程序。Ubuntu 手动安装

快速复制粘贴说明,立即启动并运行:

sudo apt-get install git-core cmake libglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev
git clone git://github.com/OpenKinect/libfreenect.git
cd libfreenect
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig /usr/local/lib64/
sudo freenect-glview

注意:如果你收到一个错误,说 apt-get 找不到 libglut3,你可能会在更新版本的 Ubuntu 上使用 freeglut3- *而不是 libglut3- *,所以你的初始 apt-get 安装看起来像:

sudo apt-get install git-core cmake freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev

要将 Kinect 用作非 root 用户,请执行以下操作:

sudo adduser $USER video

还要创建一个包含 Linux 设备管理器规则的文件:

sudo nano /etc/udev/rules.d/51-kinect.rules

复制和粘贴:

# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02b0", MODE="0666"
# ATTR{product}=="Xbox NUI Audio"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02ad", MODE="0666"
# ATTR{product}=="Xbox NUI Camera"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02ae", MODE="0666"
# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02c2", MODE="0666"
# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02be", MODE="0666"
# ATTR{product}=="Xbox NUI Motor"
SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="02bf", MODE="0666"

务必注销并重新登录。

如果你无法访问或仍需要 root 权限才能使用你的设备:在某些情况下,安装的两个驱动程序(libfreenect 和 primesense)的权限之间可能存在冲突。如果是这种情况,请尝试重新安装 primesense 的传感器驱动程序并仅保留 primesense 的规则文件/etc/udev/rules.d/55-primesense-usb.rules,删除/etc/udev/rules.d/51-kinect.rules 文件(如果你创建它)。