安裝或設定

有關設定或安裝 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 檔案(如果你建立它)。