Peter's Projective Matlab Function(2)

时间:2021-03-04 21:21:43

1. function [T, err] = invpersp(refpts, pts) % X = A/B is the solution to the equation AX = B; size(pts) = [row=2,column>=4].

2. function F = fundmatrix(varargin)  %[U,D,V] = svd(A);  F = reshape(V(:,9),3,3)';[U,D,V] = svd(F); F = U*diag([D(1,1) D(2,2) 0])*V';

3. function [newpts, T] = normalise2dpts(pts)  %normalize, mean, /meandist

4. function [newim, newT] = imTrans(im, T, region, sze);  %using homoTrans and interp2

5. function pts = digiplane(im, T, xyij) % using “ginput“ to transform

6. function [c, r] = equalAngleConstraint(la1, lb1, la2, lb2)%  Equations from Liebowitz and Zisserman

7.function [c, r] = knownAngleConstraint(la, lb, theta) % like the func. above

8.function [c, r] = lengthRatioConstraint(p11, p12, p21, p22, s) % 6,7,8 are similar in destination