source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/torr/torr_estfa.m @ 86

Last change on this file since 86 was 37, checked in by (none), 15 years ago

Added original make3d

File size: 859 bytes
Line 
1%       By Philip Torr 2002
2%       copyright Microsoft Corp.
3% estimate fundamental matrix from perfect points??
4
5function [ FA, fa] = torr_estfa(x1,y1,x2,y2, no_matches,m3)
6%disp('This just does calculation of perfect data,for test')
7%disp('Use estf otherwise')
8
9for(i = 1:no_matches)
10   
11   A(i,1) = x1(i);
12   A(i,2) = y1(i);
13   A(i,3) = x2(i);
14   A(i,4) = y2(i);
15   
16end
17
18% centre data
19centroid = mean(A);
20B = A - ones(no_matches,1) * centroid;
21
22%est_F = [v(1) v(2) v(3); v(4) v(5) v(6); v(7) v(8) v(9)]
23% need to check all this for whether it is right
24v = torr_ls(B);
25constant = - ( centroid * v)/m3;
26fa = [v' constant] ;
27%need to add constant term
28
29
30FA = [ 0 ,0, fa(3); 0, 0, fa(4); fa(1), fa(2), fa(5)];
31%algebraic residuals
32%r = A * v;
33
34
35%disp('This just does calculation of perfect data,for test')
36%disp('Use estf otherwise')
Note: See TracBrowser for help on using the repository browser.