WOLFRAM

GaborFilter[data,r,k]

filters data by convolving with a Gabor kernel of pixel radius r and wave vector k.

GaborFilter[data,r,k,ϕ]

uses a Gabor kernel with phase shift ϕ.

GaborFilter[data,{r,σ},]

uses a Gabor kernel with radius r and standard deviation σ.

Details and Options

  • GaborFilter is a linear, spatially directional and frequency-selective filter commonly used in image processing for texture analysis and segmentation. In the spatial domain, a 2D Gabor filter kernel is a Gaussian function modulated by a sinusoidal plane wave.
  • The data can be any of the following:
  • listarbitrary-rank numerical array
    tseriestemporal data such as TimeSeries, TemporalData,
    imagearbitrary Image or Image3D object
    audioan Audio object
  • GaborFilter[data,r,k] is equivalent to GaborFilter[data,{r,r/2},k,0].
  • Either of the r or σ can be lists, specifying different values for different directions.
  • GaborFilter[image,] by default gives an image of a real type of the same dimensions as image.
  • The following options can be specified:
  • Padding "Fixed"padding method
    StandardizedTruewhether to rescale the Gabor kernel to account for truncation
    WorkingPrecision Automaticthe precision to use
  • With a setting Padding->None, GaborFilter[data,] normally gives a result smaller than data.

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Filter an image:

Out[287]=287

Gabor filtering of a 3D image:

Out[1]=1

Apply a Gabor filter to a list of values:

Out[1]=1

Scope  (7)Survey of the scope of standard use cases

Data  (4)

Gabor filtering of a 2D array:

Out[156]=156

Filter a TimeSeries object:

Out[2]=2
Out[3]=3

Filter an Audio signal:

Out[1]=1
Out[2]=2

Filter a color image:

Out[1]=1

Parameters  (3)

Gabor filtering of a noisy signal using different kernel radii:

Out[11]=11

Use different standard deviations:

Out[21]=21

Use different wave vectors:

Out[76]=76

Gabor filtering in the vertical direction:

Out[1]=1

Filtering in the horizontal direction:

Out[2]=2

Filtering in a diagonal direction:

Out[3]=3

The cosine part of a Gabor filter is computed when :

Out[1]=1

The sine part of a Gabor filter is computed when :

Out[2]=2

Options  (6)Common values & functionality for each option

Padding  (3)

Gabor filtering using different padding schemes:

Out[3]=3

Gabor filtering of a grayscale image using different padding schemes:

Out[1]=1

Padding->None normally returns an image smaller than the input image:

Out[1]=1

WorkingPrecision  (3)

MachinePrecision is by default used with integer arrays:

Out[1]=1

Perform exact computation instead:

Out[2]=2

With real arrays, by default the precision of the input is used:

Out[1]=1

Specify the precision to use:

Out[2]=2

WorkingPrecision is ignored when filtering images:

Out[1]=1

An image of a real type is always returned:

Out[2]=2

Applications  (3)Sample problems that can be solved with this function

Gabor filtering of an image to detect vertical lines in an image:

Out[106]=106

Detect edges in the specified direction in a noisy image:

Out[1]=1

The magnitude of the Gabor filter is computed as the squared norm of the sine and cosine components:

Extract regions with the dominant direction parallel to and :

Out[2]=2

Highlight two texture segments on the image:

Out[3]=3

Properties & Relations  (5)Properties of the function, and connections to other functions

GaborFilter is equivalent to a convolution with a GaborMatrix:

Out[14]=14
Out[15]=15
Out[16]=16

Gabor filtering with a zero-valued wave vector is equivalent to Gaussian smoothing:

Out[1]=1

Impulse response of a Gabor filter:

Out[1]=1

Magnitude spectrum of the filter:

Out[2]=2

Gabor filtering of an image gives a real-valued image:

Out[1]=1

GaborFilter is a linear filter:

Out[1]=1
Wolfram Research (2012), GaborFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GaborFilter.html (updated 2016).
Wolfram Research (2012), GaborFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GaborFilter.html (updated 2016).

Text

Wolfram Research (2012), GaborFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GaborFilter.html (updated 2016).

Wolfram Research (2012), GaborFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GaborFilter.html (updated 2016).

CMS

Wolfram Language. 2012. "GaborFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/GaborFilter.html.

Wolfram Language. 2012. "GaborFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/GaborFilter.html.

APA

Wolfram Language. (2012). GaborFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GaborFilter.html

Wolfram Language. (2012). GaborFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GaborFilter.html

BibTeX

@misc{reference.wolfram_2025_gaborfilter, author="Wolfram Research", title="{GaborFilter}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/GaborFilter.html}", note=[Accessed: 01-April-2025 ]}

@misc{reference.wolfram_2025_gaborfilter, author="Wolfram Research", title="{GaborFilter}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/GaborFilter.html}", note=[Accessed: 01-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_gaborfilter, organization={Wolfram Research}, title={GaborFilter}, year={2016}, url={https://reference.wolfram.com/language/ref/GaborFilter.html}, note=[Accessed: 01-April-2025 ]}

@online{reference.wolfram_2025_gaborfilter, organization={Wolfram Research}, title={GaborFilter}, year={2016}, url={https://reference.wolfram.com/language/ref/GaborFilter.html}, note=[Accessed: 01-April-2025 ]}