📄 estimate_homography.m
字号:
function [Theta, k] = estimate_homography(X, s)% [Theta k] = estimate_homography(X, s)%% DESC:% estimate the parameters of an homography using the normalized% DLT algorithm. Note that Theta = H(:)%% VERSION:% 1.0.1%% INPUT:% X = 2D point correspondences% s = indices of the points used to estimate the parameter% vector. If empty all the points are used%% OUTPUT:% Theta = estimated parameter vector Theta = H(:)% k = dimension of the minimal subset% 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 = ??/??/05 - initial version% 1.0.1 = 27/08/08 - minor improvements% cardinality of the MSSk = 4;if (nargin == 0) || isempty(X) Theta = []; return;end;if (nargin == 2) && ~isempty(s) X = X(:, s);end; % check if we have enough pointsN = size(X, 2);if (N < k) error('estimate_homography:inputError', ... 'At least 4 point correspondences are required');end;H = HomographyDLT(X(1:2, :), X(3:4, :));Theta = H(:);return;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -