4.27778

4.3 | 19 ratings Rate this file 139 Downloads (last 30 days) File Size: 6.48 KB File ID: #12627
image thumbnail

Iterative Closest Point Method

by

 

13 Oct 2006 (Updated )

ICP fit points in data to the points in model.

| Watch this File

File Information
Description

ICP fit points in data to the points in model. Fit with respect to minimize the sum of square errors with the closest model points and data points.

   Ordinary usage:

   [R, T] = icp(model,data)

   INPUT:
 
   model - matrix with model points,
   data - matrix with data points,

   OUTPUT:

   R - rotation matrix and
   T - translation vector accordingly
       so

       newdata = R*data + T .

newdata are transformed data points to fit model

see help icp for more information

MATLAB release MATLAB 6.0 (R12)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (31)
24 Jul 2014 Jonathan Dentch

I am getting errors while using icp.m.

Error using qhullmx
The data is degenerate in at least one dimension - ND set of points lying in (N+1)D space.

Error in delaunayn (line 101)
t = qhullmx(x', 'd ', opt);

Error in icp>icp_struct (line 416)
Tes=delaunayn(MODEL');

Error in icp (line 318)
tes_flag=icp_struct(tes_flag); % construct a Delaunay tesselation and two vectors make it easy
to find in Tes

Error in test_2 (line 4)
[R, T] = icp(points1, points2);

points1.txt

0. 0. 0.
1. 0. 0.
2. 0. 0.
3. 0. 0.
0. 1. 0.
1. 1. 0.
2. 1. 0.
3. 1. 0.
0. 2. 0.
1. 2. 0.
2. 2. 0.
3. 2. 0.
0. 3. 0.
1. 3. 0.
2. 3. 0.
3. 3. 0.

points2.txt

1. 2. 3.
2. 2. 3.
3. 2. 3.
4. 2. 3.
1. 3. 3.
2. 3. 3.
3. 3. 3.
4. 3. 3.
1. 4. 3.
2. 4. 3.
3. 4. 3.
4. 4. 3.
1. 5. 3.
2. 5. 3.
3. 5. 3.
4. 5. 3.

test_2.m

clear;
points1 = dlmread('points1.txt', ' ');
points2 = dlmread('points2.txt', ' ');
[R, T] = icp(points1, points2);

Please advise.

26 Mar 2014 south

Your ICP is EXCELLENT!Thank you very much !

14 Nov 2013 chang lele  
12 Nov 2013 Vicamce

Hi,Your ICP is very well. In this moment I'm working the icp algorithm.I'm very interested in it.Is there any paper discribing your algorithm? Thank you. My email is vicamce@yahoo.com

15 Oct 2013 zhongling Ma

Hi,I'm studying the icp algorithm.I'm very interested in it.Is there any paper discribing your algorithm?Could you tell me,thank you very much.My email is :452687156@qq.com

18 Sep 2013 Marina Marina

Hi, your ICP code works very well. Is there any paper or documentation describing this algorithm? In this way I can understand how it works.
Thanks.
xxmariinsxx@hotmail.com

08 Jun 2013 Cheng Zhang

Hi,I'm very interested in your algorithm. Is there any paper discribing your algorithm?Could you tell me,thank you very much .my email is :mjcheng@mail.ustc.edu.cn

06 May 2013 jack chem

Hi,I'm very interested in your algorithm,but i cannot understand it very well,can you give me more describing about about this algorithm? we0704csu@163.com
Thanks.

08 Dec 2012 change

your icp scrip is very good. i could use it very often. But is there any paper discribing your algorithm? I´m interested in its details to understand the operations it does. How does it work?
john1529w@hotmail.com
Thanks

17 Nov 2012 Ranger

Hi Mr. Bergström,
your icp scrip is very good. i could use ist very often. But is there any paper discribing your algorithm? I´m interested in its details to understand the operations it does. How does it work?
robertkamolz@googlemail.com
Thanks

21 Apr 2012 leila hell

hello, i would like to know what are the hypothesys for using the ICP and around which axes the rotation R is made ?

14 Jan 2012 Mithun

Can you please explain how the err function is working in this?

04 Dec 2011 Yuan Billy  
04 Oct 2011 Daniel

Is there any literature describing this particular algorithm? Is it based on Besl and McKay (1992), or is this a different implementation?
cook348@gmail.com
Thanks.

03 Jul 2011 Thai Nguyen

Dear Per,
I have run your source codes in Visual C++ 2008 and use the the same data and model for testing in C++, but the results from C++ are different in comparison with from icp_demo.m. When I re-calculate the new data by applying the rotation matrix and translation vector which I have obtained from C++, the plotting of new-data and model points are not match. Could you tell me what reasons? (P/S: my email is svcorp110@gmail.com, if possible please directly send your answers via my email). Thank you very much!
Best regards,
Nguyen Van Thai
AOI Lab

31 May 2011 Lu Jin

cp_struct(tes_flag); % construct a Delaunay tesselation and two vectors make it easy to find in Tes

15 Apr 2011 Petter  
05 Apr 2011 Huang Chun-Hsiang

Good code !! Thank you.

05 Apr 2011 Huang Chun-Hsiang  
15 Mar 2011 Yuksel

I run the program for 3D data. I used 'model' and 'data' with different sizes and it worked. However, there are about 1-1.5 m differences in z values after gridding the data sets. I also would like to know what is the reference for the program. Thank you.

18 Mar 2010 Dimitrios Skarlatos

Hi.
Does the code works for full 3D objects or only in 2.5D ?
By 2.5D i mean surfaces that can only handle one Z value for every X,Y
Thanks

04 Mar 2010 Brian Chuang

Hi, Thanks for this code

One quick question:

Should the new fitted points be
newdata = R*data - T instead of +T as commented in the code?

02 Nov 2009 asadi

Hi I can't download icp.rar from this page. can anyone send it for me ?
Thanks alot
atefe.asadi@yahoo.com

15 Jan 2008 Jurandir Junior  
04 Nov 2007 Louis Tang

This programe is quite good. It's the implementation of the original ICP algorithm. the only deficiency is that it only supports input model and data point set with the same dimension.

02 Oct 2007 Syed Islam  
18 Jun 2007 ray dury

ICP algo give good results only if we are near a good matching.

You may prefer other methods to approach the solution.

Before than use ICP algo.

There are stochastic ICP that solve this problem.

This code is good, use it without risk

22 Feb 2007 erol seke

Did not handle scaling. Fails with large rotations and/or translations. Otherwise ok.
Note: I tested only with 2D data.

05 Jan 2007 J. Lincoln Carpenter

There could be more comments, especially for some of the alternate input arguements. But on the whole it's a well written and useful m-file for optimization and image registration.

18 Nov 2006 Tahir Yaqub

The error message is quite long but the last line is mentioend in my previous message and first is this:
??? qhull precision error: initial facet 1 is coplanar with the interior point
ERRONEOUS FACET:

While executing: | qhull d Qt Qbb Qc

18 Nov 2006 Tahir Yaqub

Hi Bergstorm
When i run the program, following error comes:
Error in ==> icp at 275
icp_struct(tes_flag); % construct a Delaunay tesselation and two vectors make it easy to find in Tes

Updates
17 Oct 2006

Have added a choice to use an other seach method, tes_flag=2 (see help icp).

08 Nov 2006

Added weighted sum of squares minimization.

21 Nov 2006

ICP can now handle point clouds whos principal components do not span the whole space.

16 Jan 2007

Have added a new choice for tesselaton structure.

18 Jan 2007

Have done the last update complete.

08 Mar 2007

Have done some small changes!

Contact us