imagetonormalisedimage.m
来自「Matlab程序」· M 代码 · 共 21 行
M
21 行
function polyNi = ImageToNormalisedImage( polyI, theCamera )
%if (~IsPoly(polyI)), error('polyI must be a 2d point set'), end
if ( size(polyI,1) ~= 2 ), error('polyI must be a 2d point set'), end
polyD(1,:) = polyI(1,:) - theCamera.u0;
polyD(2,:) = polyI(2,:) - theCamera.v0; %move centroid to principal point
if ( theCamera.kappa1 == 0)
polyU = polyD;
else
polyU(1,:) = polyD(1,:) + polyD(1,:) .* ( theCamera.kappa1 * ( polyD(1,:).^2 + polyD(2,:).^2 ) );
polyU(2,:) = polyD(2,:) + polyD(2,:) .* ( theCamera.kappa1 * ( polyD(1,:).^2 + polyD(2,:).^2 ) );
end
polyNi = polyU / theCamera.efl; %divide by the effective focal length to get the image on the z=1 plane
%units are the same as for the 1 that the z=1 is measured in
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?