⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 camcald4.m

📁 这是一个基于MATLAB的机器视觉工具箱,里面用很多非常有价值的的程序
💻 M
字号:
% CAMCALD4	Compute partial camera calibration from four coplanar data points%%	C = CAMCALD4(D)% % Solve the camera calibration using a least squares technique.  Input is a table % of data points, D, with each row of the form [x y iX iY] where (x,y) is the world% coordinate of the point within the plane, and (iX, iY) is the image plane % coordinate.%% Output is a 3x3 partial camera calibration matrix (missing the usual third column).%% SEE ALSO: CAMPOSE4, CAMCALP, CAMERA, CAMCALT, INVCAMCAL%%%	Copyright (c) Peter Corke, 1999  Machine Vision Toolbox for Matlab%		pic 4/93function t = camcald4(m)	[rows,cols] = size(m);	if (rows ~= 4) | (cols ~= 4)		error('data matrix should be 4 x 4')	end%% build the matrix as per Ballard and Brown p.482%% the row pair are one row at this point%	aa = [ m(:,1) m(:,2) ones(rows,1) zeros(rows,3)   ...	       -m(:,3).*m(:,1) -m(:,3).*m(:,2)    ...		zeros(rows,3) m(:,1) m(:,2)  ones(rows,1)  ...	       -m(:,4).*m(:,1) -m(:,4).*m(:,2) ];%% reshape the matrix, so that the rows interleave%	aa = reshape(aa', 8, rows*2)';	bb = reshape( [m(:,3) m(:,4)]', 1, rows*2)';	t = aa\bb;	t = reshape([t;1]',3,3)';

⌨️ 快捷键说明

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