Code Monkey home page Code Monkey logo

icp's Introduction

ICP-mini-project

Small collaborative mini-project focused on implementing the Iterative Closest Point algorithm.

Introduction

C++ implementation of 3-dimensional ICP (Iterative Closest Point) algorithm. A Python implementation of ICP by Clay Flannigan was referred and rewritten into a C++ version in this project.

  • ICP finds a best fit rigid body transformation between two point sets. Correspondence between the points is not assumed. Included is an SVD-based least-squared best-fit algorithm for corresponding point sets.
  • In this version, exhaustive search method is used to find the nearest neighbor for each point.
  • Eigen library is used for matrices operations.

ICP Wiki | Eigen

Use command $ g++ icp.cpp test.cpp to make, and use command $ ./a.out to run it.

icp's People

Contributors

zjudmd1015 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

icp's Issues

ERROR: function icp

hi, the function icp has one error as following:

the point Eigen::MatrixXd dst should be the same as the input point B except for their eigen structure. Thus, the corrected version is as follows:

ICP_OUT icp(const Eigen::MatrixXd &A, const Eigen::MatrixXd &B,
int max_iterations, double tolerance) {
const int row = A.rows();
Eigen::MatrixXd src = Eigen::MatrixXd::Ones(3 + 1, row);
Eigen::MatrixXd src3d = Eigen::MatrixXd::Ones(3, row);
Eigen::MatrixXd dst_chorder = Eigen::MatrixXd::Ones(3, row);

const int rowB = B.rows();
Eigen::MatrixXd dst = Eigen::MatrixXd::Ones(3 + 1, rowB);

NEIGHBOR neighbor;
Eigen::Matrix4d T;
ICP_OUT result;
int iter = 0;

for (int i = 0; i < row; ++i) {
	src.block<3, 1>(0, i) = A.block<1, 3>(i, 0).transpose();
	src3d.block<3, 1>(0, i) = A.block<1, 3>(i, 0).transpose();
}

for (int i = 0; i < rowB; ++i) {
	dst.block<3, 1>(0, i) = B.block<1, 3>(i, 0).transpose();
}
   .....................

}

How H was compute?

@zjudmd1015
I'm confused about the matrix H computed here.
H * A = B; --> H = A' * B, any reference?
Here A, B are corresponding point set, A' means A transpose, H is transform matrix;

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.