normalize_pixel_fisheye.m

来自「matlab的标定工具箱」· M 代码 · 共 41 行

M
41
字号
function [xn] = normalize_pixel_fisheye(x_kk,fc,cc,kc,alpha_c)%normalize%%[xn] = normalize_pixel(x_kk,fc,cc,kc,alpha_c)%%Computes the normalized coordinates xn given the pixel coordinates x_kk%and the intrinsic camera parameters fc, cc and kc.%%INPUT: x_kk: Feature locations on the images%       fc: Camera focal length%       cc: Principal point coordinates%       kc: Fisheye distortion coefficients%       alpha_c: Skew coefficient%%OUTPUT: xn: Normalized feature locations on the image plane (a 2XN matrix)if nargin < 5,   alpha_c = 0;   if nargin < 4;      kc = [0;0;0;0;0];      if nargin < 3;         cc = [0;0];         if nargin < 2,            fc = [1;1];         end;      end;   end;end;% First: Subtract principal point, and divide by the focal length:x_distort = [(x_kk(1,:) - cc(1))/fc(1);(x_kk(2,:) - cc(2))/fc(2)];% Second: undo skewx_distort(1,:) = x_distort(1,:) - alpha_c * x_distort(2,:);% Third: Compensate for lens distortion:xn = comp_fisheye_distortion(x_distort,kc);

⌨️ 快捷键说明

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