cart2homo.m

来自「RANSAC Toolbox by Marco Zuliani email: 」· M 代码 · 共 42 行

M
42
字号
function Q_homo = cart2homo(Q_cart, lambda)% Q_homo = cart2homo(Q_cart, lambda)%% DESC:% converts from homegeneous coordinates to cartesian ones %% VERSION:% 1.1% % INPUT:% Q_cart		= cartesian coordinates of the points% lambda        = scale factor (optional)%% OUTPUT:% Q_homo		= homogeneous coordinates of the points% AUTHOR:% Marco Zuliani, email: marco.zuliani@gmail.com% Copyright (C) 2008 by Marco Zuliani % % LICENSE:% This toolbox is distributed under the terms of the GNU LGPL.% Please refer to the files COPYING and COPYING.LESSER for more information.% HISTORY% 1.0.0         - ??/??/01 - Initial versionif nargin == 1   lambda = 1;end;l = size(Q_cart, 1);n = size(Q_cart, 2);Q_homo = zeros(l + 1, n, class(Q_cart));Q_homo(1:l, :) = (1 / lambda) * Q_cart(1:l, :);Q_homo(l + 1, :) = lambda;return;

⌨️ 快捷键说明

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