procrustes algorithm gives no T transform matrix back
이전 댓글 표시
Hi,
Im having some trouble with the procrustes algorithm. When I enter the code(which is shown below) my transform.T is just a single number.
What am i trying to do:
I have 4 markers in placed in an image and i rotate that image with imrotate3 a several times. When im finnised rotating i select my 4 markers, in the correct order and give them the the procrustes algorithm. The outcome of the algorithm is terrible, what am i doing wrong?
Code:
%Markers
pos1 = [20 20 20];
pos2 = [1 1 1];
pos3 = [size(X,1)/2 1 1];
pos4 = [size(X,1) 1 1];
%pivot coordinats
bpn = [pos1,pos2,pos3,pos4];
%positionEA
epn = [([82 492 24]),([66 510 2]),([35 528 254]),([6 546 507])];
%procrustes
[dissim,Z,trans] = procrustes(bpn',epn');
%outcome
en = bpn-(trans.T)'*epn-(trans.c)';
RMS = rms(norm(en));
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!