필터 지우기
필터 지우기

alignment using Procrustes again

조회 수: 2 (최근 30일)
Ampi
Ampi 2012년 10월 28일
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
Matt J
Matt J 2012년 10월 28일
편집: Matt J 2012년 10월 28일
I find the rewritten question much more confusing than your previous version.
  • 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()

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2012년 10월 28일
편집: Matt J 2012년 10월 28일
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);

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by