[37] | 1 | % By Philip Torr 2002
|
---|
| 2 | % copyright Microsoft Corp.
|
---|
| 3 | %main()
|
---|
| 4 | %profile on
|
---|
| 5 | m3 = 256;
|
---|
| 6 | sse2t = 0;
|
---|
| 7 | best_sse = 10000000000;
|
---|
| 8 | best_method = 5;
|
---|
| 9 | best_method_array = zeros(4,1);
|
---|
| 10 | method = 3;
|
---|
| 11 |
|
---|
| 12 | randn('state',0)
|
---|
| 13 | rand('state',0)
|
---|
| 14 |
|
---|
| 15 | for(i = 1:1)
|
---|
| 16 |
|
---|
| 17 | %generate a load of stuffs
|
---|
| 18 | torr_genf;
|
---|
| 19 |
|
---|
| 20 | nX1 = [nx1,ny1, ones(length(x1),1) * m3];
|
---|
| 21 | nX2 = [nx2,ny2, ones(length(x2),1) * m3];
|
---|
| 22 |
|
---|
| 23 | %mine
|
---|
| 24 | %f_torr = estf(nx1,ny1,nx2,ny2, no_matches,m3);
|
---|
| 25 |
|
---|
| 26 | [nF , nf]= fm_linear(nX1, nX2, eye(3), method);
|
---|
| 27 |
|
---|
| 28 | %ne1 = torr_errf2(nf,x1,y1,x2,y2, no_matches, m3);
|
---|
| 29 | ne1 = torr_errf_nl_2(nf,nx1,ny1,nx2,ny2, no_matches, m3);
|
---|
| 30 |
|
---|
| 31 |
|
---|
| 32 | C = eye(3);
|
---|
| 33 | C(3,3) = m3;
|
---|
| 34 | nF2 = C * nF * C;
|
---|
| 35 |
|
---|
| 36 | n1 = [x1 y1];
|
---|
| 37 | n2= [x2 y2];
|
---|
| 38 | nowarn = 0;
|
---|
| 39 |
|
---|
| 40 | e = fm_error_hs(nF2, n1, n2, nowarn);
|
---|
| 41 |
|
---|
| 42 | sne1 = sort(ne1);
|
---|
| 43 | sse_n = norm(sne1(20:no_matches-20))
|
---|
| 44 | end
|
---|
| 45 |
|
---|
| 46 | %profile off
|
---|
| 47 |
|
---|
| 48 |
|
---|
| 49 |
|
---|
| 50 |
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 |
|
---|
| 55 |
|
---|
| 56 | % e = fm_error_hs(F, n1, n2, nowarn); |
---|