[37] | 1 | % By Philip Torr 2002
|
---|
| 2 | % copyright Microsoft Corp.
|
---|
| 3 | %a script to display the results of the F matrix...
|
---|
| 4 |
|
---|
| 5 | %third homogeneous coordinare
|
---|
| 6 | m3 = 256;
|
---|
| 7 |
|
---|
| 8 | %decide display method
|
---|
| 9 | compare = 0;
|
---|
| 10 |
|
---|
| 11 | %choose your method here
|
---|
| 12 | method = 2
|
---|
| 13 | set_rank2 = 0;
|
---|
| 14 |
|
---|
| 15 |
|
---|
| 16 | %generate synthetic data
|
---|
| 17 | [true_F,x1,y1,x2,y2,nx1,ny1,nx2,ny2,true_C,true_R,true_t, true_E] = torr_gen_2view_matches;
|
---|
| 18 | no_matches = length(nx1);
|
---|
| 19 | matches = [nx1,ny1,nx2,ny2];
|
---|
| 20 |
|
---|
| 21 |
|
---|
| 22 | %first estimate F
|
---|
| 23 | [f, e1, n_inliers,inlier_index,estimateF] = torr_estimateF( matches, m3, [], method, set_rank2);
|
---|
| 24 |
|
---|
| 25 | %check errors
|
---|
| 26 | e = torr_errf2(f, nx1,ny1,nx2,ny2, no_matches, m3);
|
---|
| 27 |
|
---|
| 28 | %display the result
|
---|
| 29 | if compare
|
---|
| 30 | torr_compare_epipoles(true_F,estimateF,matches, m3)
|
---|
| 31 | else
|
---|
| 32 | torr_display_epipoles(estimateF,matches, m3)
|
---|
| 33 | end
|
---|
| 34 |
|
---|
| 35 |
|
---|