GithubHelp home page GithubHelp logo

yifanlu0227 / gicp-python Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.01 MB

A python binding for C++ gicp.

Makefile 4.92% C++ 89.93% C 5.12% Python 0.03%
gicp icp point-cloud-registration python

gicp-python's Introduction

gicp-python

The implement is totally from https://github.com/avsegal/gicp.

I warp c++ code to a python. Suppose I am in a conda environment.

Installation

  1. install pybind11, gsl, pkg-config, boost

    conda install pybind11
    conda install pkg-config
    conda install libboost
    conda install gsl
    
  2. compile ANN

    Then run the command

    cd ann_1.1.2
    make linux-g++
    
  3. compile the project

    cd ..
    vim Makefile
    

    Modify the first line in ./Makefile. Change CONDA_PREFIX in line 1 to your conda prefix path. and run

    make
    

    then it should generate warp_gicp.so

Usage

import warp_gicp
T = warp_gicp.gicp(source, target, max_distance, gicp_epsilon)
'''
Args:
    source: np.ndarray (N1,3)
        source point cloud

    target: np.ndarray (N2,4)
        target point cloud

    max_distance: float, default = 1.0
        filter corresponding pairs over max_distance
    
    gicp_epsilon: float, default = 1e-3
         epsilon constant for gicp paper; this is NOT the convergence tolerence

Returns:
    T: np.ndarray (4, 4)
        T @ source_homo = target_homo, *_homo is homogeneous coordinates with shape (4, N)

There are many optional parameters in gicp.cpp, like max_iteration, epsilon , but I just use it's default setting.

You can run python test_with_python.py to check if it's nicely compiled.

gicp-python's People

Contributors

yifanlu0227 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.