1 | % By Philip Torr 2002
|
---|
2 | % copyright Microsoft Corp.
|
---|
3 | %torr_test_correct_sc.m
|
---|
4 |
|
---|
5 | %torr_test_correct_sc.m
|
---|
6 | m3 = 256;
|
---|
7 | method = 2;
|
---|
8 |
|
---|
9 |
|
---|
10 | [true_F,x1,y1,x2,y2,nx1,ny1,nx2,ny2,true_C,true_R,true_t, true_E] = torr_gen_2view_matches;
|
---|
11 |
|
---|
12 | no_matches = length(nx1);
|
---|
13 |
|
---|
14 | matches = [nx1,ny1,nx2,ny2];
|
---|
15 | set_rank2 = 0;
|
---|
16 |
|
---|
17 |
|
---|
18 | %first estimate F
|
---|
19 | [f, e1, n_inliers,inlier_index,nF] = torr_estimateF( matches, m3, [], method, set_rank2);
|
---|
20 |
|
---|
21 |
|
---|
22 | %next correct the points so that they lie on a fundamental matrix
|
---|
23 | [corrected_matches error2] = torr_correctx4F(f, nx1,ny1,nx2,ny2, no_matches, m3);
|
---|
24 |
|
---|
25 | %check errors (should be near zero)
|
---|
26 | e = torr_errf2(f, corrected_matches(:,1), corrected_matches(:,2), corrected_matches(:,3), corrected_matches(:,4),no_matches, m3)
|
---|