How do i generate a rotation matrix iteratively.
显示 更早的评论
I have two matrices containing coordinates:
example1 = [1 3;
4 5;
2 3;
6 17];
example2 = [1 4;
6 2;
8 9;
10 11];
and I'm implementing the RANSAC algorithm to remove outlier coordinates. To do that, I will need to include a factor of whether a not one coordinate in example1 is either a rotation, scaling or translation which result in the coordinate in example2. (1 3 -> 1 4, 4 5 -> 6 2 etc..) Hence, I will need to have a rotation matrix, scaling and translation matrix to be built iteratively within the RANSAC algorithm.
For now, I'll just keep it simple by just using a rotation matrix.

How do i generate a rotation matrix [cos θ -sin θ; sin θ cos θ] if i do not have anything else other than the two coordinate matrices above?
Edit: sorry for the confusion but the goal is to "estimate" the transformation matrix in every N iteration. The following shows:

采纳的回答
更多回答(1 个)
Bruno Luong
2019-9-11
编辑:Bruno Luong
2019-9-11
1 个投票
You can use this implementation by Matt J using the Horn's method. It do for you the scaling and translation as well.
类别
在 帮助中心 和 File Exchange 中查找有关 Process Point Clouds 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!