3
votes

I have a 3D coordinate system of which I track the three outer points with a 3D camera.
So I have three points in (x,y,z) space.
Next frame I track these three points again.
I use the first three points as initial situation. Now I need to draft a transformation matrix that gives me the translation, rotation and scaling of the second 3 points, in comparison with the initial position.

Now I do not really know how to do this.
Is there a way to directly make the the transformation matrix, or do I first have to work out the translation, rotation and scale matrix and than make a transformation matrix of these three?

I work in c++ with opencv and qt. Somebody got any suggestions? I do not necessarily need a full working example, anything that can get me on my way is appreciated.

Thanks! J

2

2 Answers

1
votes

This tutorial looks pretty nice (what you are looking for is called an affine transform)!

1
votes

You can view the transformation from old positions to new positions as a system of equations, where the unknowns are the elements of the matrix. Solving this system will give you the matrix.