Giter Site home page Giter Site logo

whigg / picp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pcirujeda/picp

0.0 1.0 0.0 329 KB

pICP: plain Iterative Closest Point, a no-frills implementation in C++ of a simple rigid 3D registration algorithm. Easy to integrate, uses minimal dependencies.

License: MIT License

CMake 1.39% C++ 98.61%

picp's Introduction

pICP

This repo provides a clean and fast implementation of the ICP method by Besl and McKay in C++ with minimal dependencies (in fact, only OpenCV is strictly required for data matrix manipulation and SVD computation). The algorithm is one of the baseline methods on rigid alignment of point clouds, and this implementation attempts to provide an entry point for learning it with no practical hassles. At the same time, it works fast and robustly enough to be used out-of-the box on any of your projects.

How it works

The problem

Given two point sets:

find a rotation R and translation T that minimizes the error:

SVD based transform estimation

Given a matrix W made by a set of correspondent N points, centered to its mean

obtain the Singular Value Decomposition of W = U * S * Vt.

Theorem without proof says that if rank( W ) = 3, the optimal solution of E( R, t ) is unique and given by:

This process can be run iteratively, selecting correspondent points by different criteria (neighbourhood, random search...), until convergence.

Dependencies

Only OpenCV is required if you are just using the ICP class on your project.

A real test executable is provided, allowing to register any desired pair of point clouds (only .obj format supported at the moment). The PointCloud class uses TinyObjLoader (header included) for parsing OBJ files, and the PlainICP executable requires Boost for parsing external arguments.

Usage

Just include the ICP class header on your project.

Check the provided cmake project for compiling an executable which shows how to use the class:

mkdir ./build
cd ./build
cmake ..
make

Sample call with provided sample OBJ files:

./PlainICP  --source-obj-file ../samples/bunny_head.obj --target-obj-file ../samples/bunny.obj --transformed-obj-file ../samples/aligned_bunny_head.obj --tolerance 0.0005 --verbose 1

License

This software release is primarily MIT licensed. Some files contain third-party code under other licens

picp's People

Contributors

pcirujeda 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.