--- ../../dev2/gift/FeatureExtraction/gabor.c 2006-08-28 17:18:09.000000000 +0000 +++ FeatureExtraction/gabor.c 2006-09-15 21:44:01.000000000 +0000 @@ -2,12 +2,16 @@ #include #include #include +/* for memset(), others */ #include #include #include #include "gabor.h" +/* for MAX_WIDTH and MAX_HEIGHT */ +#include "gift_features.h" + /* for uint32_t */ #include @@ -79,15 +83,15 @@ } } -void gabor_filter(double *image, int width, int height, int filter_scale, int orientation, double ** kernelsxy, double *output) { +void gabor_filter(double *image, int width, int height, int filter_scale, int orientation, double **kernelsxy, double *output) { - double *conv; - int x, y, t_x, t_y; - int i; + uint32_t x, y; + int32_t t_x, t_y; + uint32_t i; double * target_kernal; + double conv[MAX_WIDTH*MAX_HEIGHT]; /* take advantage of our fixed image size. */ - - conv = (double *)calloc(width*height, sizeof(double)); + memset(&conv, 0, MAX_WIDTH*MAX_HEIGHT*sizeof(double)); target_kernal=kernelsxy[filter_scale*num_gabors_per_scale+orientation]; @@ -144,5 +148,4 @@ } } - free(conv); }