translatethemdlt.m
来自「一个很好用的摄像机标定程序」· M 代码 · 共 29 行
M
29 行
function ImPoints = translateThemDLT( SPoints, DLTm )%DEVELOPMENT PHASE%% ImPoints = translateThem( SPoints, DLTm )%% SPoints - 9x3 matrix of the 9 scene points coordinates x, y, z% DLTm - 3x4 DLT matrix%% ImPoints - 9x2 image points coordinates%% computes the image points coordinates from the scene points using CDLT matrix%hpoint = zeros( 4, 1 );hpoint( 4, 1 ) = 1;hipoint = zeros( 3, 1 );[n m] = size( SPoints );for i = 1:nhpoint( 1, 1 ) = SPoints( i, 1 );hpoint( 2, 1 ) = SPoints( i, 2 );hpoint( 3, 1 ) = SPoints( i, 3 );hipoint = DLTm*hpoint;ImPoints( i, 1 ) = hipoint( 1, 1 ) / hipoint( 3, 1);ImPoints( i, 2 ) = hipoint( 2, 1 ) / hipoint( 3, 1);end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?