Tutorial on Gabor Filters

download Tutorial on Gabor Filters

of 23

Transcript of Tutorial on Gabor Filters

TutorialonGaborFiltersJavierR.Movellan1 TheTemporal(1-D)GaborFilterGabor lters can serve as excellent band-pass lters for unidimensional signals (e.g.,speech). A complex Gabor lter is dened as the product of a Gaussian kernel timesacomplexsinusoid,i.e.g(t) = kejw(at)s(t) (1)wherew(t) = et2(2)s(t) = ej(2fot)(3)ejs(t)ej(2fot+)=_sin(2fot +), j cos(2fot +)_(4)Here k, , foare lterparameters. Wecan thinkof thecomplex Gabor lteras twoout ofphase lterscontinentlyallocatedintherealandcomplexpart ofacomplexfunction,therealpartholdstheltergr(t) = w(t) sin(2fot +) (5)andtheimaginarypartholdstheltergi(t) = w(t) cos(2fot +) (6)1.1 FrequencyResponseTakingtheFouriertransform g(f) = kej_ej2ftw(at)s(t) dt = kej_ej2(ffo)tw(at)dt (7)=kaej w(f foa) (8)where w(f) = w(f) = ef2(9)1.2 GaborEnergyFiltersTherealandimaginarycomponentsofacomplexGaborlterarephasesensitive,i.e., asaconsequencetheirresponsetoasinusoidisanothersinusoid(seeFigure1.2). Bygettingthemagnitudeof theoutput(squarerootof thesumof squaredrealandimaginaryoutputs)wecangetaresponsethatphaseinsensitiveandthusunmodulatedpositiveresponsetoatarget sinusoid input(seeFigure1.2). Insomecases it is useful tocompute the overall output of the twoout of phaselters.Onecommonwayof doingsoistoaddthesquaredoutput(theenergy)of eachlter, equivalentlywecangetthemagnitude. Thiscorrespondstothemagnitude(moreprecisely thesquared magnitude)of thecomplex Gaborlteroutput. Inthefrequency domain, the magnitude of the response to a particular frequency is simplythemagnitudeofthecomplexFouriertransform,i.e.g(f) =ka w(f foa) (10)NotethisisaGaussianfunctioncenteredatf0andwithwidthproportionaltoa.0 2 4 6 81010 2 4 6 8500500 2 4 6 8500500 2 4 6 8050Figure1: Top: Aninputsignal. Second: Outputof Gaborlter(cosinecarrier).Third: Output of Gabor Filter inquadrature(sinecarrier); Fourth: Output ofGaborEnergyFilter1.2.1 BandwidthandPeakResponseThusthepeaklterresponseisatfo. Togetthehalf-magnitudebandwidthfnote w(f foa) = effoa2= 0.5 (11)Thusthehalfpeakmagnitudeisachievedforf fo_a2log 2 = 0.4697 a 0.5 a (12)Thusthehalf-magnitudebandwidthis(2)(0.4697)a)whichisapproximatelyequaltoa. Thusacanbeinterpretedasthehalf-magnitudelterbandwidth.1.3 EliminatingtheDCresponseDependingonthevalueof foandatheltermayhavealargeDCresponse. Apopular approach to get a zero DCresponse isto subtract theoutput of a low-passGaussianlter,h(t) = g(t) c w(bt) = kejw(at)s(t) c w(bt) (13)Thush(f) = g(f) cb w(fb) (14)TogetazeroDCresponseweneedcb w(0) = g(0) (15)c = b g(0) = bkaej w(foa) (16)whereweusedthefactthat w(fo) = w(fo)Thus,h(t) = g(t) b g(0) = kej_w(at)s(t) ba w(foa)w(bt)_(17)h(f) =kaej_ w(f foa) w(foa) w(fb)_(18)Itisconvenient,toletb = a,inwhichcaseh(t) = kejw(at)_s(t) w(foa)_(19)h(f) =kaej_ w(f foa) w(foa) w(fa)_(20)2 TheSpatial (2-D)GaborFilterHereistheformulaofacomplexGaborfunctioninspacedomaing(x, y) = s(x, y) wr(x, y) (21)wheres(x, y)isacomplexsinusoid, knownasthecarrier, andwr(x, y)isa2-DGaussian-shapedfunction,knownastheenvelope.2.1 ThecomplexsinusoidcarrierThecomplexsinusoidisdenedasfollows,1s(x, y) = exp (j (2(u0x +v0y) +P)) (22)where(u0, v0) andP denethespatial frequencyandthephaseof thesinusoidrespectively.Wecanthinkof thissinusoidas two separate real functions,conveniently allocatedintherealandimaginarypartofacomplexfunction(seeFigure1).1Anosetconstantparameterfors(x, y)will beintroducedlater, tocompensatetheDC-componentofthissinusoid. Refertotheappendixfordetailedexplanation.Figure2: Thereal andimaginaryparts of acomplexsinusoid. Theimages are128 128pixels. Theparameters are: u0= v0= 1/80 cycles/pixel, P= 0deg.TherealpartandtheimaginarypartofthissinusoidareRe (s(x, y)) = cos (2(u0x +v0y) +P)Im(s(x, y)) = sin (2(u0x +v0y) +P)(23)Theparametersu0andv0denethespatialfrequencyofthesinusoidinCartesiancoordinates. Thisspatial frequencycanalsobeexpressedinpolarcoordinatesasmagnitudeF0anddirection0:F0=_u02+v020= tan1_v0u0_(24)i.e.u0= F0cos0v0= F0sin0(25)Usingthisrepresentation,thecomplexsinusoidiss(x, y) = exp (j (2F0 (xcos0 +ysin0) +P)) (26)2.2 TheGaussianenvelopeTheGaussianenvelopelooksasfollows(seeFigure2):wr(x, y) = Kexp__a2(x x0)r2+b2(y y0)r2__(27)where(x0, y0)isthepeakof thefunction, aandbarescalingparameters2of theGaussian,andthersubscriptstandsforarotationoperation3suchthat(x x0)r= (x x0) cos + (y y0) sin (y y0)r= (x x0) sin + (y y0) cos (28)2NotethattheGaussiangetssmallerinthespacedomain,ifaandbgetlarger.3Thisrotationisclockwise, theinverseofthecounterclockwiserotationoftheellipse.Figure 3: A Gaussian envelope. Theimage is 128 128 pixels. The parameters areasfollows: x0= y0= 0. a = 1/50 pixels, b = 1/40 pixels, = 45deg.2.3 ThecomplexGaborfunctionThecomplexGaborfunctionisdenedbythefollowing9parameters; K : ScalesthemagnitudeoftheGaussianenvelope. (a, b) : ScalethetwoaxisoftheGaussianenvelope. : RotationangleoftheGaussianenvelope. (x0, y0) : LocationofthepeakoftheGaussianenvelope. (u0, v0) : SpatialfrequenciesofthesinusoidcarrierinCartesiancoordinates.Itcanalsobeexpressedinpolarcoordinatesas(F0, 0). P : Phaseofthesinusoidcarrier.EachcomplexGaborconsistsof twofunctionsinquadrature(outof phaseby90degrees), conveniently located in the real and imaginary parts of a complex function.Figure 4: The real andimaginaryparts of acomplexGabor functioninspacedomain. The images are 128128 pixels. The parameters are as follows: x0= y0=0, a = 1/50 pixels, b = 1/40 pixels, = 45deg, F0=2/80 cycles/pixel, 0=45deg, P= 0deg.NowwehavethecomplexGaborfunctioninspacedomain4(seeFigure3):g(x, y) = Kexp__a2(x x0)r2+b2(y y0)r2__exp(j (2(u0x +v0y) +P))(29)Orinpolarcoordinates,g(x, y) = Kexp__a2(x x0)r2+b2(y y0)r2__exp(j (2F0 (xcos0 +ysin0) +P))(30)4Infact, there remains some DCcomponent inthis Gabor function. Youhave tocompensateittohavetheadmissibleGaborfunction. Refertotheappendix.Figure 5: The Fourier transformof the Gabor lter. The peakresponse is atthespatial frequencyof thecomplexsinusoid: up=vp=1/80cycles/pixel. Theparametersareasfollows: x0=y0=0, a=1/50pixels, b=1/40pixels, =45deg, F0=2/80 cycles/pixel, 0= 45deg, P= 0deg.The2-DFouriertransform ofthisGabor5isasfollows(seeFigure4): g(u, v) =Kabexp (j (2 (x0 (u u0) +y0 (v v0)) +P))exp__(u u0)r2a2+(v v0)r2b2__(31)Orinpolarcoordinates,Magnitude ( g(u, v)) =Kabexp__(u u0)r2a2+(v v0)r2b2__Phase ( g(u, v)) = 2 (x0 (u u0) +y0 (v v0)) +P(32)5Refertotheappendixfordetailedexplanation.3 Half-magnitudeproleThe region of points, infrequency domain, withmagnitude equal one-half the peakmagnitude can beobtained as follows. Since thepeak value is obtained for (u, v) =(u0, v0), andthepeakmagnitudeisK/ab, wejustneedtondthesetof points(u, v)withmagnitudeK/2ab.12Kab=Kabexp__(u u0)r2a2+(v v0)r2b2__(33)or,log 2 = _(u u0)r2a2+(v v0)r2b2_(34)orequivalently,_(u u0)ra C_2+_(v v0)rb C_2= 1where C=_log 2= 0.46971864 0.5(35)Equation35isanellipsecenteredat(u0, v0)rotatedwithananglewithrespecttotheuaxis. Themainaxisof theellipsehavelength2 a C aand2 b C brespectively.Wewillusethefollowingconvention: aisthelengthoftheaxiscloserto0,and bisthelengthoftheaxisperpendiculartothemainaxis6(SeeFigure5).(a)(b)Theta F_0Omega_0Figure 6: Parameters of the Gabor kernel as reected in the half-magnitude ellipticprole. Notethatthisisagureinfrequencydomain.4 Half-magnitudefrequencyandorientationbandwidthsFrequency and orientation bandwidths of neurons are commonly measured in termsof thehalf-magnituderesponses. Let u0, v0the preferredspatial frequencyof aneuron. Inpolarcoordinates thisspatialfrequencycanbeexpressedasF0and0.6Morepreciselyaandbare1.06timesthelengthoftherespectiveaxisTo nd the half-magnitude frequency bandwidth, we probe the neuron with sinusoidimages of orientation 0and dierent spatial frequency magnitudes F. We increaseFwithrespecttoF0until themagnitudeof theresponseis half themagnitudeat (F0, 0). Lets call that valueFmax. WethendecreaseFwithrespect toF0until themagnitude of the response is half the response at (F0, 0). Call that Fmin.Half-magnitudefrequencybandwidthisdenedasfollows:F1/2=FmaxFmin(36)or,whenmeasuredinoctaves,7F1/2=log2 (Fmax/Fmin) (37)Half-magnitude orientation bandwidth is obtained following the same procedure butplayingwiththeorientation insteadofthefrequencymagnitudeF.1/2=maxmin(38)InGabor functions with00the frequencybandwidthcanbe obtainedasfollows(SeeFigure6)F1/2= 2 a C a (39)andtheorientationbandwidthcanbeapproximatedasfollows(seeFigure6)1/2 2 tan1_b CF0_(40)b CFoDelta F = aC0.5 Delta W ~ arctan( b C / F o)Figure7: Ahalf-magnitudeproleanditsrelationshiptotheorientationandfre-quencybandwidths.7Octaveisaunitusedforshowntheratio,asanindexof2. k octaves = 2k100.0%5 EectivespreadandrmsspreadTherms(whichstandsforrootmeansquares)length, rmswidth, andrmsareaofa2-Dfunctionaredenedintermsoftheirrstandsecondmoments:Themomentsofacomplexfunctiong(x, y)aredenedbyconvertingthefunctioninto a probability density (which must be always positive and integrates to 1.0) andthencalculatingthestandardrstandsecondmoments.Acommonwaytoachievethisisasfollows:Fromthefunctiong(x, y)weconstructthefollowingprobabilitydensityf(x, y) =1Z |g(x, y)|2(41)where |g(x, y)|2isthesquaredmagnitudeof thesignal, whichisalwayspositive,andZguarantees thatf(x, y)integratesto1.0,i.e.Z=_+_+|g(x, y)|2dxdy (42)Oncewehavedenedaprobabilitydensityfunction, thestandardstatisticalmea-suresoflocationandscalefollow.X= EX(x) =_ _f(x, y) xdxdy (43)2X= EX_(x X)2_=_ _f(x, y) (x X)2dxdy (44)withsimilarequationsforYand2Y .Y= EY (y) =_ _f(x, y) y dxdy (45)2Y= EY_(y Y )2_=_ _f(x, y) (y Y )2dxdy (46)And,XY= EXY((x X) (y Y )) =_ _f(x, y) (x X) (y Y ) dxdy (47)ThermswidthandlengtharedenedastheXandYof arotatedversionoff(x, y)sothatthecovariance XYoftherotateddistributionbezero.LetXr, Yrrepresent therotatedvariables forwhichthecovariance iszero,thermslengthandwidthareXrms=_2Xr(48)Yrms=_2Yr(49)Similardenitionscanbeobtainedalsointhefrequencydomain,byworkingwiththeFouriertransform oftheoriginalcomplexfunction.Urms =_2Ur(50)Vrms=_2Vr(51)Thermsareainthespaceandfrequencydomainsaredenedasfollows:Area (XY )rms= (Xrms) (Yrms) (52)Area (UV )rms= (Urms) (Vrms) (53)Somepaperswork withwhat areknown aseectivelength,widthandareas. Theyaresimplythermsmeasuresmultipliedby2Xe=2 Xrms(54)andsoon.It can be shown that the following relationships hold on any 2D function with nitemoments(Xrms) (Urms) 14(55)(Yrms) (Vrms) 14(56)andArea (XY )rmsArea (UV )rms 1162(57)ItiseasytoverifythattheGaborcomplexfunctionachievesthelowerlimitsoftheuncertaintyrelations. For agivenareainthespacedomainit provides themaximumpossibleresolutioninthefrequencydomain,andvice-versa.ItcanbeshownthatthermswidthandlengthsofGaborfunctionsareasfollows:Urms=a2(58)Vrms=b2(59)Tow see why, simply consider that the probability density associated with the Gaborfunctionf(x, y) =1Z |g(x, y)|2isGaussian| g(u, v)|2= exp(2(u2a2+v2b2)) (60)withvariancesequaltoU2rmsandV2rms.Moreover, fromtheuncertaintyrelations,Xrms=12a(61)Yrms=12b(62)6 GaborfunctionsasmodelsofsimplecellreceptiveeldsJones andPalmer (1987)showedthat thereal part of complexGabor functionstverywellthereceptiveeldweightfunctionsfoundinsimplecellsincatstriatecortex.Herearesomeuseful piecesinformationfordesigningbiologicallyinspiredGaborlters. To a rst approximation the orientation of theGaussian envelop 0can bemodeledasbeingequivalenttotheorientationof thecarrier.80=0.Theactualabsolutedeviationsbetween0and0have aMedianofabout10degrees(seeJonesandPalmer,1987, p.1249). InmacaqueV1, mostcellshaveahalfmagnitudespatial frequencyband-widthbetween1and1.5octaves. Themedianis about1.4octaves(seeDeValoisetal.,1982a, p.551). In macaque V1, the range of half-magnitude orientation bandwidths amongcells is very large: From 8 degrees to the most narrowly tuned. At the otherendtherewerecellswithnoorientationselectivityatall. (seeDeValoisetal., 1982b, p. 535and541)reportsthefollowingstatisticsfortheori-entationbandwidth: mean=65degrees, median=42degrees, mode=30degrees. However theypointoutthatothershave reported signicantlylargernumbers. Forexample()reportsa71%frommaxmedianband-widthof38.5degrees. Thiswouldcorrespondtoamedianhalfmagnitudebandwidthof66degrees. Themedianbandwidthofsimplecellsinthecatis a bit smaller than in themacaque, witha typical median half magnitudeorientation bandwidth of 30 degrees (see De Valois et al., 1982b, p. 535 and541). InmacaqueV1thepeakfrequenciesrangefromaslowas0.5cyclesperdegreeof visual angle, toaslargeas15cyclesperdegreeof visual angle.Meanvalues are 2.7cycles perdegree forcellsmapping intotheparafovealand4.25cyclesperdegreeforcellsmappingintothefovea. Thespatial frequencybandwidth(inoctaves)tendstobeabitlargerforcellswithlowpeakfrequencythanforcellswithlargepeakfrequency. Forexample, themedianhalfmagnitudebandwidthofcellstunedtofrequen-cies higher than5cycles/degreeis 1.2octaves, whereas the medianforcellstunedtofrequenciessmallerthan2cycles/degreeis1.7octaves. (seeDeValoisetal.,1982a, p.552). OrientationselectivesimplecellsinV1showminimumresponseatabout30 to 40 degrees away from the optimal orientation, not at 90 degrees awayfromtheoptimalorientation(seeDeValoisetal.,1982b,p.539). Thespikingrateof simplecellsneuronsinmacaqueV1isbetweencloseto0Hz, atrest, toabout120Hz, whenmaximallyexcited(seeDeValoisetal.,1982a, p.547). Intheareamappingthefovea, therearemorekernelsorientedverticallyandhorizontallythanorienteddiagonally(about3to2). (seeDeValoisetal.,1982b,p.537). Pairs of adjacent simple cells in the visual cortex of the cat are in quadrature(Pollen and Ronner, 1981). We can then put these two cells in the real andimaginary partsof a complexfunctionandtreat themasa complexGaborreceptiveeld.7 Gaborfunctionsforspatial frequencylteringConsider a massive set of simple cell neurons with Gabor kernel functions with equalparametersexcept forthelocationparameters(x0, y0). Letall theseneuronsbedistributeduniformlyaboutthefovealeld. Eachpointinthefovealeldcontains8domain. Notethatthelongaxisinthefrequencydomainbecomestheshortaxisinthespacedomain. Dontgetconfused!atleasttwoneuronsinquadrature. Wecanmodel theoperationof suchasetofneurons as a convolution operation (assuming a continuous and uniform distributionof lters in all the foveal locations). Since convolution in space domain is product infrequencydomain,thesetof Gabor functionswork as bandpass frequencyltersofthefovealimage. Thepeakfrequencyiscontrolledbythespatialfrequencyofthesinusoidcarrier(u0, v0). Thehalf-magnituderegioniscontrolledbytherotationandscaleparametersa,b,oftheGaussianenvelope.8 EnergylteringA quadrature pair (or a Hilbert Transform pair) is a set of two linear operators withthesameamplituderesponsebutphaseresponsesshiftedby90degrees. StrictlyspeakingsineandcosineGaboroperatorsarenotquadraturepairsbecausecosinephaseGaborshavesomeDCresponse, whereassinegaborsdonot. However,onecanhavequadratureGaborpairsthatlookverymuchlikesine/cosinepairs. ThusthesineandcosineGaborpairiscommonlyreferedtoasaquadraturepair.A system that sums the square of the outputs of a quadrature pair is called an energymechanism(AdelsonandBergen, 1985). Energymechanismshaveunmodulatedresponsestodriftingsinusoids.ComplexcellsinV1arecommonlymodeledasenergymechanismssincetheyareunmodulatedbydriftingsinusoids. Simplecellsrespondtoadriftingsinusoidwithahalf-waverectiedanalogofthesignal,suggestingthatthecellsarelinearuptorectication. Complexcellsrespondtoadriftingsinusoidinanunmodulatedway,asamaintaineddischarge. Movshonetal. (1987)showedthatcomplexreceptiveeldsarecomposedof subunits. Thesubunitsof model complexcellsaremodelsimplecellswithidentical amplituderesponse. Emersonetal. (1992)haveshownthat behavior of complex cellto stimulimade of pairs of bars ashed insequence isconsistwithanenergymechanism.9 ContrastNormalizationMorrone et al.(1982) have shown that stimulipresented at orientations orthogonalto the optimal orientation inhibit simple cells activity. (De Valois et al., 1982a) haveshownsimilarinhibitoryeectbetweenfrequencybands. Theseinhibitoryeectsmayplayaserveasagaincontrol(orcontrastnormalization)mechanism. Heeger(1991) proposes the following model of gain control in complex cells: The amplituderesponse of each energy mechanism is divided by the total energy at all orientationsandnearbyspatialfrequencies:Ei=Ei +

j Ej(63)whereisapositiveconstanttoavoidzerodenominators.10 Functional InterpretationsSectioninpreparation: minimizes number of neurons needed to achieve a desired frequency resolu-tion. spatiallyandfrequencylocalized. matchedtologons likelytooccurinimages. for natural images the Gabor representationis more sparse thanthe (pixel)representationandthantheDOGrepresentation.11 ConstructinganidealizedV1HereweproposeawaytoconstructabiologicallyinspiredGaborlterbank. Theorientationofthecomplexsinusoidcarrier andtheGaussianenvelopearethesame: 0=. Thisisjustanapproximation. Theactual medianabsolutedeviationbetween0andisabout10degrees. We will assumethat the he half-magnitudefrequencybandwidth, whenmeasuredinoctaves,isconstantandequal to1.4cyclesperdegreeforallneurons. Thisisjustanapproximation. Weknowthatneuronstunedtolowspatial frequencies havelargerbandwidth(median1.7)andneuronstunedtohighspatialfrequencieshavesmallerbandwidth(median1.2). Inadditionthereis asignicant rangeinbandwidths (bulkof theneuronshave bandwidthsbetween1and1.5octaves) thatwillnotbeaddressed bytheproposedmodel. Wewillassumethatthehalf-magnitudeorientation bandwidthisconstantand equal to 40 degrees for all neurons (median value reported by (De Valoiset al., 1982b). This is just an approximation since the actual range observedinsimplecellsisverylarge,goingfrom10degreestonoorientationselec-tivityatall. Giventhiswiderangeinthedistributionitisnotsurprisingthatothermedianbandwidthvalueshavebeenreportedintheliterature,rangingfromareportedmedianofabout30degreestoareportedmedianofabout60degrees(DeValoisetal.,1982b). Fromthethreeconstrainedabove, wewill soonderivethat all thelterkernelsshallhaveaaspectratioofabout1.24,i.e.,a/b 1.24. Inaddition, tofacilitatethedesignwewill designourlterbanksothatthehalf-magnitudecontourof afrequencybandcoincideswiththelowercontourofthenextfrequencyband.Fromtheseassumptionsabove,wecanderivetherelationshipbetweentheparam-etersF0,aandb.Fromequations37and39,weknowthatthefrequencybandwidthinoctavesisF1/2= log2F0 +a CF0a Cwhere C=_log 2= 0.46971864 0.5(64)Thus,a = F0KaC(65)whereKa=2F12F+ 1(66)Withrespecttotheorientationbandwidth,equation40tellsusthattan_12_=b CF0(67)Thus,b = F0KbC(68)whereKb= tan_12_(69)Therefore,inthismodeltheaspectratioofaandbisconstant: =ab=KaKb(70)Moreover, fromequation3912F= a C= F0Ka(71)We can now locate our frequency peaks such that the upper half-magnitude contourof onechannel coincides withthe lower half-magnitudecontour of the the nextchannel.Letisignifythepeakfrequencyoftheithband,WeknowFmaxforbandiisFimax= i +12Fi= i +iKa= i (1 +Ka) (72)andFminforbandi + 1isFi+1max= i+112Fi+1= i+1i+1Ka= i+1 (1 Ka) (73)Wewantthesetwovaluestocoincide,thereforei+1= i1 +Ka1 Ka(74)Thus,thepeakfrequenciesfollowageometricseriesi= 1Ri1(75)whereR =1 +Ka1 Ka(76)11.1 ExampleIf weusethestandardvaluesforsimplecell medianof thehalf magnitudeband-widthsfrommacaquestriatecortex: F= 1.4octaves. = 40degrees.Then,Ka=2F12F+ 1= 0.45040 (77)Kb= tan_12_= 0.36397 (78)a = iKaC= 0.9589 i(79) =ab=KaKb= 1.23746 (80)b =a= 1.1866 i(81)R =1 +Ka1 Ka= 2.6390 (82)SupposewewantthreefrequencybandsandwewanttheF0ofthethirdbandtobe0.25. Then,1=0.252.63902= 0.03589 (83)and12F1= Ka1= 0.01617 (84)Thus,thehalfmagnitudeinterval9is(0.01973, 0.05207)Thesecondbandpeaksat2= 1R = 0.09473 (85)and12F2= Ka2= 0.04267 (86)Thus,thehalfmagnitudeintervalis(0.05207, 0.1374)Finally,thethirdbandpeaksat3= 2R = 0.2500 (87)and12F3= Ka3= 0.1126 (88)Thus,thehalfmagnitudeintervalis(0.1374, 0.3626)ThesethreeGaborscoverthefrequencybandsof(0.01973, 0.3626)12 Appendix12.1 FouriertransformofaGaussianfunctionTheFouriertransformofthesimple1-DGaussianis_exp(x2)exp(2jfx) dx=_exp_(x +jf)2f2_dx= exp_f2__exp_x

2_dx

(x

x +jf)= exp_f2_(89)9ThehalfmagnitudeintervalhereisthefrequencycoverageofthatGaborintermsofhalf-magnitudeprole:i 12Fi, i +12FiInthesameway,theFouriertransform ofthesimple2-DGaussianis__exp_(x2+y2)_exp(2jux)exp(2jvy) dxdy=_exp(x2)exp(2jux) dx_exp(y2)exp(2jvy) dy= exp(u2)exp(v2)= exp_(u2+v2)_(90)andsoon. Moregenerally,_exp_ xTx_exp_2j uTx_dx = exp_ uTu_(91)That is, the Fourier transformof an N-dimensional Gaussian is also an N-dimensionalGaussian.12.2 FouriertransformoftheGaborfunctionGivenaGaussianenvelopeandsinusoidcarrier:w(x) = exp( xTx) (92)s(x) = exp(j2 uTo x) (93)WedeneaGaborfunctionasfollowsg(x) = Kexp(jP) w(A(x xo)) s(x) (94)whereK,P,A,uoandxoarefunctionparameters. TheFouriertransformofthisfunctionisasfollows g(u) =_g(x)exp(2juTx) dx (95)=Kexp(jP)_w(A(x x0))exp(2j (u u0)Tx) dx (96)Letting x = A(x xo)wegetx = A1 x +xo,and10d x = Adxandtherefore g(u) =KAexp(jP)_w( x)exp(2j (u u0)T(A1 x xo)) d x (97)=KAexp(jP)exp((u uo)Txo) (98)_w( x)exp(2j (AT(u u0))T x) d x (99)Thus g(u) =KAexp(jP)exp(j2 (u uo)Txo) w(AT(u uo)) (100)whereweusedthefactthat w() = w().10Notethedxsymbolintheintegralstandsfortheproductdx1dx2Fortheclassof Gaborfunctionsstudiedinthemainsectionof thisdocumentweletA = DV ,whereDisadiagonalmatrixandV isarotationmatrixsuchthatD =_a 00 b_, V=_cos sin sin cos _(101)Thus,sinceV isarotationA1= D1VT(102)AT= V D1= D1V (103)A = DV= ab (104)andtherefore,g (x, y) =Kexp__a2(x x0)r2+b2(y y0)r2__exp (j (2 (u0x0 +v0y0) +P))(105)AnditsFouriertransform is: g(u, v) =Kab exp(jP)exp(2j(x0(u u0) +y0(v v0))) (106)exp(((u u0)2ra2+(v v0)2rb2) (107)where(x x0)r= (x x0) cos + (y y0) sin (108)(y y0)r= (x x0) sin + (y y0) cos (109)12.3 EliminatingtheDCresponseofGaborFiltersTheGaborfunctionasdenedabovemayhaveanon-zeroDCresponse g(0) =KAexp(jP)exp(j2 uToxo) w(ATuo) (110)whereweusedthefactthatw(x) = w(x). Insomecasesitisusefultoeliminatethe DC response, for example, we may not want the lter to respond to the absoluteintensityof animage. Oneapproachtodoingsoistosubtractfromtheoriginalltertheoutputofalow-passlter.h(x) = g(x) Cf(x) (111)where Cis aconstant and f() isthelow pass lter. A convenient andpopular lowpasslterisasfollowsf(x) =KAw(A(x xo)) (112)Noteinthiscasef(x) =KAw(A(x xo))_exp(jP)exp(j2uToxo) C_(113)whichcorrespondstosubtractingacomplexconstantfromthecomplexsinusoidcarrier.NotefisaGaborlterwithzerophaseandzeropeakresponse. ThereforeithasthefollowingFourierTransformf(u) =KAexp(j2 uTxo) w(ATu) (114)ThustheDCresponseofthecombinedlterisasfollowsh(0) = g(0) C f(0) =KA_exp(jP)exp(j2 uToxo) w(ATuo) C_(115)andthusgetazeroDCresponsewesimplyneedtosetCasfollowsC= exp(j(P+ 2 uToxo)) w(ATuo) (116)12.4 AnotherformulaoftheGaborfunctionIn other papers, you may see another formula representation of the Gabor function.Forexample,inmostpapers,x0= y0= 0, P= 0. Then,g (x, y) = Kexp__a2xr2+b2yr2___exp (2j (u0x +v0y)) exp__u0r2a2+v0r2b2___(117) g (u, v) =Kab_exp__(u u0)r2a2+(v v0)r2b2__exp__u0r2a2+v0r2b2__exp__ur2a2+vr2b2___ (118)Moreover, a=b insomepaper. Therotationanglehasnoeect(=0)inthiscase.g (x, y) = Kexp_2_x2+y2___exp(2j (u0x +v0y)) exp_2_u02+v02___(119) g (u, v) =K2_exp_2_(u u0)2+ (v v0)2__exp_2_u02+v02__exp_2_u2+v2___ (120)Then if you restrict themagnitude of spatial frequency of the sinusoid carrier F0tosatisfythisequation:F0=_u02+v02=22(121)theGaborfunctionwillbeg (x, y) = Kexp_2_x2+y2___exp_j22(xcos0 +ysin0)_exp_22__(122) g (u, v) =K2_exp_2_(u u0)2+ (v v0)2__exp_22_exp_2_u2+v2___(123)FinallyifyouuseK= 22,g (x, y) = 22exp_2_x2+y2___exp_j22(xcos0 +ysin0)_exp_22__(124) g (u, v) = 2_exp_2_(u u0)2+ (v v0)2__exp_22_exp_2_u2+v2___(125)Additionally,youcanuseangularfrequency(, )insteadof(u, v). Then,g (x, y) = 22exp_2_x2+y2___exp (j (0x +0y)) exp_22__(126) g (u, v) = 2_exp_142_( 0)2+ ( 0)2__exp_22_exp_142_2+2___(127)In fact, angular frequency representation can be seen in many papers. So it may beusefultohavethequitegeneralGaborfunction11inthatformat:g (x, y) = Kexp__a2xr2+b2yr2___exp (j (0x +0y)) exp_14_0r2a2+0r2b2___(128) g (u, v) =Kab_exp_14_( 0)r2a2+( 0)r2b2__exp_14_0r2a2+0r2b2__exp_14_r2a2+r2b2___ (129)11Onlyx0= y0= 0, P= 0areassumed.13 History The rst version of this document,whichwas 14 page long, was written byJavierR.Movellanin1996. OnSeptember32002weaddedthechangesmadebyKentaKawamoto.Theseincludeda7pageAppendixwithsectionsontheFouriertransformoftheGaborfunction,andanaltenativeformulafortheGaborfunction. Fall2005. GeorgiosBritzolakisreportedabugonequation60. Summer2008. JavierMovellanadded1-Dtemporal GaborSection, andpolishedtheAppendix.ReferencesAdelson, E. H. andBergen, J. R. (1985). Spationtemporal energymodelsfortheperceptionofmotion. Journaloftheoptical societyofamericaA,2:284299.DeValois, R. L., Albrecht, D. G., andThorell, L. G. (1982a). Spatial frequencyselectivityofcellsinmacaquevisualcortex. VisionResearch,22:545559.DeValois,R.L.,Yund,W.,andHepler,N.(1982b). Theorientationanddirectionselectivityofcellsinmacaquevisualcortex. VisionResearch,22:531544.Emerson, R. C., Bergen, J. R., andAdelson, E. H. (1992). Directionallyselectivecomplexcellsandthecomputationof motionenergy incatvisualcortex. VisionResearch,32(2):203218.Heeger, D. (1991). Nonlinearmodel of neural responsesincatvisual cortex. InLandy, M. and Movshon, J., editors, ComputationalModelsofVisualProcessing,pages119133. MITPress,Cambridge,MA.Jones, J. P. and Palmer, L. (1987). An evaluation of the two-dimensional gabor ltermodel of simple receptive elds in cat striate cortex. JournalofNeurophysiology,58:12331258.Morrone, M. C., Burr, D. C., and Maei, L. (1982).Functional signicance of cross-orientationinhibition, partI. Neurophysiology. Proc. R.Soc.Lond. B,216:335354.Movshon, J. A., Thompson, I. D., andTolhurst, D. J. (1987). Receptive eldorganizationof complexcellsinthecatsstriatecortex. Journal of Physiology(London),283:5377.Pollen, D. A. and Ronner, S. F. (1981). Phase relationships between adjacent simplecellsinthevisualcortex. Science,212:14091411.