天天看点

ubuntu16.04 运行dynamic fusion

######仅作为笔记

根据自己电脑所带nvidia显卡型号安装对应版本的驱动和cuda/cudnn

测试版本cuda版本8.0 nvidia-384

参考网址:

https://blog.csdn.net/qq_40806289/article/details/90643603

https://blog.csdn.net/ffcjjhv/article/details/89151382

安装过程:

git clone https://github.com/mihaibujanca/dynamicfusion --recursive
chmod +x build.sh
./build.sh
           

贴出build.sh里面内容,可以对应里面的包一步一步自行安装,便于查找错误,版本一定要对应上:

#!/bin/bash

sudo apt-get update
# install cuda toolkit and nvidia-prime
sudo apt-get install nvidia-cuda-dev nvidia-cuda-toolkit nvidia-nsight nvidia-prime
# install git, cmake, SuiteSparse, Lapack, BLAS etc
sudo apt-get install cmake libvtk5-dev libsuitesparse-dev liblapack-dev libblas-dev libgtk2.0-dev pkg-config libopenni-dev libusb-1.0-0-dev wget zip clang

cd ..

# Build gflags
git clone https://github.com/gflags/gflags.git
cd gflags
mkdir -p build/ && cd build
cmake .. && make 
cd ../../

# Build glog
git clone https://github.com/google/glog.git
cd glog
mkdir -p build/ && cd build/
cmake .. && make
cd ../../

# Install Eigen 3.3.4
wget http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz
tar -xf 3.3.4.tar.gz
cd eigen-eigen-5a0156e40feb
mkdir -p build && cd build
cmake ..
sudo make install
cd ../../

# Build Ceres
git clone https://ceres-solver.googlesource.com/ceres-solver   /*转https://github.com/ceres-solver/ceres-solver下载*/
cd ceres-solver
mkdir -p build/ && cd build/
cmake ..
make -j4
sudo make install
cd ../../

# Build OpenCV 2.4.13
git clone https://github.com/opencv/opencv
cd opencv/
git checkout 2.4.13.3
mkdir -p build && cd build
cmake -DWITH_VTK=ON -DBUILD_opencv_calib3d=ON -DBUILD_opencv_imgproc=ON -DWITH_CUDA=OFF ..
make -j4
sudo make install
cd ../../

# Build Boost
wget https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz
tar -xf boost_1_64_0.tar.gz
cd boost_1_64_0
sudo ./bootstrap.sh
./b2
cd ..

# Build DynamicFusion

cd dynamicfusion/deps
wget https://github.com/zdevito/terra/releases/download/release-2016-03-25/terra-Linux-x86_64-332a506.zip
unzip terra-Linux-x86_64-332a506.zip
rm terra-Linux-x86_64-332a506.zip
mv terra-Linux-x86_64-332a506 terra

# Build Opt
#	Change line
#		FLAGS += -O3 -g -std=c++11 -I$(SRC) -I$(SRC)/cutil/inc -I../../API/release/include -I$(TERRAHOME)/include -I$(CUDAHOME)/include -I../external/mLib/include -I../external -I../external/OpenMesh/include
#	with
#		FLAGS += -D_MWAITXINTRIN_H_INCLUDED -D_FORCE_INLINES -D__STRICT_ANSI__ -O3 -g -std=c++11 -I$(SRC) -I$(SRC)/cutil/inc -I../../API/release/include -I$(TERRAHOME)/include -I$(CUDAHOME)/include -I../external/mLib/include -I../external -I../external/OpenMesh/include
cd Opt/API/
make -j4
cd ../../../

mkdir -p build && cd build
cmake -DOpenCV_DIR=~/opencv/build -DBOOST_ROOT=~/boost_1_64_0/ -DOPENNI_INCLUDE_DIR=/usr/include/ni -DOpenCV_FOUND=TRUE ..
make -j4
cd ..
           

其中Opt需要重新下载,下载地址:https://github.com/niessner/Opt/tree/c6012e7e4c67fa3bea96161ba24fe88a2b79deed

解压到deps并重命名为Opt。

数据集下载:https://www.dropbox.com/sh/qgy2n9bmioofqnj/AABUnT7pi2ECpxSi80EmXOXna?dl=0

数据集处理方式:

mkdir -p data/umbrella/depth
mkdir -p data/umbrella/color

mv umbrella_data.zip data/umbrella
cd data/umbrella
unzip umbrella_data.zip
rm *.txt
mv *color*.png color/
mv *depth*.png depth/
rm umbrella_data.zip
           

运行:

./download_data 
./build/bin/dynamicfusion data/umbrella
           

如果出现任何问题,请查找

https://github.com/mihaibujanca/dynamicfusion/issues

测试结果:

ubuntu16.04 运行dynamic fusion
ubuntu16.04 运行dynamic fusion

继续阅读