All Projects → aalavandhaann → go-icp_cython

aalavandhaann / go-icp_cython

Licence: GPL-3.0 License
Go-ICP for globally optimal 3D pointset registration

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to go-icp cython

Voxelizer
Header only mesh voxelizer in c99
Stars: ✭ 487 (+516.46%)
Mutual labels:  computer-graphics, geometry-processing
3d Quickhull
Header only 3d quickhull in c99
Stars: ✭ 259 (+227.85%)
Mutual labels:  computer-graphics, geometry-processing
Melt
Automatic conservative mesh occluder generation by box filling
Stars: ✭ 105 (+32.91%)
Mutual labels:  computer-graphics, geometry-processing
Cinolib
A generic programming header only C++ library for processing polygonal and polyhedral meshes
Stars: ✭ 407 (+415.19%)
Mutual labels:  computer-graphics, geometry-processing
Softras
Project page of paper "Soft Rasterizer: A Differentiable Renderer for Image-based 3D Reasoning"
Stars: ✭ 715 (+805.06%)
Mutual labels:  computer-graphics, geometry-processing
Pifu
This repository contains the code for the paper "PIFu: Pixel-Aligned Implicit Function for High-Resolution Clothed Human Digitization"
Stars: ✭ 1,021 (+1192.41%)
Mutual labels:  computer-graphics, geometry-processing
Optcuts
OptCuts, a new parameterization algorithm, jointly optimizes arbitrary embeddings for seam quality and distortion. OptCuts requires no parameter tuning; automatically generating mappings that minimize seam-lengths while satisfying user-requested distortion bounds.
Stars: ✭ 145 (+83.54%)
Mutual labels:  computer-graphics, geometry-processing
mcut
A simple and fast library for mesh booleans and more.
Stars: ✭ 57 (-27.85%)
Mutual labels:  geometry-processing
Super-Sunshine
A ray-tracer with a simple scene description language for easily generating beautiful images.
Stars: ✭ 115 (+45.57%)
Mutual labels:  computer-graphics
MineCube
A Cool Voxel Editor Based on OpenGL 3.3+ !
Stars: ✭ 23 (-70.89%)
Mutual labels:  computer-graphics
FontRNN
Implementation of FontRNN [Computer Graphics Forum, 2019].
Stars: ✭ 27 (-65.82%)
Mutual labels:  computer-graphics
ComputerGraphics-OpenGL
No description or website provided.
Stars: ✭ 25 (-68.35%)
Mutual labels:  computer-graphics
MeshODE
MeshODE: A Robust and Scalable Framework for Mesh Deformation
Stars: ✭ 77 (-2.53%)
Mutual labels:  geometry-processing
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (+197.47%)
Mutual labels:  computer-graphics
vktut
Shabi's Vulkan Tutorials
Stars: ✭ 88 (+11.39%)
Mutual labels:  computer-graphics
ICON
ICON: Implicit Clothed humans Obtained from Normals (CVPR 2022)
Stars: ✭ 641 (+711.39%)
Mutual labels:  computer-graphics
OpenGL MPMSnowSimulation2D
2D Implementation of Material Point Method for Snow Simulation
Stars: ✭ 26 (-67.09%)
Mutual labels:  computer-graphics
mp2p icp
Multi primitive-to-primitive (MP2P) ICP algorithms in C++
Stars: ✭ 84 (+6.33%)
Mutual labels:  icp
tiny-path
An instructive one-file Ruby path tracer
Stars: ✭ 53 (-32.91%)
Mutual labels:  computer-graphics
geometry-processing-package
Geometry Processing Package
Stars: ✭ 38 (-51.9%)
Mutual labels:  geometry-processing

NOTE:

This is a cython version of the original go-icp project by yangjiaolong.

Go-ICP for globally optimal 3D pointset registration

Below picture is taken from the original authors git page

(A demo video can be found on here.)

Introduction

This repository contains the Cythonized code for the Go-ICP algorithm (with trimming strategy for outlier handling). It is free software under the terms of the GNU General Public License (GPL) v3. Details of the Go-ICP algorithm can be found in the papers:

  • J. Yang, H. Li, Y. Jia, Go-ICP: Solving 3D Registration Efficiently and Globally Optimally, International Conference on Computer Vision (ICCV), 2013. PDF

  • J. Yang, H. Li, D. Campbell, Y. Jia, Go-ICP: A Globally Optimal Solution to 3D ICP Point-Set Registration, IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2016. PDF

Please read this file carefully prior to using the code. Some frequently-asked questions have answers here.

Compiling

The cython module uses Autowrap to created the pyx and cpp files. Also changes involve removal of .cpp files and having only .hpp files. Although you don't have to do anything but run on the head folder the below command,

python setup.py build_ext --inplace

If you wish to generate the pyx files after modifying the source code in c++ (Adventure is waiting), then run the below command from the terminal inside the 'src' folder

autowrap --out py_goicp.pyx goicpcc.pxd

You need CYTHON installed on your python or virtualenv, or conda environment (whichever you use) to compile and use this library

INSTALLATION

The package if you have compiled it manually then it can be installed using the command python setup.py install Otherwise this is available on the pip package as well. The current version is 0.0.3 and can be installed with pip install py-goicp (you need administrator, else use --user flag

Running

Use the test.py lying in parallel to the setup.py file. This should teach you on how to use the code. For the sake of simplicity only the below classes have been wrapped to use,

  • GoICP
  • POINT3D
  • ROTNODE
  • TRANSNODE

A simple usage will be (after setting the parameters)

import numpy as np;
from py_goicp import GoICP, POINT3D, ROTNODE, TRANSNODE;
def loadPointCloud(filename):
    pcloud = np.loadtxt(filename, skiprows=1);
    plist = pcloud.tolist();
    p3dlist = [];
    for x,y,z in plist:
        pt = POINT3D(x,y,z);
        p3dlist.append(pt);
    return pcloud.shape[0], p3dlist;

goicp = GoICP();
Nm, a_points = loadPointCloud('./test_data/model_bunny.txt');
Nd, b_points = loadPointCloud('./test_data/data_bunny.txt');
goicp.loadModelAndData(Nm, a_points, Nd, b_points);
goicp.setDTSizeAndFactor(300, 2.0);
goicp.BuildDT();
goicp.Register();
print(goicp.optimalRotation()); # A python list of 3x3 is returned with the optimal rotation
print(goicp.optimalTranslation());# A python list of 1x3 is returned with the optimal translation

Notes taken from the original code github

  • Make sure both model and data points are normalized to fit in [-1,1]3 prior to running (we recommend first independently centralizing the two point clouds to the origin then simultaneously scaling them). The default initial translation cube is [-0.5,0.5]3 (see “config_example.txt”).

  • The convergence threshold is set on the Sum of Squared Error (SSE) as in the code and the paper. For the ease of parameter setting for different data point numbers, we use Mean of Squared Error (MSE) in the configuration (see “config_example.txt”). We use MSE threshold of 0.001 for the demos. Try smaller ones if your registration results are not satisfactory.

  • Make sure you tune the trimming percentage in the configuration file properly, if there are some outliers in the data pointset (i.e., some regions that are not overlapped by the model pointset). Note that a small portion of outliers may lead to competely wrong result if no trimming is used. Refer to our TPAMI paper for more details.

  • Building 3D distance transform with (default) 300 discrete nodes in each dimension takes about 20-25s in our experiments. Using smaller values can reduce memory and building time costs, but it will also degrade the distance accuracy.

Acknowledgments - this too comes from the original

This implementation uses the nanoflann library, and a simple matrix library written by Andreas Geiger. The distance transform implementation is adapted from the code of Alexander Vasilevskiy.

This impelementation uses the c++ code of yangjiaolong. My sincere thanks to the author for this valuable contribution to the geomety processing society. May the blessings shower the author all the time...

Change log

V0.1 (15-January-2019)

First complete version for release

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].