Code covered by the BSD License

### Highlights from estimateRigidTransform

5.0
5.0 | 2 ratings Rate this file 44 Downloads (last 30 days) File Size: 17.9 KB File ID: #28305 Version: 1.1

# estimateRigidTransform

### Babak Taati (view profile)

26 Jul 2010 (Updated )

estimate the rigid transformation between two sets of 3D point clouds, given a set of point matches

File Information
Description

This is a simple utility for estimating the rigid transformation that aligns two sets of 3D point clouds, given 3 (or more) point matches.

Input: two sets of 3D point clouds (P1 and P2)
Output: homogeneous transformation that aligns the two clouds
Assumptions:
1- point i in the first point cloud corresponds to point i in the second cloud
2- the transformation is rigid (i.e. only a rotation and a translation)
3- you need at least 3 (non-degenerate) point matches (i.e. they don't lie on a straight line)

The math is basic and well-known. The point of this upload is just to save the little bit of time it would've taken you to code it yourself.

Reference: "Computer Vision, a modern approach" by Forsyth and Ponce

Related:
1- Click3dPoint (on the File Exchange) to manually find a few point correspondences
2- ICP (e.g. Matlat implementation by A. Mian)

Acknowledgements

Click3d Point inspired this file.

MATLAB release MATLAB 7.9 (R2009b)
21 Dec 2015 xiao zedong

### xiao zedong (view profile)

I am sorry, I go wrong. The return estT is 4 by 4.

Comment only
21 Dec 2015 xiao zedong

### xiao zedong (view profile)

3 by 3 matrix is not able to describe rotation and transformation, why the return estT is 3 by 3?

Comment only
26 Oct 2011 Andreas Martin

### Andreas Martin (view profile)

29 Jul 2010 Babak Taati

### Babak Taati (view profile)

Thanks Janti. You're correct. I fixed it.

Comment only
29 Jul 2010 Janti

### Janti (view profile)

Great work.
Correct me if I'm wrong but I think line 28 should read

alignedP1h = estT * P1h;