?? tsai.m
字號:
function [MT,C2,R2,T] = tsai(vuXYZ,u0,v0)
vuXYZ(:,1)=vuXYZ(:,1)-v0;
vuXYZ(:,2)=vuXYZ(:,2)-u0;
% Cr閍tion de la matrice A
[M,N]=size(vuXYZ);
for i=1:M
A(i,1)=vuXYZ(i,2)*vuXYZ(i,3);
A(i,2)=vuXYZ(i,2)*vuXYZ(i,4);
A(i,3)=vuXYZ(i,2)*vuXYZ(i,5);
A(i,4)=vuXYZ(i,2);
A(i,5)=vuXYZ(i,1)*vuXYZ(i,3);
A(i,6)=vuXYZ(i,1)*vuXYZ(i,4);
A(i,7)=vuXYZ(i,1)*vuXYZ(i,5);
A(i,8)=vuXYZ(i,1);
end
%D閏omposition en valeurs simple de A
[U,W,V] = svd(A,0);
%Extraction de Vs
Vs=V(:,8);
%D閠ermination de Gamma
gamma=sqrt(Vs(1)*Vs(1)+Vs(2)*Vs(2)+Vs(3)*Vs(3));
alphagamma=sqrt(Vs(5)*Vs(5)+Vs(6)*Vs(6)+Vs(7)*Vs(7));
%D閠ermination de Alpha
alpha=-alphagamma/gamma;
Vs2=Vs'./gamma;
%D閠ermination de r3
R=zeros(3,3);
R(1,1)=Vs2(5)/-alpha;
R(1,2)=Vs2(6)/-alpha;
R(1,3)=Vs2(7)/-alpha;
R(2,1)=Vs2(1);
R(2,2)=Vs2(2);
R(2,3)=Vs2(3);
R(3,1)=R(1,2)*R(2,3)-R(1,3)*R(2,2);
R(3,2)=R(1,3)*R(2,1)-R(1,1)*R(2,3);
R(3,3)=R(1,1)*R(2,2)-R(1,2)*R(2,1);
tx=Vs2(8)/-alpha;
ty=Vs2(4);
%Forcage de l'orthogonalit
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -