camera.m
来自「这是一个基于MATLAB的机器视觉工具箱,里面用很多非常有价值的的程序」· M 代码 · 共 34 行
M
34 行
%CAMERA Camera imaging model%% uv = CAMERA(C, p)% uv = CAMERA(C, p, Tobj)%% Implement the perspective, scaling and offset encapsulated in the% camera calibration matrix C. P is a list of 3D world points and% the corresponding image plane points are returned in UV.% The data in P is one point per row in X, Y, Z order.%% Tobj is a homogeneous transformation that can be used to transform% the points prior to imaging.%% SEE ALSO: gcamera, camcalp, pulnix%% Copyright (c) Peter Corke, 1999 Machine Vision Toolbox for Matlab% pic 1993function uv = camera(C, p, Tobj) np = numrows(p); % do the camera perspective transform p = [p'; ones(1, np)]; % optionally transform all the points if nargin == 3, p = Tobj * p; end x = C * p; % camera transform iXY = x(1:2,:) ./ [x(3,:); x(3,:)]; uv = iXY';
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?