Overlaying and Comparing Two Sets of Co-Ordinates
조회 수: 14 (최근 30일)
이전 댓글 표시
Hello all
I have been using Matlab as a fancy calculator for some time now but always wanted to do more with it.
So part of trying to learn Matlab I was wanted to tackle an actual problem which I was hoping the community could help with.
I have 2 x sets of data, they are data set 1 and data set 2.
Data set 1contains a list of X Y co-ordinates (which I have created a matrix for), the data relates to an outline of a building.
Data set 2 also contains a list of X Y co-ordinates (which I have also created a matrix for), this data relates to the outline of the same building, the only difference is that data set 2 contains more data X Y co-ordinates and the values of each X and Y differ slightly.
Plotting these data sets gives me the following:-
What I am trying to do is overlay data set 2 with data set 1 such that the best fit is found.
Once the images are overlaid as best as they can I then want to compare the original X Y co-ordinates of data set 2 with the adjusted/best fit co-ordinates of data set 2 to see the difference.
I am struggling with how to overlay the two sets of co-ordinates to produce a best fit – any ideas?
Thank you.
댓글 수: 2
Matt J
2019년 4월 13일
What kind of transformations of data set 2 (to match data set 1) are you willing to allow? Translations? Rotations? Something even more complicated?
채택된 답변
Matt J
2019년 4월 14일
편집: Matt J
2019년 4월 14일
I haven't used it myself, but this implementation of Iterative Closest Point seems pretty popular
댓글 수: 4
Matt J
2019년 4월 15일
I deduce from this section of the help docunentation
% OUTPUT:
%
% R - rotation matrix
% T - translation vector
% data2 - matrix with transformed data points, [ P_1 P_2 ... P_N ]
%
% data2 = R*data + T
that the "data" input (not the "model") is the data that floats. It is "data" to which the rotation and translation are being applied at the very end.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!