GaborFilter
✖
GaborFilter
filters data by convolving with a Gabor kernel of pixel radius r and wave vector k.
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:
-
list arbitrary-rank numerical array tseries temporal data such as TimeSeries, TemporalData, … image arbitrary Image or Image3D object audio an 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 Standardized True whether to rescale the Gabor kernel to account for truncation WorkingPrecision Automatic the precision to use - With a setting Padding->None, GaborFilter[data,…] normally gives a result smaller than data.

Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Scope (7)Survey of the scope of standard use cases
Data (4)
Gabor filtering of a 2D array:

https://wolfram.com/xid/0fq71z0ltch0a-ddmrxe

Filter a TimeSeries object:

https://wolfram.com/xid/0fq71z0ltch0a-j6ug3v

https://wolfram.com/xid/0fq71z0ltch0a-frwn5n


https://wolfram.com/xid/0fq71z0ltch0a-iwyhx

Filter an Audio signal:

https://wolfram.com/xid/0fq71z0ltch0a-emvukp


https://wolfram.com/xid/0fq71z0ltch0a-iqqsr


https://wolfram.com/xid/0fq71z0ltch0a-evjhyd

Parameters (3)
Gabor filtering of a noisy signal using different kernel radii:

https://wolfram.com/xid/0fq71z0ltch0a-ekel2p

https://wolfram.com/xid/0fq71z0ltch0a-c7x15i

Use different standard deviations:

https://wolfram.com/xid/0fq71z0ltch0a-kgyzk0


https://wolfram.com/xid/0fq71z0ltch0a-j7z1m

Gabor filtering in the vertical direction:

https://wolfram.com/xid/0fq71z0ltch0a-hekrt

Filtering in the horizontal direction:

https://wolfram.com/xid/0fq71z0ltch0a-cwon47

Filtering in a diagonal direction:

https://wolfram.com/xid/0fq71z0ltch0a-e0sxr6

The cosine part of a Gabor filter is computed when :

https://wolfram.com/xid/0fq71z0ltch0a-y35oh

The sine part of a Gabor filter is computed when :

https://wolfram.com/xid/0fq71z0ltch0a-cioi27

Options (6)Common values & functionality for each option
Padding (3)
Gabor filtering using different padding schemes:

https://wolfram.com/xid/0fq71z0ltch0a-j2ihmz

https://wolfram.com/xid/0fq71z0ltch0a-ggz55e

Gabor filtering of a grayscale image using different padding schemes:

https://wolfram.com/xid/0fq71z0ltch0a-brspfd

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

https://wolfram.com/xid/0fq71z0ltch0a-bkzy48

WorkingPrecision (3)
MachinePrecision is by default used with integer arrays:

https://wolfram.com/xid/0fq71z0ltch0a-cdrg18

Perform exact computation instead:

https://wolfram.com/xid/0fq71z0ltch0a-jt3a9c

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

https://wolfram.com/xid/0fq71z0ltch0a-2q79si


https://wolfram.com/xid/0fq71z0ltch0a-7f69wx

WorkingPrecision is ignored when filtering images:

https://wolfram.com/xid/0fq71z0ltch0a-pc6p9y

An image of a real type is always returned:

https://wolfram.com/xid/0fq71z0ltch0a-o6dztt

Applications (3)Sample problems that can be solved with this function
Gabor filtering of an image to detect vertical lines in an image:

https://wolfram.com/xid/0fq71z0ltch0a-yayl71

Detect edges in the specified direction in a noisy image:

https://wolfram.com/xid/0fq71z0ltch0a-dkjmn3

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

https://wolfram.com/xid/0fq71z0ltch0a-fqopmr
Extract regions with the dominant direction parallel to and
:

https://wolfram.com/xid/0fq71z0ltch0a-vjwmcr

Highlight two texture segments on the image:

https://wolfram.com/xid/0fq71z0ltch0a-fzo2nr

Properties & Relations (5)Properties of the function, and connections to other functions
GaborFilter is equivalent to a convolution with a GaborMatrix:

https://wolfram.com/xid/0fq71z0ltch0a-es6t43


https://wolfram.com/xid/0fq71z0ltch0a-ri8l57


https://wolfram.com/xid/0fq71z0ltch0a-bfgtky

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

https://wolfram.com/xid/0fq71z0ltch0a-cw7vc0

Impulse response of a Gabor filter:

https://wolfram.com/xid/0fq71z0ltch0a-byrh8v

Magnitude spectrum of the filter:

https://wolfram.com/xid/0fq71z0ltch0a-fpgj9e

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

https://wolfram.com/xid/0fq71z0ltch0a-hznxi1

GaborFilter is a linear filter:

https://wolfram.com/xid/0fq71z0ltch0a-dktmv8

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
]}
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
]}