Gabor Filter

Basics

The Gabor filter is a tool used to analyze textures or to create features for a classifier. It operates by convolving the input image with a Gabor wavelet to detect specific frequency content in an image in a given direction within a localized region around the point or region of analysis.

The Gabor wavelet

The input image

The input image filtered by convolving the wavelet

A key aspect of the Gabor wavelet is that it is composed of two distinct structures which are multiplied with one another:
A Gaussian surface (a bell-shaped surface) that provides a smooth window.

Its spread, its ellipticity and its orientation are influenced by the sigma (σ), the gamma (ɣ) and the theta (θ) parameters respectively.

A sinusoidal plane wave with a regular oscillation pattern.

Its wavelength and phase are controlled by the lambda (λ) and psi (ψ) parameters respectively. Its orientation is determined by the theta (θ) parameter.

The Gaussian surface

The sinusoidal plane wave

The corresponding Gabor wavelet

Parameter descriptions

Sigma (σ)

This parameter influences the spread of the Gaussian surface.
A larger σ value results in a wider spread, capturing larger structures in the image.
A smaller σ value results in a narrower spread.
σ = 60
σ = 30
 

The Gaussian surface

The sinusoidal plane wave

The corresponding Gabor wavelet

Gamma (ɣ)

This parameter specifies the ellipticity of the Gaussian surface.
With ɣ = 1, the support is circular and as ɣ deviates from 1, the support becomes more elongated.
A larger ɣ value results in a more elongated Gaussian in a direction perpendicular to the stripes.
A smaller ɣ value results in a more elongated Gaussian along the orientation of the parallel stripes of the wave.
ɣ = 2
ɣ = 1
 

The Gaussian surface

The sinusoidal plane wave

The corresponding Gabor wavelet

Theta (θ)

This parameter determines the orientation of both the Gaussian surface and the sinusoidal plane wave.
θ = 0
θ = 0.7
 

The Gaussian surface

The sinusoidal plane wave

The corresponding Gabor wavelet

Lambda (λ)

This parameter controls the wavelength of the sinusoidal plane wave.
λ = 20
λ = 70
 

The Gaussian surface

The sinusoidal plane wave

The corresponding Gabor wavelet

Psi (ψ)

This parameter shifts the sinusoidal wave in the direction perpendicular to the stripes. By adjusting psi, you can control the phase of the sinusoidal plane wave.
ψ = 0
ψ = π
 

The Gaussian surface

The sinusoidal plane wave

The corresponding Gabor wavelet

사용법

In Open eVision, use the method ConvolGabor to apply a Gabor filter to an image.

This method takes several parameters including the source image, kernel size and Gabor parameters:

Use the method with or without a destination image.
If no destination image is provided, the source image is modified in-place.
You can use the method with a region of interest (ROI).
If an ERegion object is provided, the Gabor filter is only applied to the pixels within the region.
Set the parameter normalize to True to ensure that the sum of all the values in the Gabor kernel equals 1 by applying a uniform scaling factor to the kernel.
If not specified, the default value is False, meaning that no normalization is applied.

This visual arrangement displays input images interacting with distinct Gabor wavelets. Each tile reveals the filtered output and illustrates how adjusting the parameters influences the texture extraction during the image processing.