summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/stitch/src/c/script_stitch.c
diff options
context:
space:
mode:
Diffstat (limited to 'SD-VBS/benchmarks/stitch/src/c/script_stitch.c')
-rw-r--r--SD-VBS/benchmarks/stitch/src/c/script_stitch.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/SD-VBS/benchmarks/stitch/src/c/script_stitch.c b/SD-VBS/benchmarks/stitch/src/c/script_stitch.c
deleted file mode 100644
index ee68e70..0000000
--- a/SD-VBS/benchmarks/stitch/src/c/script_stitch.c
+++ /dev/null
@@ -1,67 +0,0 @@
1/********************************
2Author: Sravanthi Kota Venkata
3********************************/
4
5#include "stitch.h"
6#include <malloc.h>
7#include "extra.h"
8// Valgrind says we use 250Mb of heap - round up to 512Mb
9#define STITCH_MEM 1<<29
10int main(int argc, char* argv[])
11{
12 SET_UP
13 mallopt(M_TOP_PAD, STITCH_MEM);
14 mallopt(M_MMAP_MAX, 0);
15 int rows, cols;
16 F2D *x, *y, *v, *interestPnts, *Fcur, *int1, *int2;
17 I2D *Icur;
18 int i, j;
19 char im1[100], im2[100];
20 x = y = v = Fcur = int1 = int2 = interestPnts = NULL;
21
22 scanf("%s", im1);
23 Icur = readImage(im1);
24 rows = Icur->height;
25 cols = Icur->width;
26
27 for_each_job {
28 fFreeHandle(v);
29 fFreeHandle(interestPnts);
30 fFreeHandle(int1);
31 fFreeHandle(int2);
32 fFreeHandle(Fcur);
33 v = harris(Icur);
34 interestPnts = getANMS(v, 24);
35 int1 = fMallocHandle(interestPnts->height, 1);
36 int2 = fSetArray(interestPnts->height, 1, 0);
37 for(i=0; i<int1->height; i++)
38 {
39 asubsref(int1,i) = subsref(interestPnts,i,0);
40 asubsref(int2,i) = subsref(interestPnts,i,1);
41 }
42
43 Fcur = extractFeatures(Icur, int1, int2);
44 }
45
46#ifdef CHECK
47 /** Self checking - use expected.txt from data directory **/
48 {
49 int ret=0;
50 float tol = 0.02;
51#ifdef GENERATE_OUTPUT
52 fWriteMatrix(Fcur, argv[1]);
53#endif
54 ret = fSelfCheck(Fcur, "expected_C.txt", tol);
55 if (ret == -1)
56 printf("Error in Stitch\n");
57 }
58#endif
59 WRITE_TO_FILE
60 fFreeHandle(Icur);
61 fFreeHandle(v);
62 fFreeHandle(interestPnts);
63 fFreeHandle(int1);
64 fFreeHandle(int2);
65 fFreeHandle(Fcur);
66 return 0;
67}