diff options
Diffstat (limited to 'SD-VBS')
| -rw-r--r-- | SD-VBS/benchmarks/tracking/src/c/script_tracking.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/SD-VBS/benchmarks/tracking/src/c/script_tracking.c b/SD-VBS/benchmarks/tracking/src/c/script_tracking.c index c0af2d7..a2c1930 100644 --- a/SD-VBS/benchmarks/tracking/src/c/script_tracking.c +++ b/SD-VBS/benchmarks/tracking/src/c/script_tracking.c | |||
| @@ -5,7 +5,7 @@ Author: Sravanthi Kota Venkata | |||
| 5 | #include "tracking.h" | 5 | #include "tracking.h" |
| 6 | #include <malloc.h> | 6 | #include <malloc.h> |
| 7 | #include "extra.h" | 7 | #include "extra.h" |
| 8 | #define TRACKING_MEM 1<<29 | 8 | #define TRACKING_MEM 1<<24 |
| 9 | 9 | ||
| 10 | int main(int argc, char* argv[]) | 10 | int main(int argc, char* argv[]) |
| 11 | { | 11 | { |
| @@ -16,7 +16,7 @@ int main(int argc, char* argv[]) | |||
| 16 | int endR, endC; | 16 | int endR, endC; |
| 17 | F2D *blurredImage, *previousFrameBlurred_level1, *previousFrameBlurred_level2, *blurred_level1, *blurred_level2; | 17 | F2D *blurredImage, *previousFrameBlurred_level1, *previousFrameBlurred_level2, *blurred_level1, *blurred_level2; |
| 18 | F2D *verticalEdgeImage, *horizontalEdgeImage, *verticalEdge_level1, *verticalEdge_level2, *horizontalEdge_level1, *horizontalEdge_level2, *interestPnt; | 18 | F2D *verticalEdgeImage, *horizontalEdgeImage, *verticalEdge_level1, *verticalEdge_level2, *horizontalEdge_level1, *horizontalEdge_level2, *interestPnt; |
| 19 | F2D *lambda, *lambdaTemp, *features; | 19 | F2D *lambda, *lambdaTemp, *features = NULL; |
| 20 | I2D *Ic, *status; | 20 | I2D *Ic, *status; |
| 21 | float SUPPRESION_RADIUS; | 21 | float SUPPRESION_RADIUS; |
| 22 | F2D *newpoints; | 22 | F2D *newpoints; |
| @@ -105,6 +105,10 @@ int main(int argc, char* argv[]) | |||
| 105 | cols = Ic->width; | 105 | cols = Ic->width; |
| 106 | 106 | ||
| 107 | for_each_job { | 107 | for_each_job { |
| 108 | // Clean up results from last job | ||
| 109 | if (features) | ||
| 110 | fFreeHandle(features); | ||
| 111 | |||
| 108 | /** IMAGE PRE-PROCESSING **/ | 112 | /** IMAGE PRE-PROCESSING **/ |
| 109 | 113 | ||
| 110 | /** Blur the image to remove noise - weighted avergae filter **/ | 114 | /** Blur the image to remove noise - weighted avergae filter **/ |
| @@ -225,6 +229,8 @@ int main(int argc, char* argv[]) | |||
| 225 | features = fDeepCopy(newpoints); | 229 | features = fDeepCopy(newpoints); |
| 226 | fFreeHandle(newpoints); | 230 | fFreeHandle(newpoints); |
| 227 | } | 231 | } |
| 232 | fFreeHandle(blurred_level1); | ||
| 233 | fFreeHandle(blurred_level2); | ||
| 228 | } | 234 | } |
| 229 | #ifdef CHECK | 235 | #ifdef CHECK |
| 230 | /* Self checking */ | 236 | /* Self checking */ |
| @@ -239,9 +245,7 @@ int main(int argc, char* argv[]) | |||
| 239 | printf("Error in Tracking Map\n"); | 245 | printf("Error in Tracking Map\n"); |
| 240 | } | 246 | } |
| 241 | #endif | 247 | #endif |
| 242 | 248 | ||
| 243 | fFreeHandle(blurred_level1); | ||
| 244 | fFreeHandle(blurred_level2); | ||
| 245 | fFreeHandle(features); | 249 | fFreeHandle(features); |
| 246 | 250 | ||
| 247 | for(count=1; count<=counter; count++) | 251 | for(count=1; count<=counter; count++) |
