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/sift/src/c/script_sift.c | 80 ------------------------------ 1 file changed, 80 deletions(-) delete mode 100644 SD-VBS/benchmarks/sift/src/c/script_sift.c (limited to 'SD-VBS/benchmarks/sift/src/c/script_sift.c') diff --git a/SD-VBS/benchmarks/sift/src/c/script_sift.c b/SD-VBS/benchmarks/sift/src/c/script_sift.c deleted file mode 100644 index 40b16d4..0000000 --- a/SD-VBS/benchmarks/sift/src/c/script_sift.c +++ /dev/null @@ -1,80 +0,0 @@ -/******************************** -Author: Sravanthi Kota Venkata -********************************/ - -#include -#include -#include "sift.h" -#include -#include "extra.h" -#define SIFT_MEM 1<<24 -void normalizeImage(F2D* image) -{ - int i; - int rows; - int cols; - - int tempMin = 10000, tempMax = -1; - rows = image->height; - cols = image->width; - - for(i=0; i<(rows*cols); i++) - if(tempMin > asubsref(image,i)) - tempMin = asubsref(image,i); - - for(i=0; i<(rows*cols); i++) - asubsref(image,i) = asubsref(image,i) - tempMin; - - for(i=0; i<(rows*cols); i++) - if(tempMax < asubsref(image,i)) - tempMax = asubsref(image,i); - - for(i=0; i<(rows*cols); i++) - asubsref(image,i) = ( asubsref(image,i) / (tempMax+0.0) ); -} - -int main(int argc, char* argv[]) -{ - SET_UP - mallopt(M_TOP_PAD, SIFT_MEM); - mallopt(M_MMAP_MAX, 0); - I2D* im; - F2D *image; - int rows, cols, i, j; - F2D* frames; - unsigned int* startTime, *endTime, *elapsed; - - char imSrc[100]; - scanf("%s", imSrc); - im = readImage(imSrc); - image = fiDeepCopy(im); - rows = image->height; - cols = image->width; - - - for_each_job{ - image = fiDeepCopy(im); - normalizeImage(image); - /** Extract sift features for the normalized image **/ - frames = sift(image); - } - -#ifdef CHECK - { - int ret=0; - float tol = 0.2; -#ifdef GENERATE_OUTPUT - fWriteMatrix(frames, argv[1]); -#endif - ret = fSelfCheck(frames, "expected_C.txt", tol); - if (ret == -1) - printf("Error in SIFT\n"); - } -#endif - - iFreeHandle(im); - fFreeHandle(frames); - WRITE_TO_FILE - return 0; -} - -- cgit v1.2.2