The Gabor filter is a linear electronic filter whose impulse response is determined as a harmonic function multiplied by Gaussians . In digital image processing, this filter is used to recognize the boundaries of objects.
| Linear electronic filters |
|---|
| Butterworth Filter |
| Chebyshev filter |
| Elliptical filter |
| Bessel filter |
| Gauss Filter |
| Legendre Filter |
| Gabor filter |
Due to the property of matching the convolution in the time domain to multiplication in the frequency domain, the Fourier transform of the impulse response of a Gabor filter is a convolution of the Fourier transforms of the harmonic function and the Gaussian.
Where
and
In this equation is the wavelength of the cosine multiplier, determines the orientation of the normal of parallel bands of the Gabor function in degrees, - phase shift in degrees and - compression ratio, which characterizes the ellipticity of the Gabor function.
Here is an example of the implementation of the Gabor filter for the Matlab package:
function gb = gabor_fn ( sigma_x, theta, lambda, psi, gamma )
sz_x = fix ( 6 * sigma_x ); % based on the value of sigma got the size of the core
sz_x = sz_x - mod ( sz_x , 2 ) + 1 ; % if even - make odd
sz_y = fix ( 6 * sigma_x / gamma ); % based on the value of sigma and coefficient compression got the second core size
sz_y = sz_y - mod ( sz_y , 2 ) + 1 ; % if even - make odd
[ x y ] = meshgrid ( - fix ( sz_x / 2 ): fix ( sz_x / 2 ), fix ( - sz_y / 2 ): fix ( sz_y / 2 )); % asked to set definitions
% Rotate
x_theta = x * cos ( theta ) + y * sin ( theta );
y_theta = - x * sin ( theta ) + y * cos ( theta );
gb = exp ( - . 5 * ( x_theta . ^ 2 / sigma_x ^ 2 + gamma ^ 2 * y_theta . ^ 2 / sigma_x ^ 2 )) * cos ( 2 * pi * x_theta ./ lambda + psi ); % core
Gabor filters are directly related to Gabor wavelets , since they can be constructed by a series of contractions and rotations. The Gabor space (filter convolution with a signal) is often used in various image processing applications, in particular, for iris recognition in biometric security systems and in automated access control systems based on fingerprint recognition.
Gabor's one-dimensional filter construction algorithm
To build a one-dimensional Gabor filter, the formula is applied:
where:
- - standard deviation of the Gaussian core, which determines the amplitude of the function;
- - oscillation frequency, defined as where:
- - function period .
The more , the flatter form will take function. The smaller , the more sharp the peak will be as a result of plotting the function.
The exponential function above has the properties of a normal distribution of a random variable. According to the three sigma rule, almost all exponent values are in the range . For signal analysis, the function values are calculated within the specified limits.
Gabor filter processing of a one-dimensional signal
Each point of the input signal converted to the appropriate output point by averaging input values by area taking into account weights Gabor formulas.
Where:
- input value of the signal at the point ,
- output signal at point ,
- the value of the Gabor function, .
Gabor's two-dimensional filter construction algorithm
To build a two-dimensional Gabor filter, the formula is applied:
Where:
- standard deviations of the Gaussian core, along the axes and that determine the length of the filter along the axes,
- frequency modulation of the filter,
- spatial orientation of the filter, which determines its orientation relative to the main axes.
Gabor two-dimensional image
Image processing by the Gabor filter is achieved by averaging the values of the processed image over a certain area at each point. Accordingly, the imposition of the Gabor filter on the image is:
Where:
- the intensity of the original image at the point ,
- the intensity of the new image at the point ,
- the value of the Gabor function, .
If we discard the sinusoidal component of the function in the Gabor filter, it will degenerate into a Gaussian blur filter (Gaussian Blur) . Therefore, it is obvious that these two filters have almost the same application algorithm, which differs in some details.
The Gabor formula shows that the filter depends on the frequency and direction of the quasi-periodic structure of the image. Therefore, before applying the filter, it is necessary to build the frequency and orientation fields for the current image. Usually, to simplify the task, the average image frequency is calculated, which is considered constant at each point.
Several methods can be used to build a field of directions , the fastest of which is the differential method, which allows the construction of a four-gradient field of directions.
Thus, having a frequency and 4 directions, four Gabor filters are pre-built, one for each direction. After that, at each point of the image, the filter is convolved with an image over a specific area, which gives the output value of the new image.
The Gabor filter is effective in processing images with structural redundancy that have a quasiperiodic structure. These include fingerprints, crystallograms and interferrograms. In nature, a similar color is often found in zebras, various felines (tigers, lynxes, smoky cats), birds (grouse), fish (leporinus striped) and other representatives of flora and fauna.
See also
- Gabor's transformation
- Denes Gabor
Literature
- Soifer V.A. Methods of computer image processing. - Fizmatlit, 2003. - p. 459.
- Khramov, A. G. Methods of computer interferogram restoration. - KuAI, 1988. - p. 88.