tag:www.mathworks.com,2005:/matlabcentral/fileexchange/feedMATLAB Central File Exchangeicon.pnglogo.pngMATLAB Central - File Exchange - type:Function product:"Filter Design Toolbox" category:"Graphics"User-contributed code library2015-01-26T13:49:45-05:0011100tag:www.mathworks.com,2005:FileInfo/52372004-06-13T03:15:41Z2004-11-10T09:25:07Z2D Gabor Filter(Ver1,2,3)To design 2D Gabor filter and apply it to image.<p>Recent studies on Mathematical modeling of visual cortical cells [Kulikowski/Marcelja/Bishop:1982] suggest a tuned band pass filter bank structure. These filters are found to have Gaussian transfer functions in the frequency domain. Thus, taking the Inverse Fourier Transform of this transfer function we get a filter characteristics closely resembling to the Gabor filters. The Gabor filter is basically a Gaussian (with variances sx and sy along x and y-axes respectively) modulated by a complex sinusoid (with centre frequencies U and V along x and y-axes respectively).</p>
<p>Gabor filters are used mostly in shape detectin and feature extractin in image processing.</p>
<p>function [G,gabout] = gaborfilter1(I,Sx,Sy,f,theta);
<br />from 'gaborfilter1' with different f(Frequency) and theta(Angle).
<br />for example</p>
<p>f:0,2,4,8,16,32
<br />theta = 0,pi/3,pi/6,pi/2,3pi/4</p>
<p>then for any input image like(eg. stereo.jpg)</p>
<p>you have 6x5 = 30 filtered images.</p>
<p>You can choose your desired angles or frequencies.</p>
<p>You can put nominaly Sx & Sy = 2,4 or some one else.</p>
<p>For instance I tested above example on ('cameraman.tif')(in MATLAB pictures)</p>
<p>I = imread('cameraman.tif');
<br />[G,gabout] = gaborfilter1(I,2,4,16,pi/3);
<br />figure,imshow(uint8(gabout));</p>Ahmad Poursaberihttp://www.mathworks.com/matlabcentral/profile/authors/1426583-ahmad-poursaberiMATLAB 6.5 (R13)Filter Design ToolboxImage Processing Toolboxtrue