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!