2014-02-28 20:03
The process of how Gabor filters extract feature points is a real ordeal. Look at various articles, combined with Baidu, the internal analysis of the article only a little understand.
What exactly is the Gabor filter? Many of the expressions say that the Fourier transform is added to the window. How do you understand it? The formula is described in the following ways:
(1)
(2)
(3)
The article is the most similar to the third, then I understand is: the basis of the Fourier transform is e^ (J2ΠFX), then the so-called window refers to the addition of a Gaussian function, such as the formula (1), and Gabor function convolution, would like to do a base of Gauss * e^ (J2ΠFX) Fourier transform.
So what is the effect of such a Gabor filter? Since he is a filter, follow the processing of the filter we have learned: Out (x, y) = in (x, y) ∗gabor (x y). input is the image I, the filter is G, the output is a complex variable out, real part of real virtual part img; Mag (x, y) = |out (x, y) |; Filter the amplitude of the output, i.e. the amplitude response of the Gabor filter on figure I g (x, y) = arctan (img (x, y)/real (x, y); The phase response of the gabor filter on figure I Obviously the phase response is immediately, and we have only focused on amplitude response when we were doing the filter. In Matlab, I draw the frequency response graph of Gabor filter according to the formula (3). Note: In equation 3, the relative coordinates on a specific center point (ζ,η) are expressed, and it does not matter if the Gabor filter kernel function is obtained (0,0). In addition, I think the symbol in Equation 3 has a bit of a problem with its own modification, the symbol in the paper is also problematic.
Gama =0.2= 2= 6= -7:1:7= -35:1:35= 0; [ x, y]== X*cos (Sita) +y* =-x*sin (Sita) +y* = exp (-(x1.^2+gama^2*y1.^2)/(2*SIGMA^2)). * cos (2*pi*x1/= z/sum (sum (z)); mesh (x, y , z);
Sita=0 Sita=-pi/4 Sita=pi/4 It can be seen that the frequency response direction of the Gabor filter varies with the SITA, then we adjust the parameters to see a picture through different Sita the corresponding output to determine the feature point. The code is as follows:
Gama =0.2; Sigma=2; Namuda=6; x= -7:1:7; y= - *:1: *; Sita=0; I= Imread ('F:\SceneTrialTrain\Train\surg.jpg'); I= I (:,:,1); figure (1) imshow (I); [x, Y]=Meshgrid (x, y); X1= X*cos (SITA) +y*sin (Sita); Y1=-x*sin (SITA) +y*cos (SITA); Z= exp (-(x1.^2+gama^2*y1.^2)/(2*sigma^2). *cos (2*pi*x1/namuda+3.14*2); Z= z/sum (sum (z)); c=IMFilter (i,z);d=c;m= c> the; n= c<= the;d(m)=255;d(N)=0; figure (2) Imshow (d);I set the response large or small threshold is 180 original SITA=PI/4
Sita =-PI/4;
Sita = PI/2;
Sita = 0;
It is shown that the Gabor filter can actually detect the texture of the stroke characteristics.
How does the Gabor filter detect feature points? At each point, a compatible Gabor filter and an incompatible Gabor filter are found, and the corresponding difference of two filters at that point is obtained, and the point corresponding to the local maximum value of each difference is set to the feature point, so that a plurality of feature points representing the strokes can be acquired on a single graph.
Although the Gabor filter is not very well understood, but now the understanding is here, recommend a very good understanding, here.
Understanding of Gabor Filters