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

📄 normalize_points.m

📁 RANSAC Toolbox by Marco Zuliani email: marco.zuliani@gmail.com -------------------------------
💻 M
字号:
function [xn, T] = normalize_points(x)% [xn, T] = normalize_points(x)%% DESC:% normalize a set of points using the procedure described in the book by% Hartley and Zisserman%% VERSION:% 1.0.0%% INPUT:% x             = points to be normalized%% OUTPUT:% Xn            = normalized set of points% T             = transformation matrix such that Xn = T * X% 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% compute the translationx_bar = mean(x, 2);% center the points% faster than xc = x - repmat(x_bar, 1, size(x, 2));xc(1, :) = x(1, :) - x_bar(1);xc(2, :) = x(2, :) - x_bar(2);% compute the average point distancerho = sqrt(sum(xc.^2, 1));rho_bar = mean(rho);% compute the scale factors = sqrt(2)/rho_bar;% scale the pointsxn = s*xc;% compute the transformation matrixT = [s 0 -s*x_bar(1); 0 s -s*x_bar(2); 0 0 1];return

⌨️ 快捷键说明

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