简体   繁体   English

从三个3D点计算变换矩阵

[英]Calculate transformation matrix from three 3D points

I have a 3D coordinate system of which I track the three outer points with a 3D camera. 我有一个3D坐标系,我使用3D摄像头跟踪三个外部点。
So I have three points in (x,y,z) space. 所以我在(x,y,z)空间有三个点。
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. 现在我需要草拟一个转换矩阵,它给出了与初始位置相比较的第二个3点的平移,旋转和缩放。

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. 我使用opencv和qt在c ++中工作。 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 Ĵ

教程看起来很不错(你要找的是一个仿射变换)!

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. 解决这个系统会给你矩阵。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM