📄 error_homography.m
字号:
function [E T_noise] = error_homography(Theta, X, sigma, P_inlier)% [E T_noise] = error_homography(Theta, X, sigma, P_inlier)%% DESC:% estimate the squared symmetric transfer error due to the homographic % constraint%% VERSION:% 1.0.0%% INPUT:% Theta = homography parameter vector% X = samples on the manifold% sigma = noise std% P_inlier = Chi squared probability threshold for inliers% If 0 then use directly sigma.%% OUTPUT:% E = squared symmetric reprojection error % T_noise = noise threshold% 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 - 11/18/06 initial version% compute the squared symmetric reprojection errorE = [];if ~isempty(Theta) && ~isempty(X) H = reshape(Theta, 3, 3); X12 = homo2cart(H*cart2homo(X(1:2, :))); X21 = homo2cart(H\cart2homo(X(3:4, :))); E1 = sum((X(1:2, :)-X21).^2, 1); E2 = sum((X(3:4, :)-X12).^2, 1); E = E1 + E2;end;% compute the error thresholdif (nargout > 1) if (P_inlier == 0) T_noise = sigma; else % Assumes the errors are normally distributed. Hence the sum of % their squares is Chi distributed (with 4 DOF since the symmetric % distance contributes for two terms and the dimensionality is 2) % compute the inverse probability T_noise = sigma^2 * chi2inv_LUT(P_inlier, 4); end; end;return;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -