View on GitHub

ppf-reconstruction

3D Object Reconstruction using Point Pair Features

Download this project as a .zip file Download this project as a tar.gz file

ppf-reconstruction

This work aims at reconstructing 3D objects by robustly and accurately registering multiple range images of an object from different viewpoints.

An initial alignment between any two overlapping scans is obtained via a voting scheme which matches similar point pair features and thus constrains the relative 6DoF rigid body motion between the poses of two viewpoints. This initial alignment is then refined using pairwise point-to-plane ICP.

The result of this step is a tree of relative pose constraints. In a subsequent global optimization step, we build up a graph of absolute poses, our vertices, from the tree of initial relative pose estimates by adding further edges. We add edges for the k-nearest-neighbors of a vertex, taking the translational difference of the corresponding poses as a distance measure. Constraints between two vertices are added for each closest point correspondence in their respective point clouds. The global point-toplane energy is then minimized iteratively using the nonlinear least-squares method called Multiview Levenberg-Marquardt ICP.

This refined registration of all the scans used may now be integrated and their corresponding point clouds fused and then meshed to obtain the final reconstructed 3D object mesh.

References

Dependencies

CMake, Eigen3, OpenCV, FreeGLUT, g2o

install on Mac OSX Yosemite using homebrew

Install brew and then all dependencies:

brew install cmake eigen homebrew/science/opencv Caskroom/cask/xquartz homebrew/x11/freeglut
brew install https://github.com/adrelino/homebrew-science/raw/master/g2o.rb  

or

brew install homebrew/science/g2o

once pull request gets trough

We needed the xquartz app for freeglut to run. For that we might need to accept a license if never done before:

sudo xcodebuild -license   //accept license
install on Linux Ubuntu 14.04
sudo apt-get install cmake libeigen3-dev opencv freeglut 
Build and install g2o

Build and run ppf-reconstruction

Now we are ready to build our code

cd ~/projects
git clone https://github.com/adrelino/ppf-reconstruction.git
cd ppf-reconstruction
mkdir build && cd build
cmake ..
make -j4 -l4
Run with sample bunny sequences

Real dataset aquired with a PrimeSense sensor:

./ppf-reconstruction

Synthetic dataset rendered using Blender:

./ppf_reconstruction -dir ../samples/Bunny_Sphere/ -knn 5 -nFrames 5