From 14c854543b1a3cf344a371a5b45595657f95786b Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Tue, 26 Oct 2021 13:22:32 -0400 Subject: add deadlines and costs --- SD-VBS/benchmarks/tracking/src/c/calcAreaSum.c | 81 -------------------------- 1 file changed, 81 deletions(-) delete mode 100644 SD-VBS/benchmarks/tracking/src/c/calcAreaSum.c (limited to 'SD-VBS/benchmarks/tracking/src/c/calcAreaSum.c') diff --git a/SD-VBS/benchmarks/tracking/src/c/calcAreaSum.c b/SD-VBS/benchmarks/tracking/src/c/calcAreaSum.c deleted file mode 100644 index 40f03dc..0000000 --- a/SD-VBS/benchmarks/tracking/src/c/calcAreaSum.c +++ /dev/null @@ -1,81 +0,0 @@ -/******************************** -Author: Sravanthi Kota Venkata -********************************/ - -#include "tracking.h" - -/** Compute the sum of pixels over pixel neighborhood. - Neighborhood = winSize*winSize - This will be useful when we compute the displacement - of the neighborhood across frames instead of tracking each pixel. - - Input: src Image - # rows, cols, size of window - Output: windowed-sum image, ret. - - Example: - - winSize = 4, cols = 8, rows = 16 - nave_half = 2, nave = 4 - Say, the first row of the image is: - 3 8 6 2 4 8 9 5 - a1 = 0 0 3 8 6 2 4 8 9 5 0 0 (append nave_half zeros to left and right border) - asum = (sum the first nave # pixels - 0 0 3 8 ) = 11 - ret(0,0) = 11 - For ret(0,1), we need to move the window to the right by one pixel and subtract - from a1sum the leftmost pixel. So, we add value 6 and subtract value at a1(0,0), = 0 here. - ret(0,1) = 17 = a1sum - For ret(0,2), a1sum - a1(0,1) + a1(2+nave) = 17 - 0 + 2 = 19 = a1sum - For ret(0,3), a1sum - a1(0,2) + a1(3+nave) = 19 - 3 + 4 = 20 = a1sum - - We proceed this way for all the rows and then perform summantion across all cols. -**/ -F2D* calcAreaSum(F2D* src, int cols, int rows, int winSize) -{ - int nave, nave_half, i, j, k; - F2D *ret, *a1; - float a1sum; - - nave = winSize; - nave_half = floor((nave+1)/2); - - ret = fMallocHandle(rows, cols); - a1 = fSetArray(1, cols+nave,0); - - for(i=0; i