1. 程式人生 > >ubuntu16.04 運行elasticfusion

ubuntu16.04 運行elasticfusion

ubunt common word http format rep inf href zlib

環境:Ubuntu16.04 64bit

   Kinect V1 XBOX 360

1.安裝OpenNI2並試運行

https://fredfire1.wordpress.com/2016/09/23/install-and-setup-kinect-xbox-360-1473-debian-ubuntu-64bit/

基本歷程參照該鏈接配置。這裏註意在/OpenNI-Linux-x64-2.2/Tools/OpenNI2/Drivers路徑下也復制一個libFreenectDriver.so驅動NiViewer才能運行。

2.安裝相關依賴項和庫

1)一起寫到這裏,先都裝了吧,早晚都要用。

技術分享
sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev

sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

sudo add-apt-repository ppa:openjdk-r/ppa //新的版本沒有這個庫了 自己加載
sudo apt-get update

sudo apt-get install -y cmake-qt-gui git build-essential libusb-1.0-0-dev libudev-dev openjdk-7-jdk freeglut3-dev libglew-dev libsuitesparse-dev libeigen3-dev zlib1g-dev libjpeg-dev libboost1.58-dev libboost1.58-all-dev libeigen3-dev libflann-dev libvtk5-dev libqhull-dev
sudo apt-get install libopenni-dev libopenni2-dev //主要用於環境配置16.04之前不能直接裝
技術分享

3.安裝並運行elasticfusion

在git上下載elasticfusion按照readme和build.sh安裝。

最後在GUI的make的過程中用ccmake。

cd ../../GUI
mkdir build
cd build
ccmake ../src
make -j8

按t進入高級配置窗口,OpenNI2的lib路徑不要選根目錄那個(默認是這個),改成我們自己裝的那個libopenni2.so (第1步安裝的)

個人理解:

為什麽要這麽做呢,因為新的Ubuntu版本,可以直接install libopenni。但是libopenni2.so沒有鏈接到libFreenectDriver.so Kinect相機驅動,所以需要用已連接好的驅動。

ubuntu16.04 運行elasticfusion