diff options
| author | leochanj <jbakita@cs.unc.edu> | 2020-10-21 01:52:54 -0400 |
|---|---|---|
| committer | leochanj <jbakita@cs.unc.edu> | 2020-10-21 01:52:54 -0400 |
| commit | 25d94aa8aabb8ac3e8bbea0bc439ea6148444cc8 (patch) | |
| tree | ba80e76d25d9ca9486092e2f6b6d76f0e3352bf7 /SD-VBS/benchmarks/stitch/src/matlab/ransac.m | |
| parent | e2b50015cebdfba68699abd6e8575e38230f5a78 (diff) | |
debug libextra and remove matlab
Diffstat (limited to 'SD-VBS/benchmarks/stitch/src/matlab/ransac.m')
| -rwxr-xr-x | SD-VBS/benchmarks/stitch/src/matlab/ransac.m | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/SD-VBS/benchmarks/stitch/src/matlab/ransac.m b/SD-VBS/benchmarks/stitch/src/matlab/ransac.m deleted file mode 100755 index 4a3c364..0000000 --- a/SD-VBS/benchmarks/stitch/src/matlab/ransac.m +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | function [retH retPntsIdx]=ransac(pntsPrev, pntsCur, k, epsilon) | ||
| 2 | [n temp]=size(pntsPrev); | ||
| 3 | pntsPrev=[pntsPrev(:,1:2) ones(n,1)]; | ||
| 4 | pntsCur=[pntsCur(:,1:2) ones(n,1)]; | ||
| 5 | |||
| 6 | inlierIdx=cell(k,1); | ||
| 7 | inlierNum=zeros(k,1); | ||
| 8 | for i=1:k | ||
| 9 | seed=randperm(n); | ||
| 10 | H=calculateH(pntsPrev(seed(1:4),:), pntsCur(seed(1:4),:)); | ||
| 11 | err=(pntsCur-transformH(H,pntsPrev)); | ||
| 12 | inlierIdx{i}=find(sum(err(:,1:2).^2,2) < epsilon); | ||
| 13 | inlierNum=length(inlierIdx{i}); | ||
| 14 | end | ||
| 15 | |||
| 16 | [v maxIdx]=max(inlierNum); | ||
| 17 | retPntsIdx=inlierIdx{maxIdx}; | ||
| 18 | retH=calculateH(pntsPrev(retPntsIdx,:), pntsCur(retPntsIdx,:)); | ||
| 19 | |||
