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

📄 estimate_rst.m

📁 RANSAC Toolbox by Marco Zuliani email: marco.zuliani@gmail.com -------------------------------
💻 M
字号:
function [Theta, k] = estimate_RST(X, s)% [Theta k] = estimate_RST(X, s)%% DESC:% estimate the parameters of an RST trasformation via least squares.% Note that Theta = [s*cos(phi); s*sin(phi); tx; ty] where:% s         is the scaling factor% phi       is the rotation angle% tx, ty    is the translation%% VERSION:% 1.0.0%% 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 % 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             = 08/27/08 - initial version% cardinality of the MSSk = 2;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_RST:inputError', ...        'At least 2 point correspondences are required');end;H = RSTLS(X(1:2, :), X(3:4, :));Theta = [H(1,1); H(2,1); H(1,3); H(2,3)];return;

⌨️ 快捷键说明

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