19

I am doing a project on Gabor feature extraction. I am very confused about what a Gabor feature means. I have made a feature matrix with different orientation and frequency. Is that the Gabor feature or the feature like statistical feature, geometric feature, spatial domain feature, invariance, repeatability, etc computed of image obtained after convolving the image with the Gabor filter bank with different orientation and frequencies refers to the Gabor feature.

Robert
  • 37,670
  • 37
  • 171
  • 213
user3106892
  • 193
  • 1
  • 1
  • 4

1 Answers1

63

Gabor filters act very similar to mamalian visual cortical cells so they extract features from different orientation and different scales.

I too recently did some Gabor filters based Feature extraction.
It looks hard initially but it is easy to implement.

To make it easy for you to understand I will give you a walkthrough.

Suppose you have an image like

test Image

And you calculate gabor features at 5 scales and 8 orientations (Which I suppose you have already done) you will get filters like

filters

Now you need to convolve each filters with the image to get 40 (8*5=40) different representation(response matrices) of same image where each image gives you a feature vector.

So after convolution

convolved images

Now you need to convert those Response Matrices to feature vector.
So feature vector may consist of : Local Energy,Mean Amplitude,Phase Amlitude or Orientation whose local has maximum Energy

I worked on local energy and mean amplitude and got good enough results.


Local Energy = summing up the squared value of each matrix value from a response matrix

Mean Amplitude = sum of absolute values of each matrix value from a response matrix

Thus at the end you will get two matrix that will be [1x40] each.
You can append one matrix to the other to create a [1x80] feature matrix for One image and thus create a [nx80] vector for n images for further training purpose.

How ever in order to increase efficiency you can use Log Gabor filters.(see this)

And for more information regarding the feature Extraction with Gabor Filters see this paper

xor
  • 2,668
  • 2
  • 28
  • 42
  • Thank you very much for your help. But, i want to know how to interpret these features practically. Also when i calculated my energy by squaring each pixel of the filtered image and summing the obtained value i am getting the answer as 255 every time.Can you please give the detail of how you did it.Thanks in advance. – user3106892 Dec 17 '13 at 14:10
  • May be you are doing something wrong....are you getting the convolution responses as expected(As I have showed here in 3rd image). http://stackoverflow.com/questions/9003147/how-to-apply-gabor-wavelets-to-an-image Here is some code so that you can figure out what you doing wrong – xor Dec 17 '13 at 16:58
  • 1
    if you are interested in python code, something similar is coded using the package available @ https://pythonhosted.org/LogGabor/ – meduz Oct 29 '14 at 11:10
  • Excellent explanation but just curious like you mentioned that we extract feature on 5 scales and 8 orientation ? can you help me how – iec2011007 May 25 '15 at 10:03
  • Is "Local Energy" really the right term when referring to the sum of the squared values of the response matrix? – petersaints Oct 07 '16 at 14:58
  • Which expression contributes towards the scaling, as shown in your answer, @adil ? I'm using, http://en.wikipedia.org/wiki/Gabor_filter – user10678 Nov 11 '14 at 14:16
  • Generally it depends on standard deviation, because it decides the deviation of wavelets from the center of gaussian filters. It kind of gives zooming effect (more deviation more scaling) – xor Nov 16 '14 at 15:32