plateform
stringclasses
1 value
repo_name
stringlengths
13
113
name
stringlengths
3
74
ext
stringclasses
1 value
path
stringlengths
12
229
size
int64
23
843k
source_encoding
stringclasses
9 values
md5
stringlengths
32
32
text
stringlengths
23
843k
github
PavelTrutman/FocalNet-master
GenerateScene.m
.m
FocalNet-master/deepag/bin/deepag/scene_generator/GenerateScene.m
18,268
utf_8
f640d62115e37ee13f5a3f19d409c706
% 16.nov.2008 - pridany noise pre kazdu kameru separe % 20.5.2009 - rozne radial distortion modely % last update 22.oct.2008 % % % synthetic scene generator % by Martin Bujnak, Jan2006 % function [P M m mnoiseless npoints] = GenerateScene(npoints, radius, ncams, minz, maxz, noutliers, anoise, camcalib, sceneType, poin...
github
PavelTrutman/FocalNet-master
ShowCameras.m
.m
FocalNet-master/deepag/bin/deepag/scene_generator/ShowCameras.m
2,884
utf_8
98158ff32948acac4930afa34ab19275
% show camera and 3D content % % by Martin Bujnak % Pgt - 3x4 matrices in cell array % Kgt - 3x3 calibration matrices in cell array (or single K for all equal) % m - cells with 3xN arra of 2D points % Mgt - 3xN array of 3D points % % show2D - show figures with reprojections of 3D points to 2D % showMotion - display ...
github
PavelTrutman/FocalNet-master
SetLookAt.m
.m
FocalNet-master/deepag/bin/deepag/scene_generator/SetLookAt.m
602
utf_8
cff974370e67e3a658f4c86543d9a951
% Matlab code by Zuzana Kukelova 2006-01-10 % Generate camera matrix % From MartinB % Input: pos - Position of Camera % at - Look at - point on which is camera looking at % up - Up vector % Output: Camera = normalized camera matrix K^-1*P = [R | t] function P = SetLookAt(pos, at, up) %di...
github
PavelTrutman/FocalNet-master
E5ptResImPoints.m
.m
FocalNet-master/deepag/bin/lib/geometry/E5ptResImPoints.m
416
utf_8
d051cbfe6ae3a5453771a202b3ee611f
% y = E5ptResImPoints(x) - 5pt Minimal Relative Pose of Two Cameras - ransac residual evaluation data selection % % x = struct % x.x = [x1;x2] ... stacked homogeneous coordinates of image matches % x.iK = [iK1;iK2] ... stacked inverses of camera calibration matrices (jssumes triangular iKk) % y = x.x ...
github
PavelTrutman/FocalNet-master
null3x3r2.m
.m
FocalNet-master/deepag/bin/lib/geometry/null3x3r2.m
640
utf_8
18e68131fa92ac5bd6d3590494850e3e
% N = null3x3r2(A) - Null space of 3x3 matrix A of rank 2 (faster than null) % % A = 3x3 real matrix % N = null space, i.e. A*N = 0 % pajdla@cmp.felk.cvut.cz function N = null3x3r2(A) A = A/max(abs(A(:))); %faster than sqrt(sum(A(:).^2)); % normalize A N = [+A(1,2)*A(2,3)-A(1,3)*A(2,2) +A(2,2)*A(3,3)-A(2,3)...
github
PavelTrutman/FocalNet-master
plotCam.m
.m
FocalNet-master/deepag/bin/lib/geometry/plotCam.m
319
utf_8
328b85ea2690306cac899c12620fde91
% h = plotCam(P or K,R,T) - plot camera % % P or K,R,T ... 3x4 or 3x3 camera matrices % h ... plot handles % (c) T.Pajdla, www.neovision.cz, Sept 14, 2007 function h = plotCam(K,R,T) if ~isempty(K) if nargin>2 K = [K*R -K*R*T]; end h = camplot(K); else h = []; end
github
PavelTrutman/FocalNet-master
r2q.m
.m
FocalNet-master/deepag/bin/lib/geometry/r2q.m
552
utf_8
77212392ae8f415cf9a38d15567b17bd
% q = r2q(R) - rotation matrix to unit quaternion % % R = 3 x 3 rotation matrix (rotation matrix in a 4 x 4 hom transformation) % q = unit quaternion % Tomas Pajdla, pajdla@cmp.felk.cvut.cz % 2001-03-12 function q = r2q(R) R = R(1:3,1:3); c = trace(R)+1; if abs(c)<10000*eps % 180 degrees S = R+eye(3); ...
github
PavelTrutman/FocalNet-master
uu2PPXRFit.m
.m
FocalNet-master/deepag/bin/lib/geometry/uu2PPXRFit.m
8,948
utf_8
de4196c61e95e26ea059c668a30356d1
% [P,X,in,e,F,u] = uu2PPXRFit(u,K,op,debug) - calibrated reconstruction from two images % % u = {u1, u2} with u1, u2 2 x n image projection matrices % K = {K1, K2} with 3 x 3 camera calibration matrices % op = parameters % % RANSAC (see ransacfit with E5ptNister model): % op.maxres = 2*sN; % maximal r...
github
PavelTrutman/FocalNet-master
uL2rdres.m
.m
FocalNet-master/deepag/bin/lib/geometry/uL2rdres.m
1,479
utf_8
f07a6d6f2081abe928103ab89666e481
% [e, z] = uL2rdres(p,R,u,L) - radial distortion estimation from lines - residuals % % R ... radial distortion model, see ur2u % p ... [c(1) c(2) p] ... model parameters, see ur2u % u ... u{i} = 2 x n projections of the i-th target % L ... L{i}{j} = indices of points lying on a stright line in t...
github
PavelTrutman/FocalNet-master
a2h.m
.m
FocalNet-master/deepag/bin/lib/geometry/a2h.m
216
utf_8
6909b5965dddb71da2c8c94be780084a
% X = a2h(x [,w]) - affine to homogeneous coordinates % % X = [x; 1 1 1 ...] % (c) T.Pajdla, www.neovision.cz, Sep 10, 2004 function X = a2h(x,w) if nargin<2 w = 1; end X = [x;w.*ones(1,size(x,2))];
github
PavelTrutman/FocalNet-master
X2u.m
.m
FocalNet-master/deepag/bin/lib/geometry/X2u.m
6,200
utf_8
a96ff4397f732aa1c4e351c9f611b511
% [u,z] = X2u(X,C) - perspective projection % % X ... 3(4) x n space points, 3 -> 1's augmented % C ... camera description % C.type ... camera type: % % 'P' - C - 3 x 4 camera projection matrix % 'KRC' - % [1/bx s/f u0/f] - internal calibration matrix % C.K = [0 1...
github
PavelTrutman/FocalNet-master
p3Dfit.m
.m
FocalNet-master/deepag/bin/lib/geometry/p3Dfit.m
579
utf_8
3b356d89d8afce574b4733db66c2130d
% [l,r] = p3Dfit(y) - Plane fit % y ... 3 x n points % l ... 4 x 1 plane coordinates % r ... 1 x n residuals % z ... 6 x n [the closest points z on the line; y] % See p3Dres % (c) T.Pajdla, pajdla@cvut.cz, 2015-01-03 function [p,r,z] = p3Dfit(y,~) my = mean(y,2); z = y - my*ones(1,size(y,2)); ...
github
PavelTrutman/FocalNet-master
E5ptFitImPoints.m
.m
FocalNet-master/deepag/bin/lib/geometry/E5ptFitImPoints.m
512
utf_8
eae55593c446180aa7e0c52c74ae4a4f
% y = E5ptFitImPoints(x) - 5pt Minimal Relative Pose of Two Cameras - ransac calibrated fit data computation % % x = struct % x.x = [x1;x2] ... stacked homogeneous coordinates of image matches % x.iK = [iK1;iK2] ... stacked inverses of camera calibration matrices (assumes triangular iKk) % y = [iK1*x.x...
github
PavelTrutman/FocalNet-master
H4xP2P.m
.m
FocalNet-master/deepag/bin/lib/geometry/H4xP2P.m
5,213
utf_8
9579d5abf8db4c4794471b8f67beded7
% [H,e] = H4xP2P(P1,P2[,op]) - Matrix H fitting external orientation of cameras P1 to cameras P2 % % P1, P2 = celarray (or matrices) of 3x4 rank 3 projection matrix % H = 4x4 matrix sich that P2{:} ~ P1{:}*H % e = residual error % op = options % '1stto1st' = exact fit for the first cameras % 'fitCf...
github
PavelTrutman/FocalNet-master
l2Dres.m
.m
FocalNet-master/deepag/bin/lib/geometry/l2Dres.m
260
utf_8
a7b7f5782c12dbc41c5ac06c2ffbc07c
% r = l2Dres(l,y) - Line residuals % y ... 2 x n points % l ... 3 x 1 line coordinates % r ... 1 x n residuals % % See l2Dfit % (c) T.Pajdla, www.neovision.cz, Sep 14, 2005 function r = l2Dres(l,y,p1,p2) r = l'*[y ; ones(1,size(y,2))]; return
github
PavelTrutman/FocalNet-master
r2c.m
.m
FocalNet-master/deepag/bin/lib/geometry/r2c.m
331
utf_8
b016d12e6a110284977bfc6d3acd394b
% c = r2c(R) - rotation matrix to Cayley representation % % R = 3 x 3 rotation matrix (rotation matrix in a 4 x 4 hom transformation) % c = Caylay representation [c1,c2,c3] % Tomas Pajdla, pajdla@cmp.felk.cvut.cz % 2016-03-22 function c = r2c(R) R = R(1:3,1:3); C = (eye(3)-R)*inv(eye(3)+R); c = [C(3,2);C(1,...
github
PavelTrutman/FocalNet-master
ur2u.m
.m
FocalNet-master/deepag/bin/lib/geometry/ur2u.m
4,635
utf_8
0656333713c81a18f96c0411bbb10fbd
% [x,r,c,K] = ur2u(u,R) - radial distorion correction % % u ... 2 x n image points % R ... radial distortion descriptor % % if a structure: % % R.x0 ... 2 x 1 distortion center ([0;0] implicit if field r.x0 missing) % R.p ... 1 x k ... k radial distortion coefficients % R.m ... m...
github
PavelTrutman/FocalNet-master
a2r.m
.m
FocalNet-master/deepag/bin/lib/geometry/a2r.m
354
utf_8
2d82ac9f5936e94d9e5867ab1c8a1f47
% R = a2r(v,a) - rotation matrix from axis-angle representation % % v = rotation axis % a = angle [rad] or [cos(a) sin(a)] % R = 3 x 3 rotation matrix % Tomas Pajdla, pajdla@cmp.felk.cvut.cz % 2016-03-21 function R = a2r(v,a) v = v/vnorm(v); if numel(a)<2 a = [cos(a) sin(a)]; end R = a(1)*eye(...
github
PavelTrutman/FocalNet-master
camfulcrum.m
.m
FocalNet-master/deepag/bin/lib/geometry/camfulcrum.m
1,247
utf_8
87aabff7b8d9bc104094f3be133c2cf2
% [X,L] = camfulcrum(P,z1,z2) - perspective camera fulcrum % % P = 3x4 perspective camea projection matrix P = K*R*[I|-C] with rotation R, pose C and % % [1/bx s/f u0/f] % K = [0 1/by v0/f] % [0 0 1/f] % % determining the camera coordinate system \beta. % z1, z2 = ...
github
PavelTrutman/FocalNet-master
qdiag.m
.m
FocalNet-master/deepag/bin/lib/geometry/qdiag.m
915
utf_8
10f841b32a35d6552960e0277a9df45f
% [D,H] = qdiag(Q[,s]) - quadric diagonalization % % Q ... 4x4 quadric % s ... 0 or missing = diagonalization by an orthonormal H % 1 = diagonalization by a Euclidean transform % H = [R T; 0 0 0 1], R orthonormal % R is chose such that x,y,z coordinates ...
github
PavelTrutman/FocalNet-master
P3PSolverFitImPoints.m
.m
FocalNet-master/deepag/bin/lib/geometry/P3PSolverFitImPoints.m
383
utf_8
6a1babd52f9f9e7fb4380dfc3d81dc26
% y = P3PSolverFitImPoints(x) - 3pt Minimal Absolute Camera Pose - ransac calibrated fit data computation % % x = struct % x.x = homogeneous coordinates of image matches % x.iK = inverse of camera calibration matrix % y = iK*x.x % T. Pajdla, pajdla@cmp.felk.cvut.cz % 2015-07-11 function y = P3PSolve...
github
PavelTrutman/FocalNet-master
xy2R.m
.m
FocalNet-master/deepag/bin/lib/geometry/xy2R.m
330
utf_8
9c5a9c682fdb4706410dc0c99b978918
% R = xy2R(x,y) - 2D rotation matrix R s.t. y = R x % % x,y ... column vectors % R ... rotation matrix s.t. y = R x % (c) T. Pajdla, pajdla@neovision.cz % 13 Aug 2007 function R = xy2R(x,y) x = x*diag(1./vnorm(x)); y = y*diag(1./vnorm(y)); R = [ x'*y [-y(2) y(1)]*x -[-y(2) y(1)]*x ...
github
PavelTrutman/FocalNet-master
q2Dres.m
.m
FocalNet-master/deepag/bin/lib/geometry/q2Dres.m
5,086
utf_8
a449b0b554aeb40e00496c650b175448
% [r,y,w] = q2Dres(Q,x[,s,dbgPath]) - Conic residuals % % Q ... 3 x 3 conic matrix % x ... 2 x n points % s ... [n d] - iteration stops if it>n or no point moves more % than d fraction of its distance ([10 0.01] implicitly) % 0 < n < 1 ... for each x: angle(y-x,normal(y)) < n*360 degrees % ...
github
PavelTrutman/FocalNet-master
camfulscup.m
.m
FocalNet-master/deepag/bin/lib/geometry/camfulscup.m
1,465
utf_8
0a3966be9380f7bb3da9fc7b31a7a9e5
% [X,X1,X2] = camfulscup(P1,z1,P2,z2,[,tol,quick]) - perspective camera fulcra intesection % % P1, P2 = 3x4 perspective camea projection matrix P = K*R*[I|-C] with rotation R, pose C and % % [1/bx s/f u0/f] % K = [0 1/by v0/f] % [0 0 1/f] % % determining the camera c...
github
PavelTrutman/FocalNet-master
u2L.m
.m
FocalNet-master/deepag/bin/lib/geometry/u2L.m
2,170
utf_8
ed8aa0cc2b4b072dda6558b4c785b3c4
% [L,LL] = u2L(u,C) - perspective back-projection % % u ... 2(3) x n image points, 2 -> 1's augmented % C ... camera C = P \in R^{3 x 4} or % C.K ... internal calibration matrix % C.E ... camera euclidean coordinate system transformation % C.rp ... [a] parameter of the r...
github
PavelTrutman/FocalNet-master
xonY.m
.m
FocalNet-master/deepag/bin/lib/geometry/xonY.m
457
utf_8
b001959ff7dd27cbc8cddf23cae771d3
% [y,z] = xonY(x,Y) - projection of x on subspace generated by columns of Y % % x = a column % Y = matrix of generators in its columns % y = projeciton of x to the space generated by columns of Y % z = x-y, i.e. the (y,z) is the ortogonal decomposition of x by Y % T. Pajdla, pajdla@cmp.felk.cvut.cz function [...
github
PavelTrutman/FocalNet-master
q2r.m
.m
FocalNet-master/deepag/bin/lib/geometry/q2r.m
475
utf_8
ca9e737f89aaa87d58543310e9a73997
% R = q2r(q) - rotation matrix to unit quaternion % % q = unit quaternion % R = 3 x 3 rotation matrix % Tomas Pajdla, pajdla@cmp.felk.cvut.cz % 2001-03-12 function R = q2r(q) q = q/vnorm(q); R = [q(1)^2+q(2)^2-q(3)^2-q(4)^2 2*(q(2)*q(3)-q(1)*q(4)) 2*(q(2)*q(4)+q(1)*q(3)) 2*(q(2)*q(3)+q(1)*q(4)...
github
PavelTrutman/FocalNet-master
CAHV2KRC.m
.m
FocalNet-master/deepag/bin/lib/geometry/CAHV2KRC.m
566
utf_8
a128ccdc821bfa4573d5b924a9542c5e
% [K,R,C] = CAHV2KRC(c) - CAHV to KRC camera model conversion % % c = CAHV camera model % c.C, c.A, c.H, c.V, c.b, c.type = 'CAHV', see X2u.m % K, R, C = KRC camera matrices, see X2u.m % T. Pajdla, pajdla@cmp.felk.cvut.cz % 2015-07-12 function [K,R,C] = CAHV2KRC(c) hc = c.A'*c.H; vc = c...
github
PavelTrutman/FocalNet-master
l2DresCnstrSeg.m
.m
FocalNet-master/deepag/bin/lib/geometry/l2DresCnstrSeg.m
560
utf_8
e2a1d4024b6ad1bb2de33e9bf9004637
% r = l2DresCnstrSeg(l,y,c) - Line residuals % y ... 2 x n points % l ... 3 x 1 line coordinates % c ...[x1 x2], such that x1 resp. x2 is on the left resp. right % from the line % r ... 1 x n residuals, Inf if constraints are not met % % See l2Dfit % (c) T.Pajdla, www.ne...
github
PavelTrutman/FocalNet-master
l2Dfit.m
.m
FocalNet-master/deepag/bin/lib/geometry/l2Dfit.m
1,207
utf_8
14ad82170725035dad9fe0c837dd5aea
% [l,r] = l2Dfit(y) - Line fit % y ... 2 x n points % l ... 3 x 1 line coordinates % r ... 1 x n residuals % z ... 4 x n [the closest points z on the line; y] % See l2Dres % (c) T.Pajdla, www.cvut.cz, 2016-08-08 function [l,r,z,C] = l2Dfit(y,~,dbg) if nargin>0 if nargin<3 dbg = false; en...
github
PavelTrutman/FocalNet-master
e3fit.m
.m
FocalNet-master/deepag/bin/lib/geometry/e3fit.m
5,993
utf_8
2d9b983d361d43687cd2922e69c94f61
%E3FIT Pajdla: Finds E(3) transformation minimizing LMSq/LSQ distance between two data sets % % % function [E,Ve,rW,res,rs,rres,dX,s] = e3fit(X1,X2,W,mode,par) % % X1,X2 = two registered cloud of 3-D points, one point ~ one row % W = a vector of weights, if missingt, ones are used % mode = 0 or mis...
github
PavelTrutman/FocalNet-master
sphp2x.m
.m
FocalNet-master/deepag/bin/lib/geometry/sphp2x.m
410
utf_8
5143c54d38ccb52c4fe7dc8ca86ceffd
% x = sphs2x(p) - Spherical parametrization of a unit vector to the unit vector % % sphs2x(p) = [cos(p(end))*sphs2x(p(1:end-1)) sin(p(end))] % % p ... n-1 x 1 matrix [radians] % x ... n x 1 matrix % % See also X2SPHS % (c) T.Pajdla, www.neovision.cz, Nov 1 2005 function x = sphs2x(p) x = zeros(length...
github
PavelTrutman/FocalNet-master
xy2T.m
.m
FocalNet-master/deepag/bin/lib/geometry/xy2T.m
2,630
utf_8
54c39e51f37cb2f5da1b7d8d859822fa
% T = xy2T(x,y,tr) - 2D point registration transforms % % tr ... 'E' ~ euclidean % x(:,1) -> y(:,1) & dir(x(:,1),x(:,2)) -> dir(y(:,1),y(:,2)) % ... 'S' ~ similarity % x(:,1) -> y(:,1) & x(:,2) -> y(:,2) % ... 'A' ~ affine % x(:,1) -> y(:,1) & x(:,2) -> y(:,2) & x(:...
github
PavelTrutman/FocalNet-master
uu2F.m
.m
FocalNet-master/deepag/bin/lib/geometry/uu2F.m
5,112
utf_8
24c54c017a95be671e6e066bcb8f4133
% [F,A] = uu2F(u[,mth]) - Fundamental matrix computation % % u = {u1 u2}, image matches u2'*F*u1 = 0 % mth = method ({'HZ','Free'} implicit) % mth{1} = normalization % 'None' = no normalization % 'HZ' = full affine as in HZ-2003 % '[-1,1]' = ranges of points are scal...
github
PavelTrutman/FocalNet-master
uu2X.m
.m
FocalNet-master/deepag/bin/lib/geometry/uu2X.m
13,808
utf_8
3cf96290b32f8d0575e0f1ced4ffc081
% [X,v,z,e,a] = uu2X(u,P,m) - optimal point reconstruction from projections % % u = image matches [[u1;v1;...;u2;v2;...] ...] % P = projection matrices [P1;P2;...] % X = optimal reconstruction of points minimizing the sum of squared reprojection errors % v = optimal projection of X % z = 2 x n z coordinates of p...
github
PavelTrutman/FocalNet-master
vnorm.m
.m
FocalNet-master/deepag/bin/lib/geometry/vnorm.m
175
utf_8
88fafc45408a22c887c1d51518407815
% n = vnorm(x) - columnwise vector 2 norm % % n = sqrt(sum(x.^2)) % (c) T.Pajdla, cmp.felk.cvut.cz, May 2 2006 function n = vnorm(x) n = sqrt(sum(x.^2)); return
github
PavelTrutman/FocalNet-master
uL2rd.m
.m
FocalNet-master/deepag/bin/lib/geometry/uL2rd.m
1,894
utf_8
f716b76a0390252448a5e76032ea98be
% [R,x,e,z] = uL2rd(u,L,R,rc,opts) - radial distortion estimation from lines % % u ... u{i} = 2 x n projections if the i-th target % L ... L{i}{j} = indices of points lying on a stright line in the tartget % R ... radial distortion descriptor, see u2ru % R.x0 ... 2 x 1 distortion center ([0;0] implicit if...
github
PavelTrutman/FocalNet-master
uu2PPXRFit_testing_Robert.m
.m
FocalNet-master/deepag/bin/lib/geometry/uu2PPXRFit_testing_Robert.m
8,840
utf_8
e1fc8db40de071852fa41acfeb73c408
% [P,X,in,e,F,u] = uu2PPXRFit(u,K,op,debug) - calibrated reconstruction from two images % % u = {u1, u2} with u1, u2 2 x n image projection matrices % K = {K1, K2} with 3 x 3 camwra calibration matrices % op = parameters % % RANSAC (see ransacfit with E5ptNister model): % op.maxres = 2*sN; % maximal residual...
github
PavelTrutman/FocalNet-master
XY2rot.m
.m
FocalNet-master/deepag/bin/lib/geometry/XY2rot.m
422
utf_8
2e3b32725d44d47dfce60e43e4b4d6d6
% R = XY2rot(X1,X2) - optimal rotation registration % % R = arg min ||X2 - r*X1|| % % X1 ... 3 x n points % X2 ... 3 x n points % R ... 3 x 3 rotation % T. Pajdla, pajdla@cmp.felk.cvut.cz % 2015-08-09 function R = XY2rot(X1,X2) % direction correlation matrix K = zeros(3,3); for i=1:size(X1,2) ...
github
PavelTrutman/FocalNet-master
uX2PRFit.m
.m
FocalNet-master/deepag/bin/lib/geometry/uX2PRFit.m
1,653
utf_8
a71375a63cb71eaa238b973df470a094
% [P,in,e] = uX2PRFit(u,X,C,op) - Absolute camera pose from one image % % u = 2 x n image projections % C = camera calibration structure, see X2u.m % op = parameters % RANSAC (see, e.g. ransacfit with P4ptP4Pf model): % op.maxres = 2*sN; % maximal residual in pixels = 2*max image noise % op.smpls...
github
PavelTrutman/FocalNet-master
prec.m
.m
FocalNet-master/deepag/bin/lib/geometry/prec.m
4,750
utf_8
b953838208bafe60092291b85633baa0
%PREC Pajdla: Projective reconstruction from correspondences % % function [X,M1,M2,dx] = prec(u,[K1,K2,E1,E2]) % % u = correspondences in the format [u1 ; v1 ; u2 ; v2] % K1,K2 = camera calibration matrices, 3x3 matrices % E1,E2 = camera positions, 4x4 matrices repr. an Euclidean % ...
github
PavelTrutman/FocalNet-master
Hctr.m
.m
FocalNet-master/deepag/bin/lib/geometry/Hctr.m
636
utf_8
753302a6b216b66f5a9d6cc0dcbd3e92
% A = Hctr(H,x) - Homography mapping covariance trannsformation for point x % % H ... 3 x 3 homography matrix % x ... (3)2 x 1 2D point % A ... 2 x 2 transformation matrix % % e_x' * inv(C_x) * e_x = I and e_y' * inv(C_y) * e_y = I % % C_y = T * C_x * T' % (c) T.Pajdla, www.neovision.cz, N...
github
PavelTrutman/FocalNet-master
imHim.m
.m
FocalNet-master/deepag/bin/lib/geometry/imHim.m
6,389
utf_8
11114e0edf1563c6c5978d3edf9c6244
% [io,A,ri,ro,roi,xi,xo,xoi] = imHim(im,H[,rs,rc]) - Homography mapping of an image % % H ... 3 x 3 homography matrix w.r.t. coordinates [col row 1] % im ... input image % rs ... resolution = number of pixels for the smallest size of the output bounding box % rc ... [cmin cmax rmin rmax] rectangle (full image implicit...
github
PavelTrutman/FocalNet-master
uX2P.m
.m
FocalNet-master/deepag/bin/lib/geometry/uX2P.m
9,346
utf_8
927e1cc656613311b1d511a78ba46b7c
% [P,e,T] = uX2P(u,X[,cType,E,T]) - camera projection matrix P from 3D points X and their projections u % % cType = 'perspective' (implicit) or 'affine' ... estimates the standard cameras % % u ... 3 x n image points, affine coords for finite points % X ... 4 x n homogeneous coordinat...
github
PavelTrutman/FocalNet-master
xy2dXres.m
.m
FocalNet-master/deepag/bin/lib/geometry/xy2dXres.m
472
utf_8
28f96a4d1b8767b371da3491af066ce0
% [e,J] = xy2dXres(x,y,H) - Target points homography residuals % % x ... 2 x 1 2D target point % y{i} ... i-th view 3 x n 2D points % H{i} ... i-th view homography % e ... residuals % (c) T.Pajdla, www.neovision.cz, Feb 2 2006 function e = xy2dXres(x,y,H) for i=1:length(H) % 'y-y' error: e{i}...
github
PavelTrutman/FocalNet-master
qfit.m
.m
FocalNet-master/deepag/bin/lib/geometry/qfit.m
889
utf_8
48f44015f310335e632617e23b126bb4
% [Q,e] = Qfit(X) - LSQ Quadric fit % % X ... 3xN points % Q ... 4x4 quadric % e ... residuals % (c) T.Pajdla, www.neovision.cz, Oct 25, 2004 function [Q,e] = Qfit(X) % B = [eye(3)/s -X0;0 0 0 1] % Y = B*X X0 = mean(X')'; Y = X-X0*ones(1,size(X,2)); s = std(sqrt(sum(Y.*Y))); Y = Y/s; B = [eye(3...
github
PavelTrutman/FocalNet-master
H4P2I0.m
.m
FocalNet-master/deepag/bin/lib/geometry/H4P2I0.m
365
utf_8
7a8e6943e52b667b83e6b68426895f81
% H = H4P2I0(P) - Matrix H transforming 3x4 camer matrix P of a finite cameras into [I|0]=P*H % % P = 3x4 rank 3 projection matrix % H = 4x4 matrix H(4,:)=[0 0 0 1] sich that [I|0]=P*H % T.Pajdla, pajdla@cmp.felk.cvut.cz % 2015-08-23 function H = H4P2I0(P) if rank(P(:,1:3))>2 H = [P(:,1:3)\[eye(3) -P(...
github
PavelTrutman/FocalNet-master
p3Dres.m
.m
FocalNet-master/deepag/bin/lib/geometry/p3Dres.m
256
utf_8
cc8f4f0afb4880ec844cec0a3edc8b63
% r = p3Dres(l,y) - Plane residuals % y ... 3 x n points % l ... 4 x 1 plane coordinates % r ... 1 x n residuals % % See p3Dfit % (c) T.Pajdla, pajdla@cvut.cz, 2015-01-03 function r = p3Dres(p,y,~,~) r = p'*[y ; ones(1,size(y,2))]; return
github
PavelTrutman/FocalNet-master
P2KRC.m
.m
FocalNet-master/deepag/bin/lib/geometry/P2KRC.m
603
utf_8
8151a12dbddba13e3a8e6157d6639e34
% [K,R,C] = P2KRC(P) - Camera matrix P decomposition to K, R, C: P = K*R*[I -C] % % P = camera calibration matrix ; size = 3x4 % K = matrix of internal camera parameters % R = rotation matrix % C = camera center % Tomas Pajdla, pajdla@cmp.felk.cvut.cz % 2015-08-26 function [K,R,C] = P2KRC(P)...
github
PavelTrutman/FocalNet-master
ux2rdcres.m
.m
FocalNet-master/deepag/bin/lib/geometry/ux2rdcres.m
2,020
utf_8
6b700971ea97067934fc4af59d8711bd
% e = ux2rdcres(c,u,x) - radial distortion center estimation residuals % % u ... u{i} = 2 x n projections of the i-th target % x ... x{i} = 2 x n calibration taget points % c ... 2 x 1 distortion center % e ... distance of x mapped by the best homography from the lines % l = [c]_x u %...
github
PavelTrutman/FocalNet-master
uPXBA.m
.m
FocalNet-master/deepag/bin/lib/geometry/uPXBA.m
65,666
utf_8
e8abcb597105c4b1dbfd1845c1af4b40
% [u,P,X,e] = uPXBA(u,P,X,op,ic,ip) - bundle adjustment of 3D points X, camaras P and image point u % % u = {u1, u2, ...} of 2 x n image projections % P = {P1, P2, ...} of camera descriptions, see X2u % X = 3 x n 3D points % ic = {i1, i2, ...} of 1 x n camera ids for u's (if missing, all cameras see all points) %...
github
PavelTrutman/FocalNet-master
xy2dHres.m
.m
FocalNet-master/deepag/bin/lib/geometry/xy2dHres.m
4,028
utf_8
d9c3cc4f2896b196d1c8842f63af1aac
% [e,J] = xy2dHres(x,y[,m,opts,X,ix]) - Residuals of homohgraphies & targer points % % y{i} ... 3 x n 2D observed image points % m ... {'X','HX'} % X ... residuals of given x w.r.t. etimated best H's % x ... 2*n x 1 (3 x n) 2D target points % HX ... residuals of given x ...
github
PavelTrutman/FocalNet-master
uP2X.m
.m
FocalNet-master/deepag/bin/lib/geometry/uP2X.m
861
utf_8
0708abc147a192f87a54b36a027956ee
% X = uP2X(u,C,P) - 3D points X on a calibration planes P seen by pixel u % % P ... 4 x 1 plane vector % C ... camera % C.K ... internal calibration matrix % C.E ... camera euclidean coordinate system transformation % C.rp ... [a] parameter of the radial distortion division % ...
github
PavelTrutman/FocalNet-master
F2f1f2.m
.m
FocalNet-master/deepag/bin/lib/geometry/F2f1f2.m
1,380
utf_8
cb40895c4957f7959437e823721e9e6e
% f = F2f1f2(F,[p,mth]) - Focal lengths from Fundamental matrix % % F = Fundamental matrix with diagonal K1 = diag([f1 f2 1]), K2 = diag([f2 f2 1]) % p = {p1 p2} princial points ({[0;0] [0;0]} implicit) % mth = method % 'Bougnoux' - Bougnoux formula from HZ (implicit) % % T. Pajdla, pajdla@cvut.cz, 2016-08-28 ...
github
PavelTrutman/FocalNet-master
XdL.m
.m
FocalNet-master/deepag/bin/lib/geometry/XdL.m
357
utf_8
ec51b8a853f936ee6aa084177a0d8ebf
% d = XdL(X,L) - Distance of a point X from a line L % % X ... 4 x n points % L ... 4 x 4 line Plucker matrix % d ... 1 x n distances % (c) T.Pajdla, www.neovision.cz, Oct 5, 2004 function d = XdL(X,L) [u,d,v] = svd(L); PIn = v(:,3:4); PIn = [PIn./(ones(4,1)*sqrt(sum(PIn(1:3,:).^2)))]'; d ...
github
PavelTrutman/FocalNet-master
PPXRecQ.m
.m
FocalNet-master/deepag/bin/lib/geometry/PPXRecQ.m
1,737
utf_8
824b8aeb9e9c8c360d01d3088bc97255
% q = PPXRecQ(P1,P2,X,type,par) - Quality of the Reconstruction of X from cameras P1, P2, the bigger the better % % P1, P2 = 3 x 4 camera projection matrix % X = 3 x n 3D points % type = type of the quality measure % 'ApXMeanN' = number of points N times the mean of the apical angle at points X (i...
github
PavelTrutman/FocalNet-master
XdX.m
.m
FocalNet-master/deepag/bin/lib/geometry/XdX.m
312
utf_8
160c96dc6ff3602a24f749659b8d27ee
% d = XdX(x) - 2D point distance matrix % % x ... 2 x n point coordinates % d ... n x n point symmetric matrix of distances % (c) T.Pajdla, www.neovision.cz, Sep 6, 2005 function d = XdX(x) dm = ([repmat(x,[size(x,2),1])-repmat(x(:),[1,size(x,2)])]); d = sqrt(dm(1:2:end,:).^2+dm(2:2:end,:).^2);
github
PavelTrutman/FocalNet-master
E2PP.m
.m
FocalNet-master/deepag/bin/lib/geometry/E2PP.m
1,968
utf_8
ce1fdc6e0add79366fa53a422d56397c
% {P1,P2} = E2PP(E) - Essential Matrix E to projection matrices P1, P2 (4 solutions) % % E = essential matrix % P1 = projection matrix = {[I 0],[I 0],[I 0],[I 0]} % P2 = projection matrix = { , , , } % % such that % % x2^T E x1 = 0 => a1 x1 = P1 * X & a2 x2 = P2 X % % The distance between the...
github
PavelTrutman/FocalNet-master
rq3.m
.m
FocalNet-master/deepag/bin/lib/geometry/rq3.m
781
utf_8
3d11e6d7c489de7f298b2b5516bab03e
%RQ3 Pajdla: Returns a 3x3 upper triangular R and a unitary Q so that X = R*Q % % function [R,Q] = rq3(X) % % X = input matrix, % Q = unitary matrix % R = upper triangular matrix % % See also QR. % Author: Tomas Pajdla, Tomas.Pajdla@esat.kuleuven.ac.be % ...
github
PavelTrutman/FocalNet-master
q2par.m
.m
FocalNet-master/deepag/bin/lib/geometry/q2par.m
953
utf_8
79176f42ca53a96e983ca5e6bb703f25
% [p,A] = q2par(q) - Conic matrix q to conic parameters p = [x0 y0 a b th] % % q = 3 x 3 conic matrix % a = major semiaxis % b = minor semiaxis % th = rotation angle % A = diagonalization matrix A'*q*A = diag([1/a^2 1/b^2 -1]) % T. Pajdla pajdla@cvut.cz 2014-01-10 function [p,A] = q2par(q) q = (q+q')/2;...
github
PavelTrutman/FocalNet-master
qres.m
.m
FocalNet-master/deepag/bin/lib/geometry/qres.m
339
utf_8
61e730e721a836974ba1a6dfa7e97a1e
% e = qres(Q,X) - evaluate meaningful residuals for a quadric % % X ... 3xN points % Q ... 4x4 quadric % e ... residuals % (c) T.Pajdla, www.neovision.cz, Oct 25, 2004 function e = qres(Q,X) X = a2h(X); P = Q*X; n = [1;1;1;1]*sqrt(sum(P(1:3,:).*P(1:3,:))); P = P./n; e = sum...
github
PavelTrutman/FocalNet-master
KRC2P.m
.m
FocalNet-master/deepag/bin/lib/geometry/KRC2P.m
422
utf_8
e152a751f95cba46ea9c47fad562f9c1
% P = P2KRC(K,R,C) - Camera matrix P = K*R*[I -C] % % P = camera calibration matrix ; size = 3x4 % K = matrix of internal camera parameters % R = rotation matrix % C = camera center % or % K = struct K.K, K.R, K.C % Tomas Pajdla, pajdla@cmp.felk.cvut.cz % 2015-08-26 function P =...
github
PavelTrutman/FocalNet-master
xy2R3.m
.m
FocalNet-master/deepag/bin/lib/geometry/xy2R3.m
866
utf_8
55160e61df76b71804bbc8d541637b28
% R = xy2R3(x,y) - 3D rotation matrix R s.t. y = R x % % x,y ... column vectors % R ... rotation matrix s.t. y = R x % (c) T. Pajdla, pajdla@neovision.cz % 1 May 2008 function R = xy2R3(x,y) x = x*diag(1./vnorm(x)); y = y*diag(1./vnorm(y)); switch size(x,2) case 1 v = cross(x,y); c...
github
PavelTrutman/FocalNet-master
E5ptNister.m
.m
FocalNet-master/deepag/bin/lib/geometry/E5ptNister.m
4,105
utf_8
bc7f1d8f25c1b2bee2bab71b9707004f
% E = E5ptNister(X[,E]) - 5pt Minimal Relative Pose of Two Cameras by D. Nister % % E = essential matrix(ces) celarray (E = R [C_delta]_x) % X(1:2,:) = 3 x 5 points in image 1 % X(3:4,:) = 3 x 5 points in image 2 % T. Pajdla, pajdla@cvut.cz % 2016-08-28 function E = E5ptNister(X,E) if nargin>0 ...
github
PavelTrutman/FocalNet-master
x2sphp.m
.m
FocalNet-master/deepag/bin/lib/geometry/x2sphp.m
428
utf_8
b0c1b8c3fec70009493e8e8cafb96757
% p = x2sphs(x) - Spherical parametrization of a unit vector % % x2sphs(x) = [x2sphs(x(1:end-1))*acos(|x(1:end)|) asin(x(end))] % % x ... n x 1 matrix % p ... n-1 x 1 matrix % % See also SPHS2X % (c) T.Pajdla, www.neovision.cz, Nov 1 2005 function p = x2sphs(x) i = length(x)-1; n = norm(x(1:i)); while...
github
PavelTrutman/FocalNet-master
ux2rdc.m
.m
FocalNet-master/deepag/bin/lib/geometry/ux2rdc.m
1,879
utf_8
83d435fd824fa18fecd0f7b5998d72b5
% c = ux2rdc(u,x[,mth,opts]) - radial distortion center % % u ... u{i} = 2 x n projections if the i-th target % x ... 2 x n calibration taget points % mth ... 'svd' = svd fit (implicit) % ... 'bnd' = svd + bundle adjustment % opts ... lsqnonlin options, see optimset % c ... 2 x 1 distortio...
github
PavelTrutman/FocalNet-master
m2krt.m
.m
FocalNet-master/deepag/bin/lib/geometry/m2krt.m
188
utf_8
d95d8d71b4b6fe75fd3f875d49e455e3
%[K,R,T] = m2krt(M) - Camera matrix conversion to K,R,T - obsolete chage to P2KRC % Tomas Pajdla, pajdla@cmp.felk.cvut.cz % 2015-08-26 function [K,R,T] = m2krt(M) [K,R,T] = P2KRC(M);
github
PavelTrutman/FocalNet-master
unorm.m
.m
FocalNet-master/deepag/bin/lib/geometry/unorm.m
364
utf_8
65d44f746eca2b9810d72ddd2779fb7b
% n = unorm(x) - columnwise vector 2 normalization % % n = x ./ repmat(sqrt(sum(x.^2)),size(x,1),1) % (c) T.Pajdla, cmp.felk.cvut.cz, May 2 2006 function n = unorm(x) % n = bsxfun(@times,x,d); % n = x.*d(ones(size(x,1),1),:); d = 1./sqrt(sum(x.^2)); n = x.*repmat(d,size(x,1),1); %n ...
github
PavelTrutman/FocalNet-master
XY2rtsErr.m
.m
FocalNet-master/deepag/bin/lib/geometry/XY2rtsErr.m
366
utf_8
46acfa66848e450268498257bc11dbf2
% e = XY2rtsErr(E,X) - e = ||X{2} - (s*r*X{1} + t)|| % % X1 ... 3 x n points % X2 ... 3 x n points % E.r ... 3 x 3 rotation % E.t ... 3 x 1 translation % E.s ... 1 x 1 scale % e ... errors % T. Pajdla, pajdla@cmp.felk.cvut.cz % 6 Jan 2009 function e = XY2rtsErr(E,X,cnstr) e = sqrt(sum( (X(4:6,:)-(E.s...
github
PavelTrutman/FocalNet-master
MatchGeomVerif.m
.m
FocalNet-master/deepag/bin/lib/geometry/MatchGeomVerif.m
9,653
utf_8
94210ebc3abdb303bb7afb35476ee567
% [vmatch,H] = MatchGeomVerif(type,f1,f2,match,options) - Geometric verification of image matches % % type = {'PRACT' ... geometricVerification of Vedaldi's "Practical" % 'MPRACT'}... geometricVerification + muptiple homographies % f1, f2 = m x n fature matrix (m=3...disc, 4...oriented disc, 5...e...
github
PavelTrutman/FocalNet-master
PPXRecC.m
.m
FocalNet-master/deepag/bin/lib/geometry/PPXRecC.m
811
utf_8
321297f94059f72af275176e822a8295
% c = PPXRecC(P1,X1,P2,X2) - Consistency of two Reconstructions: X1, P1{1}, P1{2} vs X2, P2{1}, P2{2}, the smaller, the better % % P1, P2 = {1:2} of 3 x 4 camera projection matrix % X1, x2 = 3 x n 3D points % c = [c ma1 ma2] % c = consistency abs(ma1-ma2)/min(ma1,ma2) % ...
github
PavelTrutman/FocalNet-master
ransacfitIdF.m
.m
FocalNet-master/deepag/bin/lib/geometry/ransacfitIdF.m
154
utf_8
73ce1bdf985a58aac03f04c3efca63b7
% y = ransacfitIdF(x) - ransac fit identity function y = x % T. Pajdla, pajdla@cmp.felk.cvut.cz % 2015-07-11 function y = ransacfitIdF(x) y=x;
github
PavelTrutman/FocalNet-master
PPX2ae.m
.m
FocalNet-master/deepag/bin/lib/geometry/PPX2ae.m
1,421
utf_8
21b6b71345689f1a6bf5af6337635f69
% a = PPX2ae(P1,P2,X) - Apical angles of the epipolar triangles P1, X, P2 % % P1, P2 = 3 x 4 camera projection matrix % X = 3 x n 3D points % a = apical angles [rad] in the epipolar triangle C1-X-C2 % a(1,:) = angle(C2,C1,X) ... apical angle at camera 1 % a(2,:) = angle(X,C2,C1) ... apical angle at camer...
github
PavelTrutman/FocalNet-master
ux2rd.m
.m
FocalNet-master/deepag/bin/lib/geometry/ux2rd.m
1,785
utf_8
b0fee5691158187fa2dc4c3e6c1b14fb
% [R,x,e] = ux2rd(u,X,R,rc,opts) - radial distortion estimation from homographies % % u ... u{i} = 2 x n projections if the i-th target % X ... 2 x n coordinates of the target % R ... radial distortion descriptor % R.x0 ... 2 x 1 distortion center ([0;0] implicit if field r.x0 missing) % R.p ... 1...
github
PavelTrutman/FocalNet-master
h2a.m
.m
FocalNet-master/deepag/bin/lib/geometry/h2a.m
743
utf_8
7ad6f1c480a8a22edc201a6e8eec2c72
% x = h2a(X[,w]) - homogeneous to affine coordinates % % X ... homogeneous coordinates in columns % w(i) = 0 ... point at infinity % x ... affine coordinates in columns % (c) T.Pajdla, www.neovision.cz, Sep 10, 2004 function x = h2a(X,w) x = X(1:end-1,:); xe = X(end,:); if nargin<2 ...
github
PavelTrutman/FocalNet-master
EGeomErr.m
.m
FocalNet-master/deepag/bin/lib/geometry/EGeomErr.m
1,452
utf_8
8312686dc0d4aa0071f2a8b1ced642ec
% e = EGeomErr(E,X,iK) - 5pt Minimal Relative Pose of Two Cameras by D.Nister - Error % % E = Fundamenral matrix(ces) as E(:,:), E(:,:,i) or E{i} % X(1:2,:) = 3 x n uncalibrated points in image 1 (= x1) % X(3:4,:) = 3 x n uncalibrated points in image 2 (= x2) % iK = [iK1;iK2] ... stacked inverses of ...
github
PavelTrutman/FocalNet-master
xy2H.m
.m
FocalNet-master/deepag/bin/lib/geometry/xy2H.m
6,422
utf_8
79df364d4effb93fd2481ca318f60434
% [H,d] = xy2H(x,y[,m,dp,op]) - Homography estimation % % \exists a \in R such that a y ~ H x where ~ stands for "approximates" % % x ... 3 x n 2D points % y ... 3 x n 2D points % H ... 3 x 3 homography matrix % d ... 1 x n residuals computed by using resid % m ... {method, resids} % method = 'DLT' .....
github
PavelTrutman/FocalNet-master
xy2nxy.m
.m
FocalNet-master/deepag/bin/lib/geometry/xy2nxy.m
1,770
utf_8
469dd49db468c8f2d057d5e5c3e1a46e
% [A,B] = xy2nxy(x,y) - Point normalization for multiple view geometry - 2 images % % mean(A*x) = 0 & mean(B*y) = 0 & std(|A*x|) = sqrt(2) & std(|B*y|) = sqrt(2) % % x, y ... 2 x n points (if 3 x n, the last coord. is ignored) % A, B ... 3 x 3 affinity matrix % % R.Hartley, A.Zisserman. Multiple View Geometry. 2...
github
PavelTrutman/FocalNet-master
P4ptP4Pf.m
.m
FocalNet-master/deepag/bin/lib/geometry/P4ptP4Pf.m
510
utf_8
a4bd16136cd3e863720cf513eac1cdc1
% P = P4ptP4Pf(X,P) - 4pt Minimal Ablsoute Pose Problem % % P = 3x4 projection matrix % X(1:3,:) = 3 x 4 3D points % X(4:5,:) = 2 x 4 image projections % T. Pajdla, pajdla@cmp.felk.cvut.cz % 2015-09-06 function P = P4ptP4Pf(X,P) if nargin>0 if all(size(X)==[5 4]) [f,R,t] = P4Pf(X(4:5,:)...
github
PavelTrutman/FocalNet-master
ransacfit.m
.m
FocalNet-master/deepag/bin/lib/geometry/ransacfit.m
10,001
utf_8
c4711ff3c43bf7305ed4f730b655812d
% [p,inl,res,L] = ransacfit(x,model,maxres,smpls,smpln[,doLO,cnstr]) - Ransac fitting % % x ... data - structure depends on the model, see the function % implementation % model ... {'line','line-cnstr-seg','plane','conic','3Dpts','E5ptNister','P3PSolver','uX2PSolver'} % maxres ....
github
PavelTrutman/FocalNet-master
XY2rts.m
.m
FocalNet-master/deepag/bin/lib/geometry/XY2rts.m
637
utf_8
34eca7fdd10bc1e32ca1c1559df4bf09
% E = XY2rts(X) - E = arg min ||X(4:6,:) - (s*r*X(1:3,:) + t)|| % % X(1:3,:) ... 3 x n points % X(4:6,:) ... 3 x n points % E.r ... 3 x 3 rotation % E.t ... 3 x 1 translation % E.s ... 1 x 1 scale % T. Pajdla, pajdla@cmp.felk.cvut.cz % 6 Jan 2009 function E = XY2rts(X) X1 = X(1:3,:); X2 = X(4:6,:); % c...
github
PavelTrutman/FocalNet-master
qP2c.m
.m
FocalNet-master/deepag/bin/lib/geometry/qP2c.m
3,488
utf_8
497fd26923d67dc33d4e45d5130c1862
% [c,A] = qP2c(u,K) - the projection of the center of a circle observed as an ellise in an mage with known K matrix % % u = 2 x n image coordinates of point on the observed ellipse % K = camera internal K-matrix % c = 2 x 1 projection of the center of the observed circle % A = rectification matrix from the ellips...
github
PavelTrutman/FocalNet-master
ratraxa.m
.m
FocalNet-master/deepag/bin/lib/geometry/ratraxa.m
374
utf_8
2c5dcced93110c492179e737ac6deb8b
% R = ratraxa(v,a) - a rational approximation of rotation aroung v by a % % v = rotation axis vector % a = rotation angle in (-pi/2 pi/2) % R = rotation matrix % 2011-10-31, T. Pajdla, pajdla@gmail.com function R = ratraxa(v,a) tol = 10^6*eps; v = v/norm(v); [a(1),a(2)] = rat(tan(a),tol); f = atan2(v(2)...
github
PavelTrutman/FocalNet-master
xconstr2T.m
.m
FocalNet-master/deepag/bin/lib/geometry/xconstr2T.m
7,055
utf_8
bb50b62946db32ef30a51b85b825567a
% t = xconstr2T(x1,x2,d[,p]) - L_infty solution to camera translation for known rotation % % x1, x2 ... image points, 3 x n % d ... [d1 d2] = tolerance circle radii % sp ... 0 (or mising) - d = radius in pixels in the 2D image % 1 - d = radius in radians on the sphere % p ...
github
PavelTrutman/FocalNet-master
kr3.m
.m
FocalNet-master/deepag/bin/lib/geometry/kr3.m
371
utf_8
eb3c95413373c4955dca8dfa19b73765
% [K,R] = kr3(A) - Matrix decomposition A = K*R, K triu, R rotation % % A = 3 x 3 matrix, % K = upper triangular matrix % R = rotation % % (c) T. Pajdla, pajdla@cmp.felk.cvut.cz % 5 May 2008 function [K,R] = kr3(A) R(3,:) = A(3,:)/norm(A(3,:)); R(1,:) = cross(A(2,:),R(3,:)); R(1,:) = R(1,:)/norm(...
github
PavelTrutman/FocalNet-master
PP2F.m
.m
FocalNet-master/deepag/bin/lib/geometry/PP2F.m
630
utf_8
ad3a0acf5cfa99cc1cfe33b85bd4c3d1
% F = PP2F(P1,P2) - Fundamental matrix F from projections matrices P1, P2 % % P1, P2 = projection matrices % F = Fundamental matrix F = [P2*null(P1)]_x * P2 * pinv(P1) scaled such that ||F||_F = sqrt(2)*||C2-C1|| % T.Pajdla, pajdla@cvut.cz % 2015-07-11 function F = PP2F(P1,P2) if all(isfinite(P1(:))) && a...
github
PavelTrutman/FocalNet-master
p3p.m
.m
FocalNet-master/deepag/bin/lib/geometry/p3p.m
7,015
utf_8
70522de70dc6b17302b78f559dc625d1
% [R,C,f,cs] = p3p(u,x[,d]) - P3P problems (regular case) % % u = 3 x 3 matrix of image projections % x = 3 x 3 matrix of 3D points stored as columns % d = {0,1} debug plot flag % R = 3 x 3 x n matrix of n camera rotations % C = 3 x n matrix of camera centers % f = handles to debug plots % cs = case used A=1,B1...
github
PavelTrutman/FocalNet-master
P3PSolver.m
.m
FocalNet-master/deepag/bin/lib/geometry/P3PSolver.m
522
utf_8
751b0a4fb8afe8dd59975b5e3b013932
% P = P3PSolver(X[,P]) - Absolute Camera Pose Solver % % P = Calibrated camera P =[R -R*C] matrix celarray % X(1:3,:) = 3 x 3 points in image 1 % X(4:6,:) = 3 x 3 3D points % T. Pajdla, pajdla@cmp.felk.cvut.cz, 2015-09-09 function P = P3PSolver(X,P) if nargin>0 if nargin<2 % slove for P3P ...
github
PavelTrutman/FocalNet-master
PerspRepErr.m
.m
FocalNet-master/deepag/bin/lib/geometry/PerspRepErr.m
951
utf_8
c8815ace461daae0b355c66c9ea5dc98
% e = PerspRepErr(P,X,K) - Perspective reprojection error % % P = Calibrated projection matrix [R -R*C], P, P(:,:,i) or P{i} % K = Camera calibration matrix % X(1:3,:) = 3 x n image projections % X(4:6(7),:) = 3(4) x n 3D points % e = image reprojection error % T. Pajdla, pajdla@cmp.felk.c...
github
PavelTrutman/FocalNet-master
xy2Hres.m
.m
FocalNet-master/deepag/bin/lib/geometry/xy2Hres.m
1,249
utf_8
438975ecae58e373b6b1d0572fbde346
% e = xy2Hres(H,x,y,obj) - Homography residuals % % H ... 3 x 3 (9 x 1) homography matrix % x ... 3 x n 2D points % y ... 3 x n 2D points % obj ... 'x-x' ... error in x % e = dy = sqrt(sum((h2a(inv(H)*y)-h2a(x)).^2)); % 'y-y' ... error in y % e ...
github
PavelTrutman/FocalNet-master
ux2rdres.m
.m
FocalNet-master/deepag/bin/lib/geometry/ux2rdres.m
1,072
utf_8
ff1018f6beb18c44adf2f004d3aa79d1
% e = ux2rdres(p,R,u,X) - radial distortion estimation from homographies - residuals % % R ... radial distortion model, see ur2u % p ... [c(1) c(2) rp] ... model parameters % c = center % rp = distortion parameters, see ur2u % u ... u{i} = 2 x n projections of the i-th target ...
github
PavelTrutman/FocalNet-master
x2nx.m
.m
FocalNet-master/deepag/bin/lib/geometry/x2nx.m
1,513
utf_8
5e7093802dcb11046d24b513437232cc
% A = x2nx(x[,mtd]) - Point normalization for multiple view geometry % % mtd = 'HZ' ... mean(A x) = 0 & std(|A x|) = sqrt(2) (implicit) % = '[-1,1]' ... scaled to fit range(|A x|) = [-1 1] % % x ... 2 x n points (if 3 x n, the last coordinate is ignored) % A ... 3 x 3 affinity matrix % % R.Hartley, ...
github
PavelTrutman/FocalNet-master
uX2PSolver.m
.m
FocalNet-master/deepag/bin/lib/geometry/uX2PSolver.m
378
utf_8
a9cc67cb98471917558307f878b4560b
% P = uX2PSolver(X[,P]) - Absolute Camera Pose Solver % % P = Camera P matrix celarray % X(1:3,:) = 3 x 3 points in image 1 % X(4:6,:) = 3 x 3 3D points % T. Pajdla, pajdla@cmp.felk.cvut.cz, 2015-09-09 function P = uX2PSolver(X,P) if nargin>0 if nargin<2 % solve P = {uX2P(X(1:3,:),a2h(X(4:...
github
PavelTrutman/FocalNet-master
camplot.m
.m
FocalNet-master/deepag/bin/lib/geometry/camplot.m
2,768
utf_8
3045843fced36f60977c9c7eccea82e8
% h = camplot(P[,f,c,u,t]) - perspective camera plotting % % P = Camera structure P.K, P.R, P.C see X2u.m % or 3x4 perspective camea projection matrix P = K*R*[I|-C] with rotation R, pose C and % % [1/bx s/f u0/f] % K = [0 1/by v0/f] % [0 0 1/f] % % determining ...
github
PavelTrutman/FocalNet-master
pfit.m
.m
FocalNet-master/deepag/bin/lib/geometry/pfit.m
4,557
utf_8
2de6afca15d1cbda5f8f1ba2a9798a57
%PFIT Pajdla: Plane fit using Least Squares or Least Winsorized Squares % % % function [p,Vp,rW,res,rs,rres] = pfit(X,W,mode,par) % % X1 = 3-D points, one point ~ one row % W = a vector of weights, if missingt, ones are used % mode = 0 or missing ... least squares minimization % min sum d^...
github
PavelTrutman/FocalNet-master
XX2L.m
.m
FocalNet-master/deepag/bin/lib/geometry/XX2L.m
582
utf_8
bb6736881a762800fbc3db9982e7b0e2
% L = XX2L(X,Y) - Plucker line matrix from 2 points % % X ... 4 x 1 [x n] point[s] % Y ... 4 x 1 point % L ... 4 x 4 [x n] ray Plucker matrix[ces] % (c) T.Pajdla, www.neovision.cz, Feb 3, 2005 function L= XX2L(X,Y) if size(X,2)==1 L = X*Y'-Y*X'; else L(:,1,:) = X * Y(1); L(:,2,:) = X * Y(2);...
github
PavelTrutman/FocalNet-master
PQP2q.m
.m
FocalNet-master/deepag/bin/lib/geometry/PQP2q.m
546
utf_8
ca9733f497483eacc99f45835b806586
% [q,H] = PQP2q(Q,p,P) - Projection of the intersection of a quadric Q with a plane p by camera P % % Q ... 4x4 quadric % p ... 4x1 plane % P ... 3x4 camera projection matrix % q ... 3x3 conic in the plane P % H ... change of coordinates to make p into w=0 % (c) T.Pajdla, www.neovision.cz, Oct 26, 2004 funct...
github
PavelTrutman/FocalNet-master
QP2q.m
.m
FocalNet-master/deepag/bin/lib/geometry/QP2q.m
1,541
utf_8
e41599c674f15da83892289fb8665bea
% [q,x,V] = QP2q(Q,P[,N]) - Intersection of a quadric Q with a plane P % % Q ... 4x4 quadric % P ... 4x1 plane % q ... 3x3 conic in the plane P % V ... change of coordinates to make P into x=0 % x ... 4xN points on the intersection conic (N points 100 pts implicit), % homogeneous coordinates % (c) T.Pa...
github
PavelTrutman/FocalNet-master
imsldruchclbk.m
.m
FocalNet-master/deepag/bin/lib/utils/imsldruchclbk.m
488
utf_8
ae79dcf1c03c8cce792dcf6b30a886eb
% imsldruchclbk() - image slider callback % % See imslider % T. Pajdla, pajdla@cmp.felk.cvut.cz % 3 Nov 2009 function imsldruchclbk(a,b,c) iminf = get(gcf,'userdata'); n = iminf.n; nb=floor(n/2); nt=ceil(n/2); p = round(get(iminf.uch,'Value')); b = p-nb; t = p+nt; if t>size(iminf.lpos,2) t=size(im...
github
PavelTrutman/FocalNet-master
trckspot-v1.m
.m
FocalNet-master/deepag/bin/lib/utils/trckspot-v1.m
4,946
utf_8
e068319dbb1a6d5ed2441be917a4a272
% [mx,nx,x,A,o,l,il] = trckspot(im,decim,dthrprc,minR,maxR,dThr,doShow) - detect bright spots % % im ... m x n x 1 image % rect ... valid rectangle in the image [minRow maxRow minCol maxCol] % decim ... 1:decim:end image decimation % dthrprc... thereshold 0<1 ... percentile % >=1 ....