使用matlab实现Gabor滤波器
使用matlab实现Gabor滤波器
1、spatialgabor.m
% SPATIALGABOR - applies single oriented gabor filter to an image
%
% Usage:
% [Eim, Oim, Aim] = ?spatialgabor(im, wavelength, angle, kx, ky, showfilter)
%
% Arguments:
%im - Image to be processed.
%wavelength - Wavelength in pixels of Gabor filter to construct
%angle - Angle of filter in degrees. ?An angle of 0 gives a
% filter that responds to vertical features.
% kx, ky - Scale factors specifying the filter sigma relative
% to the wavelength of the filter. ?This is done so
% that the shapes of the filters are invariant to the
% scale. ?kx controls the sigma in the x direction
% which is along the filter, and hence controls the
% bandwidth of the filter. ?ky controls the sigma
% across the filter and hence controls the