From f618466c25d43f3bae9e40920273bf77de1e1149 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Mon, 19 Oct 2020 23:09:30 -0400 Subject: initial sd-vbs initial sd-vbs add sd-vbs sd-vbs --- .../tracking/src/matlab/calcGoodFeature.m | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 SD-VBS/benchmarks/tracking/src/matlab/calcGoodFeature.m (limited to 'SD-VBS/benchmarks/tracking/src/matlab/calcGoodFeature.m') diff --git a/SD-VBS/benchmarks/tracking/src/matlab/calcGoodFeature.m b/SD-VBS/benchmarks/tracking/src/matlab/calcGoodFeature.m new file mode 100755 index 0000000..b83faa6 --- /dev/null +++ b/SD-VBS/benchmarks/tracking/src/matlab/calcGoodFeature.m @@ -0,0 +1,28 @@ +%calcGoodFeature: + +function [lambda, tr, det,c_xx, c_xy, c_yy] = calcGoodFeature(dX, dY, sizeX, sizeY, winSize, dataDir) + + for i=1:sizeY + for j=1:sizeX + xx(i,j)=dX(i,j)*dX(i,j); + xy(i,j)=dX(i,j)*dY(i,j); + yy(i,j)=dY(i,j)*dY(i,j); + end + end + + c_xx=calcAreaSum(xx, sizeX, sizeY, winSize,dataDir); + c_xy=calcAreaSum(xy, sizeX, sizeY, winSize,dataDir); + c_yy=calcAreaSum(yy, sizeX, sizeY, winSize,dataDir); + + for i=1:sizeY + for j=1:sizeX + tr(i,j)= c_xx(i,j)+c_yy(i,j); + det(i,j)= c_xx(i,j)*c_yy(i,j)-c_xy(i,j)*c_xy(i,j); +% if( tr(i,j) == 0 ) +% lambda(i,j) = 0; +% else + lambda(i,j)=det(i,j)/(tr(i,j) + 0.00001); +% end + end + end + -- cgit v1.2.2