#安装驱动与cuda8.0
参考这篇:https://blog.csdn.net/ffcjjhv/article/details/89151382
sudo apt-get install cmake cmake-qt-gui git build-essential libusb-1.0-0-dev libudev-dev
sudo apt-get install freeglut3-dev libglew-dev libsuitesparse-dev libeigen3-dev
sudo apt-get install zlib1g-dev libjpeg-dev doxygen graphviz
如果安装出错,先更新下
sudo apt-get update
sudo apt-get upgrade
再重新安装依赖包
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jdk
sudo apt-get install build-essential libgl1-mesa-dev
sudo apt-get install freeglut3-dev
sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev
#download ElasticFusion
GitHub地址:https://github.com/mp3guy/ElasticFusion ,解压到ElasticFusion/ElasticFusion-master
cd ElasticFusion
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build && cd build
cmake ../ -DAVFORMAT_INCLUDE_DIR="" -DCPP11_NO_BOOST=ON
make -j4
cd ../..
git clone https://github.com/occipital/OpenNI2.git
cd OpenNI2
make -j4
cd ..
cd ElasticFusion-master/Core
mkdir build && cd build
cmake ../src
make -j4
cd ../../
cd GPUTest
mkdir build && cd build
cmake ../src
make -j4
cd ../../
cd GUI
mkdir build && cd build
cmake ../src
make -j4
cd ../../
下载数据集: http://www.doc.ic.ac.uk/~sleutene/datasets/elasticfusion/dyson_lab.klg ,放到ElasticFusion/ElasticFusion-master/GUI/build
,并运行
./ElasticFusion -l dyson_lab.klg
#运行结果
cd ElasticFusion
git clone https://github.com/OpenKinect/libfreenect
cd libfreenect
打开libfreenect/CMakeLists.txt
,在33行cmake_minimum_required(VERSION 2.8.12)
下一行添加
add_definitions(-std=c++11)
保存后关闭,命令行继续执行
mkdir build && cd build
cmake .. -DBUILD_OPENNI2_DRIVER=ON
make -j4
cp -L lib/OpenNI2-FreenectDriver/libFreenectDriver.so ${OPENNI2_DIR}/Bin/x64-Release/OpenNI2/Drivers #OPENNI2_DIR需要修改
注:${OPENNI2_DIR}
是OpenNI2的解压文件夹,比如我的在ElasticFusion文件夹,则
打开libfreenect
文件夹,运行
sudo cp platform/linux/udev/51-kinect.rules /etc/udev/rules.d
重启后,插上kinect后,命令行运行lsusb
,查看是否包含:Xbox camera,Xbox motor,Xbox audio
如果代码运行很慢且出现如下提示,需要修改修改GPUConfig.h
在ElasticFusion/ElasticFusion-master/GPUtest/build
文件夹运行
./GPUTest ../
将最后4行添加到/ElasticFusion/ElasticFusion-master/Core/src/Utils/GPUConfig.h
打开ElasticFusion/ElasticFusion-master/GUI/build
,运行
./ElasticFusion