demo.m

来自「一个很好用的摄像机标定程序」· M 代码 · 共 71 行

M
71
字号
clcformat compactmore offload samples/coords/syntcdsload samples/coords/realcdsaddpath solvoptaddpath solvopt/uncprobsaddpath mecho on%% press enter to start the calibration with synthetic datapauseclc[Te, Re, Ine, errs, cerrs] = calibr8( [1300, 353, 286, 0, 0], 7, 0.1, PC1, PC2, PC4, PC5 ); quiver( cerrs(:,1), cerrs(:,2), cerrs(:,3), cerrs(:,4) )  figureplot( errs(1,:) )grid onzoom on%% Results of the calibration:%% intrinsic parameters of the camera (focal length, principal points, linear distortion coefficients):fl=Ine(1);pp=[Ine(2),Ine(3)];b=[Ine(4),Ine(5)];fl,pp,b%% estimated rotation matrix:Re%% appropriate euler angles (in degrees):[ox, fy, kz] = deeuler_deg( Re )%% estimated rotation matrix:Te%% extracted translation vector:t = Re * Te(:,3)%%press enter to continue with calibration with real datapauseclose allclc[Te, Re, Ine, errs, cerrs] = calibr8( [1500, 353, 286, 0, 0], 7, 0.1, shot2, shot5, shot9, shot11 ); quiver( cerrs(:,1), cerrs(:,2), cerrs(:,3), cerrs(:,4) )  figureplot( errs(1,:) )grid onzoom on%% Results of the calibration:%% intrinsic parameters of the camera (focal length, principal points, linear distortion coefficients):fl=Ine(1);pp=[Ine(2),Ine(3)];b=[Ine(4),Ine(5)];fl,pp,b%% estimated rotation matrix:Re%% appropriate euler angles (in degrees):[ox, fy, kz] = deeuler_deg( Re )%% estimated rotation matrix:Te%% extracted translation vector:t = Re * Te(:,3)% press enter to finishpauseclose all%% thank you

⌨️ 快捷键说明

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