--- ../../dev/gift/FeatureExtraction/gabor.c 2006-09-20 20:50:33.000000000 +0000 +++ FeatureExtraction/gabor.c 2006-09-20 21:30:58.000000000 +0000 @@ -86,8 +86,6 @@ void gabor_filter(double *image, int width, int height, int filter_scale, int orientation, double **kernelsxy, double *output) { uint32_t x, y; - int32_t t_y; - uint32_t i; uint32_t k; double * target_kernal; double conv[MAX_WIDTH*MAX_HEIGHT]; /* take advantage of our fixed image size. */ @@ -126,10 +124,11 @@ target_kernal=&target_kernal[kernal_size[filter_scale]]; for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { - for (t_y = -kernal_size[filter_scale]/2; t_y <= kernal_size[filter_scale]/2; t_y++) { - if (((y - t_y) >= 0) && ((y - t_y) < height)) + target_conv=&conv[((width*height)-1)-(x*height+y+(kernal_size[filter_scale]/2))]; + for (k = 0; k < kernal_size[filter_scale]; k++) { + if (((y+(kernal_size[filter_scale]/2))>=k) && (y+(kernal_size[filter_scale]/2)= 0) && ((y - t_y) < height)) + target_conv=&conv[((width*height)-1)-(x*height+y+(kernal_size[filter_scale]/2))]; + for (k = 0; k < kernal_size[filter_scale]; k++) { + if (((y+(kernal_size[filter_scale]/2))>=k) && (y+(kernal_size[filter_scale]/2)