orthoestmirrordistratio.m

来自「Matlab程序」· M 代码 · 共 81 行 · 第 1/3 页

M
81 行
字号
function wSolnVec = OrthoEstMirrorDistRatio( polyBoundaryVecCell, normalAngle, RR_Rec, allViews )

%This function uses the silhouettes 2 and 3 to approximate the ratio of
%distances from the camera centres to the mirrors. 
%
%In principle, one could combine estimates from other pairs of silhouettes
%too -- but this would be a lot of coding for little benefit in increased
%accuracy, as Levenberg Marquardt easily turns the approximate solution
%into a very good solution.

numImages = length(polyBoundaryVecCell);

R = [cos(normalAngle) -sin(normalAngle) 0; sin(normalAngle) cos(normalAngle) 0; 0 0 1]; %rotate about Z-axis

m1Base =     [1;0;0];
m2Base = R * [1;0;0];

for imgLoop = 1:numImages,    
    RR = RR_Rec{imgLoop};
    m1Hat = RR * m1Base;       
    m2Hat = RR * m2Base;
    
    M1_pos = -m1Hat;    
    M2_pos = -m2Hat;
    
    poseGreen = ReflectionMatrixFromVecPoint( m1Hat, M1_pos );
    poseBlue = ReflectionMatrixFromVec( m2Hat );

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?