Does using Gabor Energy disregard the sign of the Gabor kernel?

I am looking into feature extraction using Gabor filters. I belive the steps are:

1. Generate a set of gabor kernals. (An matrix of floating point number valuing between -1, +1)
2. Convert the image into a floating point matrix.
3. Convolute each Gabor kernel with the image, centred at each pixel in turn. (i.e. The first output image is the input image mutiplied by the pixel value of the coresponding pixel in the gabor kernal, then center the gabor kernal at the next pixel and repeat)
4. Calculate the 'energy' of the result by summing the squares of each pixel.

I think I must be missing something since if that was the case then the sign of the Gabor kernel would not matter.

For example if a pixel had a intensity of 0.1 and it was convoluted with a Gabor kernel with a corresponding pixel value of 0.5 then the output would be

(0.1 * 0.5)^2 = 0.0025


This would be the same if the gabor kernal had a value of -0.5

(0.1 * -0.5)^2 = 0.0025


Therefore it would not matter what sign the Gabor kernels would be, therefore these 2 kernels would be effectively identical.

edit retag close merge delete

Sort by » oldest newest most voted

From looking at the some sample source code I realise my mistake. https://github.com/juancamilog/gpu_convolve_test/blob/master/gpu_convolve_test.cpp

The convolution step sums the multiplication of corresponding pixels, which takes into account the sign of the Gabor kernel.

more