參考網址:
http://openkinect.org/wiki/Getting_Started
安裝
sudo add-apt-repository ppa:arne-alamut/freenect
更新套件
sudo apt-get update
安裝驅動程式
sudo apt-get install freenect
執行檔案
freenect-glview
(freenect-cppview freenect-glpclview freenect-glview)
增加自己使用者到video中
sudo adduser YOURNAME video
sudo apt-get install git-core cmake libglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev
git clone https://github.com/OpenKinect/libfreenect.git
cd libfreenect
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig /usr/local/lib64/
sudo glview
cat << EOF >> /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" EOF
mouse-------------
6. To get mouse cursor working (from https://github.com/Ooblik/Kinect-Mouse):
$ mkdir ~/kinect
$ cd ~/kinect
$ git clone https://github.com/Ooblik/Kinect-Mouse.git
$ cd ~/kinect/Kinect-Mouse
$ mkdir build
$ cd build
$ cmake ..
$ make
7. Run mouse client
$ ./kmouse
8. Enjoy mouse cursor control.
還有錯誤訊息要安裝套件
/kinect_mouse.c:37:34: error: X11/extensions/XTest.h: 沒有此一檔案或目錄
apt-get install libncurses5-dev
/kinect_mouse.c:37:34: error: X11/extensions/XTest.h: 沒有此一檔案或目錄
找不到套件
apt-get install apt-file
apt-file update
apt-file search X11/extensions/XTest.h # 得知 XTest.h 在哪個套件
apt-get install xxx # 安裝那個套件
原來是少了libxtst-dev
apt-get install libxtst-dev
重新make
終於產生了kmouse
./kmouse
滑鼠會跟著手動了