diff options
author | leochanj105 <leochanj@live.unc.edu> | 2020-10-24 02:47:38 -0400 |
---|---|---|
committer | leochanj105 <leochanj@live.unc.edu> | 2020-10-24 02:47:38 -0400 |
commit | 450ce6915597da9f06442be6cc3235b53f30d59c (patch) | |
tree | fcf5601c8d1a2fced18e5da92927a23952b96101 /SD-VBS/benchmarks/stitch/src | |
parent | 063497e1c39be585914dc2e69445313632530de6 (diff) | |
parent | e0c5691110f38f63d1955a711fc7f786333bcaad (diff) |
wip
Diffstat (limited to 'SD-VBS/benchmarks/stitch/src')
-rw-r--r-- | SD-VBS/benchmarks/stitch/src/c/script_stitch.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/SD-VBS/benchmarks/stitch/src/c/script_stitch.c b/SD-VBS/benchmarks/stitch/src/c/script_stitch.c index 472e231..ee68e70 100644 --- a/SD-VBS/benchmarks/stitch/src/c/script_stitch.c +++ b/SD-VBS/benchmarks/stitch/src/c/script_stitch.c | |||
@@ -5,7 +5,8 @@ Author: Sravanthi Kota Venkata | |||
5 | #include "stitch.h" | 5 | #include "stitch.h" |
6 | #include <malloc.h> | 6 | #include <malloc.h> |
7 | #include "extra.h" | 7 | #include "extra.h" |
8 | #define STITCH_MEM 1<<30 | 8 | // Valgrind says we use 250Mb of heap - round up to 512Mb |
9 | #define STITCH_MEM 1<<29 | ||
9 | int main(int argc, char* argv[]) | 10 | int main(int argc, char* argv[]) |
10 | { | 11 | { |
11 | SET_UP | 12 | SET_UP |
@@ -16,6 +17,7 @@ int main(int argc, char* argv[]) | |||
16 | I2D *Icur; | 17 | I2D *Icur; |
17 | int i, j; | 18 | int i, j; |
18 | char im1[100], im2[100]; | 19 | char im1[100], im2[100]; |
20 | x = y = v = Fcur = int1 = int2 = interestPnts = NULL; | ||
19 | 21 | ||
20 | scanf("%s", im1); | 22 | scanf("%s", im1); |
21 | Icur = readImage(im1); | 23 | Icur = readImage(im1); |
@@ -23,6 +25,11 @@ int main(int argc, char* argv[]) | |||
23 | cols = Icur->width; | 25 | cols = Icur->width; |
24 | 26 | ||
25 | for_each_job { | 27 | for_each_job { |
28 | fFreeHandle(v); | ||
29 | fFreeHandle(interestPnts); | ||
30 | fFreeHandle(int1); | ||
31 | fFreeHandle(int2); | ||
32 | fFreeHandle(Fcur); | ||
26 | v = harris(Icur); | 33 | v = harris(Icur); |
27 | interestPnts = getANMS(v, 24); | 34 | interestPnts = getANMS(v, 24); |
28 | int1 = fMallocHandle(interestPnts->height, 1); | 35 | int1 = fMallocHandle(interestPnts->height, 1); |
@@ -34,12 +41,6 @@ int main(int argc, char* argv[]) | |||
34 | } | 41 | } |
35 | 42 | ||
36 | Fcur = extractFeatures(Icur, int1, int2); | 43 | Fcur = extractFeatures(Icur, int1, int2); |
37 | iFreeHandle(Icur); | ||
38 | fFreeHandle(v); | ||
39 | fFreeHandle(interestPnts); | ||
40 | fFreeHandle(int1); | ||
41 | fFreeHandle(int2); | ||
42 | fFreeHandle(Fcur); | ||
43 | } | 44 | } |
44 | 45 | ||
45 | #ifdef CHECK | 46 | #ifdef CHECK |
@@ -56,5 +57,11 @@ int main(int argc, char* argv[]) | |||
56 | } | 57 | } |
57 | #endif | 58 | #endif |
58 | WRITE_TO_FILE | 59 | WRITE_TO_FILE |
60 | fFreeHandle(Icur); | ||
61 | fFreeHandle(v); | ||
62 | fFreeHandle(interestPnts); | ||
63 | fFreeHandle(int1); | ||
64 | fFreeHandle(int2); | ||
65 | fFreeHandle(Fcur); | ||
59 | return 0; | 66 | return 0; |
60 | } | 67 | } |