gabor_filter = gabor2D(w, theta, sigma, size, type)
w : central frequency
theta : angle or orientation (degree)
sigma : sigma value of Gaussian envelope (usually choose = 1/w)
size : size of output filter in pixel (size*size)
type : 'even' or 'odd', default: 'odd';
'even' : real part of gabor filter
'odd' : imaginary part of gabor filter
---------------------------------------------
Example
Assume you want to filter the central frequency 32 of the image size
320*240 with filters size 31x31. It may be:
w = [2 4 8 16 32 64];
w = w/(320/31); % scale central frequency
theta = [0 45 90 135];
sigma = 1./w;
size = 31;
type = 'even';
g = gabor2D(w(5), theta(1), sigma(5), size, type);
showGabor(g);
** showGabor function just visualizes the output of gabor2D.
Cite As
Minh Nguyen (2026). Gabor filter 2D (https://www.mathworks.com/matlabcentral/fileexchange/49888-gabor-filter-2d), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
