A Framework for the Volumetric Integration of Depth Images http://www.infinitam.org
I. Building the System
1. cmake
- 打开网址:http://www.cmake.org/cmake/resources/software.html,找到最新版本的位置。一般开放源代码软件都会有两个版本发布:Source Distribution 和 Binary Distribution,前者是源代码版,你需要自己编译成可执行软件。后者是已经编译好的可执行版,直接可以拿来用的。
tar -zxvf cmake-3.10.0-rc4-Linux-x86_64.tar.gz
mv cmake-3.10.0-rc4-Linux-x86_64 cmake
- 在.bashrc或.zshrc中添加
PATH=$PATH:$HOME/bin:/root/cmake/bin
到环境变量中(这里的/root是cmake解压的路径 cmake --version
sudo apt-get install cmake
2. OpenGL/GLUT
freeglut 2.8.0 or 3.0.0
http://freeglut.sourceforge.net/
2.1 安装OpenGL
sudo apt-get install build-essential
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libglu1-mesa-dev
2.2 安装GLUT
sudo apt-get install build-essential freeglut3 freeglut3-dev binutils-gold
编译的时候需要加上编译参数
gcc glut.c -o glut -lGL -lglut
3. CUDA(optional)
4. OpenNI
4.1 以下是版本openni 1的安装
sudo apt-get install libopenni2-0
sudo apt-get install libopenni2-dev
sudo apt-get install g++
sudo apt-get install python
sudo apt-get install libusb-1.0.0-dev
sudo apt-get install libudev-dev
sudo apt-get install openjdk-11-jdk
sudo apt-get install freeglut3-dev
sudo apt-get install doxygen
sudo apt-get install graphviz
lost: Android part
驱动安装:
How to run the Kinect on Ubuntu
# openni
cd ~/kinect
git clone https://github.com/OpenNI/OpenNI.git
cd OpenNI
git checkout unstable
cd Platform/Linux/CreateRedist
chmod +x RedistMaker
./RedistMaker
cd ../Redist/OpenNI-Bin-Dev-Linux-x64-v1.5.8.5
sudo apt install openjdk-8-jdk openjdk-8-jre
sudo ./install.sh
# sensor
cd ~/kinect
git clone https://github.com/ph4m/SensorKinect.git
cd SensorKinect
git checkout unstable
cd Platform/Linux/CreateRedist
chmod +x RedistMaker
./RedistMaker
cd ../Redist/Sensor-Bin-Linux-x64-v5.1.2.1
chmod +x install.sh
sudo ./install.sh
# nite
cd NITE-Bin-Linux-x64-vertion
sudo ./isntall.sh
OpenNI安装:
cd ~/kinect
$ cd OpenNI-Linux-x64-version
$ sudo ./install.sh
测试:
cd ~/kinect/OpenNI/Platform/Linux/Redist/OpenNI-Bin-Dev-Linux-x64-version/Samples/Bin/x64-Release
./NIViewer
4.2 以下是版本openni 2的安装
Kinect2的安装以及关于OpenNI2遇到的问题OpenNI
# 测试遇到驱动问题
# 使用OpenNI2-FreenectDriver解决
git clone https://github.com/OpenKinect/libfreenect.git
cd libfreenect
mkdir build
cd build
cmake -L .. # -L lists all the project options
make
# 然后在github上点到OpenNI2-FreenectDriver文件夹里
cd build
cmake .. -DBUILD_OPENNI2_DRIVER=ON
make
# 最后需要把这个文件夹下生成的.so文件复制到OpenNI2的驱动文件夹下,我的如下,参照着找自己的吧
cp -L lib/OpenNI2-FreenectDriver/libFreenectDriver.so ~/kinect/OpenNI2-master/Bin/x64-Release/OpenNI2/Drivers
5. libpng
allow to read PNG
http://libpng.org
$ cd libpng-version
$ ./configure --prefix=/usr/local/libpng
# replace 'path' above with the directory path where you want to copy the files and folders.
$ make
$ sudo make install
6. FFMPEG
sudo add-apt-repository ppa:djcj/hybrid
sudo apt-get update
sudo apt-get install ffmpeg
7. librealsense/librealsense2
https://github.com/IntelRealSense/librealsense
- 注册公钥
sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE
- 如果无法导入解决方法请自行查看 link
- 添加服务到库
# Ubuntu 16 LTS:
$ sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u
# Ubuntu 18 LTS:
$ sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u
- 更新源
$ sudo rm -f /etc/apt/sources.list.d/realsense-public.list
$ sudo apt-get update
$ sudo apt-get install librealsense2-dkms
$ sudo apt-get install librealsense2-utils
- 重新连接Intel RealSense深度摄像机并运行:RealSense -viewer以验证安装
$ sudo apt-get install librealsense2-dev
$ sudo apt-get install librealsense2-dbg
- 编译时
$ g++ -std=c++11 filename.cpp -lrealsense2
最后这句不知道是做什么用的,贴这吧,不想重找:
Verify that the kernel is updated :
modinfo uvcvideo | grep "version:" should include realsense string
还有删除,基本上也没啥用,一并放这里:
Uninstalling the Packages:
Important Removing Debian package is allowed only when no other installed packages directly refer to it. For example removing librealsense2-udev-rules requires librealsense2 to be removed first.
Remove a single package with:
sudo apt-get --purge <package-name>
Remove all RealSense™ SDK-related packages with:
dpkg -l | grep "realsense" | cut -d " " -f 3 | xargs sudo dpkg --purge
8. libuvc
https://github.com/olafkaehler/libuvc
git clone https://github.com/olafkaehler/libuvc
cd libuvc
mkdir build
cmake ..
make && sudo make install
9. doxygen
git clone https://github.com/doxygen/doxygen.git
cd doxygen
mkdir build
cd build
cmake -G "Unix Makefiles" ..
make
# after
make install
# 遇到问题 cound not find flex
sudo apt install flex
sudo apt install bison
# file INSTALL cannot copy file
make install
---->
sudo make install
II. 测试
从链接下载工程文件夹:InfiniTAM
从链接下载测试文件:测试数据
cd InfiniTAM
mkdir build
cmake /path/to/InfiniTAM -DOPEN_NI_ROOT=/path/to/OpenNI
make
# 测试文件在
/InfiniTAM/InfiniTAM/build/Apps/InfiniTAM
``
网友评论