- Firstly, there is nothing 3D-looking about A and B. They are both vectors. Are they supposed to have 3 columns [xi(:), yi(:), zi(:)]?
- Secondly, the new information about the two mesh grids doesn't seem to play a role. You're registering A to B, right? The output of griddata does not provide any input to the registration.
- Thirdly, you haven't told us what C is and you're using Z to represent both the output of griddata() and the output of procrustes()
alignment using Procrustes again
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello, I am rewriting the question. Procrustes analysis is a method to align one shape against another . Say I have a 3D matrix which looks like:- A=[ 1 2 100 2 3 200]; and B =[3 4 566 4 7 899]; Now, My question is I have got 2 mesh-grids by interpolating A and B using Z = griddata(xi,yi,zi,X,Y,'cubic') where xi,yi and zi are the coordinates from the above matrices. And X,Y are 1:100 coordinates for setting up the mesh grid. .The problem is that I want to align perfectly A with B using the following code: [d Z tr] = procrustes(C,B,'scaling',true);
axis([ 0 100 0 100 0 100]);
figure(1),plot3( B(:,1),B(:,2),B(:,3),'rx');
figure(2),plot3( C(:,1),C(:,2),C(:,3),'gx');
figure(3),plot3( Z(:,1),Z(:,2),Z(:,3),'bx');
The problem is that when finally I AM PLOTTING Z it is not at all showing the perfect alignment. Any help would be appreciable.
1 Kommentar
Matt J
am 28 Okt. 2012
Bearbeitet: Matt J
am 28 Okt. 2012
Antworten (1)
Matt J
am 28 Okt. 2012
Bearbeitet: Matt J
am 28 Okt. 2012
Aside from my comments above, what you said about GRIDDATA suggests that the zi data in A and the zi data in B might be from totally different functions of the (xi,yi) data in A and the (xi,yi,) data in B respectively.
Therefore, you should probably be doing 2D registration between the (xi,yi) coordinates, not 3D registration between the (xi,yi,zi) coordinates. So maybe the following is what you want:
[d Z tr] = procrustes(A([1,2],:),B([1,2],:),'scaling',true);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Point Cloud Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!