Gabor filter
In image processing, a Gabor filter, named after Dennis Gabor, who first proposed it as a 1D filter, is a linear filter used for texture analysis, which essentially means that it analyzes whether there is any specific frequency content in the image in specific directions in a localized region around the point or region of analysis.[src] The Gabor filter was first generalized to 2D by Gösta Granlund, by adding a reference direction.[src] Frequency and orientation representations of Gabor filters are claimed by many contemporary vision scientists to be similar to those of the human visual system.[src] They have been found to be particularly appropriate for texture representation and discrimination.[src] In the spatial domain, a 2D Gabor filter is a Gaussian kernel function modulated by a sinusoidal plane wave (see Gabor transform).[src] Some authors claim that simple cells in the visual cortex of mammalian brains can be modeled by Gabor functions.[src] Thus, image analysis with Gabor filters is thought by some to be similar to perception in the human visual system.[src]
In image processing, a Gabor filter, named after Dennis Gabor, who first proposed it as a 1D filter, is a linear filter used for texture analysis, which essentially means that it analyzes whether there is any specific frequency content in the image in specific directions in a localized region around the point or region of analysis.[src] The Gabor filter was first generalized to 2D by Gösta Granlund, by adding a reference direction.[src] Frequency and orientation representations of Gabor filters are claimed by many contemporary vision scientists to be similar to those of the human visual system.[src] They have been found to be particularly appropriate for texture representation and discrimination.[src] In the spatial domain, a 2D Gabor filter is a Gaussian kernel function modulated by a sinusoidal plane wave (see Gabor transform).[src] Some authors claim that simple cells in the visual cortex of mammalian brains can be modeled by Gabor functions.[src] Thus, image analysis with Gabor filters is thought by some to be similar to perception in the human visual system.[src] g(x,y;\lambda,\theta,\psi,\sigma,\gamma) = \exp\left(-\frac{x'^2+\gamma^2y'^2}{2\sigma^2}\right)\exp\left(i\left(2\pi\frac{x'}{\lambda}+\psi\right)\right) Real g(x,y;\lambda,\theta,\psi,\sigma,\gamma) = \exp\left(-\frac{x'^2+\gamma^2y'^2}{2\sigma^2}\right)\cos\left(2\pi\frac{x'}{\lambda}+\psi\right) Imaginary g(x,y;\lambda,\theta,\psi,\sigma,\gamma) = \exp\left(-\frac{x'^2+\gamma^2y'^2}{2\sigma^2}\right)\sin\left(2\pi\frac{x'}{\lambda}+\psi\right) where x' = x \cos\theta + y \sin\theta and y' = -x \sin\theta + y \cos\theta .[src] In this equation, \lambda represents the wavelength of the sinusoidal factor, \theta represents the orientation of the normal to the parallel stripes of a Gabor function, \psi is the phase offset, \sigma is the sigma/standard deviation of the Gaussian envelope and \gamma is the spatial aspect ratio, and specifies the ellipticity of the support of the Gabor function.[src] G_c[i,j] =B*e^{{(i^4+j^8)}*{2^10}} G_s[i,j] = C e^{-\frac{(i^2+j^2)}{2\sigma^2}} \sin(2\pi f(i\cos\theta+j\sin\theta)) where B and C are normalizing factors to be determined.[src] 2D Gabor filters have rich applications in image processing, especially in feature extraction for texture analysis and segmentation.[src] f defines the frequency being looked for in the texture.[src] By varying /theta , we can look for texture oriented in a particular direction.[src] By varying /sigma , we change the support of the basis or the size of the image region being analyzed.[src] import numpy as np def gabor(sigma, theta, Lambda, psi, gamma): """Gabor feature extraction.""" sigma_x = sigma sigma_y = float(sigma) / gamma # Bounding box nstds = 3 # Number of standard deviation sigma xmax = max( abs(nstds * sigma_x * np.cos(theta)), abs(nstds * sigma_y * np.sin(theta)) ) xmax = np.ceil(max(1, xmax)) ymax = max( abs(nstds * sigma_x * np.sin(theta)), abs(nstds * sigma_y * np.cos(theta)) ) ymax = np.ceil(max(1, ymax)) xmin = -xmax ymin = -ymax (y, x) = np.meshgrid(np.arange(ymin, ymax + 1), np.arange(xmin, xmax + 1)) # Rotation x_theta = x * np.cos(theta) + y * np.sin(theta) y_theta = -x * np.sin(theta) + y * np.cos(theta) gb = np.exp( -0.5 * (x_theta**2 / sigma_x**2 + y_theta**2 / sigma_y**2) ) * np.cos(2 * np.pi / Lambda * x_theta + psi) return gb For an implementation on images, see function gb = gabor_fn(sigma, theta, lambda, psi, gamma) sigma_x = sigma; sigma_y = sigma / gamma; % Bounding box nstds = 3; xmax = max(abs(nstds * sigma_x * cos(theta)), abs(nstds * sigma_y * sin(theta))); xmax = ceil(max(1, xmax)); ymax = max(abs(nstds * sigma_x * sin(theta)), abs(nstds * sigma_y * cos(theta))); ymax = ceil(max(1, ymax)); xmin = -xmax; ymin = -ymax; [x,y = meshgrid(xmin:xmax, ymin:ymax); % Rotation 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+y_theta.^2/sigma_y^2)).*cos(2*pi/lambda*x_theta+psi); Code for Gabor feature extraction from images in MATLAB can be found at http://www.mathworks.com/matlabcentral/fileexchange/44630.[src] import Data.Complex gabor λ θ ψ σ γ x y = exp(-(x'^2 + γ^2 * y'^2) / (2*σ^2)) * exp(i * (2*pi*x'/λ + ψ)) where x' = x * cos θ + y * sin θ y' = -x * sin θ + y * cos θ i = 0 :+ 1[src]
23 sentences · 23 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Gabor filter." encyclopegia.org, 2026, https://encyclopegia.org/wiki/gabor-filter. Accessed 04 December 2026.
Chicago
"Gabor filter." encyclopegia.org. Accessed December 4, 2026. https://encyclopegia.org/wiki/gabor-filter.
APA
encyclopegia.org. (2026). Gabor filter. Retrieved December 4, 2026, from https://encyclopegia.org/wiki/gabor-filter
Accessed December 4, 2026 · CC BY-SA 4.0 · citation page · JSON