--- ../../dev2/gift/FeatureExtraction/gabor.c 2006-08-16 20:33:16.000000000 +0000 +++ FeatureExtraction/gabor.c 2006-08-16 20:39:16.000000000 +0000 @@ -89,6 +89,7 @@ double conv[65536]; /* take advantage of our fixed image size. 65536 == width*height */ double * target_conv; double * target_image; + double temparray[kernal_size[2]]; for (i = 0; i < width*height; i++) { @@ -101,12 +102,22 @@ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { target_image=&image[(width*height)-(y*width+x+kernal_size[filter_scale]/2)]; + if ((x>=kernal_size[filter_scale]/2) && ((x+kernal_size[filter_scale]/2)= k) && (x+kernal_size[filter_scale]/2 < width+k)) { conv[y*width + x] += target_kernal[k]*target_image[k]; } } + } } } @@ -130,12 +141,22 @@ for (x = 0; x < width; x++) { for (y = 0; y < height; y++) { target_image=&image[(width*height)-(y*width+x+kernal_size[filter_scale]/2)]; + if ((x>=kernal_size[filter_scale]/2) && ((x+kernal_size[filter_scale]/2)= k) && (x+kernal_size[filter_scale]/2 < width+k)) { conv[y*width + x] += target_kernal[k]*target_image[k]; } } + } } }