Line | |
---|
1 | % By Philip Torr 2002
|
---|
2 | % copyright Microsoft Corp.
|
---|
3 | function f = torr_estf_bookstein(x1,y1,x2,y2, no_matches,m3)
|
---|
4 |
|
---|
5 | D(:,1) = x1(:).* x2(:);
|
---|
6 | D(:,2) = y1(:).* x2(:);
|
---|
7 | D(:,3) = m3* x2(:);
|
---|
8 |
|
---|
9 | D(:,4) = x1(:).* y2(:);
|
---|
10 | D(:,5) = y1(:).* y2(:);
|
---|
11 | D(:,6) = m3* y2(:);
|
---|
12 |
|
---|
13 | D(:,7) = x1(:).* m3;
|
---|
14 | D(:,8) = y1(:).* m3;
|
---|
15 | D(:,9) = m3* m3;
|
---|
16 |
|
---|
17 |
|
---|
18 | D_orig = D;
|
---|
19 | temp = D(:,3);
|
---|
20 | D(:,3) = D(:,5);
|
---|
21 | D(:,5) = temp;
|
---|
22 | M = D' * D;
|
---|
23 | M11 = M(1:4,1:4);
|
---|
24 | M12 = M(1:4,5:9); %4 x 5
|
---|
25 | M22 = M(5:9,5:9);
|
---|
26 | M112 = M11 - M12 * inv(M22) * M12';
|
---|
27 | f11 = torr_ls(M112);
|
---|
28 | f12 = - f11' * M12 * inv(M22);
|
---|
29 | f = [f11(1), f11(2), f12(1),f11(4), f11(3), f12(2),f12(3), f12(4), f12(5)]'; |
---|
Note: See
TracBrowser
for help on using the repository browser.