summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/stitch/src/matlab/calculateH.m
diff options
context:
space:
mode:
Diffstat (limited to 'SD-VBS/benchmarks/stitch/src/matlab/calculateH.m')
-rwxr-xr-xSD-VBS/benchmarks/stitch/src/matlab/calculateH.m24
1 files changed, 0 insertions, 24 deletions
diff --git a/SD-VBS/benchmarks/stitch/src/matlab/calculateH.m b/SD-VBS/benchmarks/stitch/src/matlab/calculateH.m
deleted file mode 100755
index caefd74..0000000
--- a/SD-VBS/benchmarks/stitch/src/matlab/calculateH.m
+++ /dev/null
@@ -1,24 +0,0 @@
1function retH=calculateH(pnt1, pnt2)
2
3[n temp]=size(pnt1);
4
5X=zeros(0,8);
6b=zeros(0,1);
7
8for i=1:n
9 X=[X; pnt1(i,1) pnt1(i,2) 1 0 0 0 -pnt2(i,1)*pnt1(i,1) -pnt2(i,1)*pnt1(i,2);0, 0, 0, pnt1(i,1), pnt1(i,2), 1, -pnt2(i,2)*pnt1(i,1), -pnt2(i,2)*pnt1(i,2)];
10 b=[b; pnt2(i,1); pnt2(i,2)];
11end
12
13if n==4
14 %if abs(det(X)~=0
15 H=X^(-1)*b;
16 %else
17 % H=[0 0 0; 0 0 0; 0 0 1];
18 %end
19else
20 Xt = X';
21 H=(Xt*X)^(-1)*Xt*b;
22end
23
24retH=[H(1) H(2) H(3);H(4) H(5) H(6);H(7) H(8) 1];