MATLAB: How to calculate translation and rotation of points of image from 2 consecutive frames

Computer Vision Toolboxmatched pointsrotationtranslation

Hello, I’m trying to calculate the the translation(x,y,z distances) and rotation(roll, pitch, yaw angles) of points of images from 2 consecutive frames. Firstly I use the SURF detector to detect the points of interest then match them between the consecutive frames. Then how am I to calculate the translation and rotation using the location of the matched points? There are many matched points in the image then which one that I have to use in order to find the translation and rotation?

Best Answer

There is a function in the Statistics Toolbox called 'procrustes' which can do that job for you. Read its documentation at:
http://www.mathworks.com/help/stats/procrustes.html
The minimum number of matched points that must be used in two dimensions is two, but it is better if you have many more than that so that the overall error can be minimized. It carries out a least squares matching procedure and gives you the best translation, rotation, and scale factor change.
Related Question