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/mser/src/c/script_mser.c | 117 ----------------------------- 1 file changed, 117 deletions(-) delete mode 100644 SD-VBS/benchmarks/mser/src/c/script_mser.c (limited to 'SD-VBS/benchmarks/mser/src/c/script_mser.c') diff --git a/SD-VBS/benchmarks/mser/src/c/script_mser.c b/SD-VBS/benchmarks/mser/src/c/script_mser.c deleted file mode 100644 index 3e98f86..0000000 --- a/SD-VBS/benchmarks/mser/src/c/script_mser.c +++ /dev/null @@ -1,117 +0,0 @@ -/******************************** -Author: Sravanthi Kota Venkata -********************************/ - -#include "mser.h" -#include -#include "extra.h" -#define min(a,b) (ab)?a:b - -int main(int argc, char* argv[]) -{ - SET_UP - int which_image; - int i, j, k; - I2D *idx; - I2D *I; - I2D *It; - I2D *out; - int rows=196, cols=98; - int minVal = 1000; - int maxVal = -1000; - int lev = 10; - - char im1[100], im2[100]; - - iArray *subs_pt, *nsubs_pt, *strides_pt, *visited_pt, *dims; - uiArray* joins_pt; - ulliArray *acc_pt, *ell_pt; - region_t* regions_pt; - pair_t* pairs_pt; - node_t* forest_pt; - - int ndims, nel, gdl, nmer; - - scanf("%s", im1); - - I = readImage(im1); - - rows = I->height; - cols = I->width; - - It = readImage(im1); - - k = 0; - for(i=0; iheight * It->width; - gdl = ndims * (ndims+1)/2 + ndims; - nmer = NMER_MAX; - - dims = malloc(sizeof(iArray) + sizeof(int)*ndims); - /* allocate stuff */ - subs_pt = malloc(sizeof(iArray) + sizeof(int)*ndims); - nsubs_pt = malloc(sizeof(iArray) + sizeof(int)*ndims); - strides_pt = malloc(sizeof(uiArray)+sizeof(unsigned int)*ndims); - visited_pt = malloc(sizeof(uiArray) + sizeof(unsigned int)*nel); - joins_pt = malloc(sizeof(uiArray) + sizeof(unsigned int)*nel); - - regions_pt = (region_t*)malloc(sizeof(region_t)*nel); - pairs_pt = (pair_t*)malloc(sizeof(pair_t)*nel); - forest_pt = (node_t*)malloc(sizeof(node_t)*nel); - - acc_pt = malloc(sizeof(ulliArray) + sizeof(acc_t)*nel) ; - ell_pt = malloc(sizeof(ulliArray) + sizeof(acc_t)*gdl*nmer) ; - - - out = iMallocHandle(1, nmer); - for_each_job { - idx = mser(It, 2, subs_pt, nsubs_pt, strides_pt, visited_pt, dims, - joins_pt, - regions_pt, - pairs_pt, - forest_pt, - acc_pt, ell_pt, - out); - } - -#ifdef CHECK - /** Self checking - use expected.txt from data directory **/ - { - int tol, ret=0; - tol = 1; -#ifdef GENERATE_OUTPUT - writeMatrix(idx, argv[1]); -#endif - ret = selfCheck(idx, "expected_C.txt", tol); - if (ret == -1) - printf("Error in MSER\n"); - } - /** Self checking done **/ -#endif - free(dims); - free( forest_pt ) ; - free( pairs_pt ) ; - free( regions_pt ) ; - free( visited_pt ) ; - free( strides_pt ) ; - free( nsubs_pt ) ; - free( subs_pt ) ; - free( joins_pt ) ; - free( acc_pt ) ; - free( ell_pt ) ; - iFreeHandle(idx); - iFreeHandle(I); - iFreeHandle(It); - WRITE_TO_FILE - return 0; -} - -- cgit v1.2.2