source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/torr/torr_evalFsc.m @ 37

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

Added original make3d

File size: 1.5 KB
Line 
1%       By Philip Torr 2002
2%       copyright Microsoft Corp.
3%this is a script to test the self calibration stuff
4
5%main()
6%profile on
7
8m3 = 256;
9%user chooses the appropriate nmethod
10method = 3;
11total_sse = 0;
12epipole_distance = 0;
13%
14% randn('state',0)
15% rand('state',0)
16no_tests = 1;
17for(i = 1:no_tests)
18%     [true_F,x1,y1,x2,y2,nx1,ny1,nx2,ny2] = ...
19%         torr_gen_2view_matches(foc, no_matches, noise_sigma, translation_mult, translation_adder, ...
20%         rotation_multplier, min_Z,Z_RAN,m3);
21    [true_F,x1,y1,x2,y2,nx1,ny1,nx2,ny2,true_C,true_R,true_t, true_E] = torr_gen_2view_matches;
22    true_epipole = torr_get_right_epipole(true_F,m3);
23   
24    no_matches = length(nx1);
25   
26    matches = [nx1,ny1,nx2,ny2];
27    perfect_matches = [x1,y1,x2,y2];
28    set_rank2 = 0;
29   
30    %first estimate F
31    [f, e1, n_inliers,inlier_index,nF] = torr_estimateF( matches, m3, [], method, set_rank2);
32   
33    %check errors vs the true (noise free) points
34    groundtrutherrors = torr_errf2(f, x1,y1,x2,y2, no_matches, m3);
35    total_sse = total_sse + sum(groundtrutherrors);
36   
37   
38    %calc noisy epipole
39    noisy_epipole = torr_get_right_epipole(nF,m3);
40    epipole_distance = epipole_distance + sqrt(norm(true_epipole -noisy_epipole));
41end
42
43disp(' the average sse vs the noise free points is')
44total_sse/no_tests
45%profile off
46
47disp('RMS distance between true and estimated right epipole is')
48epipole_distance
49
50
51
52
53%torr_display_matches(matches)
54
55
56
57
58
59%        e = fm_error_hs(F, n1, n2, nowarn);
Note: See TracBrowser for help on using the repository browser.