您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 资本运营 > Fourier-Descriptor
ImageAnalysisExercise1:FourierDescriptors(Due13.11.2009)TheDiscreteFourierTransforminTheDiscreteFourierTransforminMATLAB(1)MATLAB(1)DFTIDFTFrequancydomain(complexspectrum)Timedomain(complexsignal)SignalReconstructedfromthespectrumA(m).SpectrumFrequencydomainrepresentation.Weightandphaseoffrequency.BasisFunctionComplexexponential(oscillation).Frequencym/Noverentiresignal0≤xN.ForwardDFT(MATLABfft)InverseDFT(MATLABifft)TheDiscreteFourierTransforminTheDiscreteFourierTransforminMATLAB(2)MATLAB(2)...RealImaginaryTheDiscreteFourierTransforminTheDiscreteFourierTransforminMATLAB(4)MATLAB(4)●Forwardtransform:fft(fft2for2Dsignals)●Inversetransform:ifft(ifft2for2Dsignals)●ThetransformsadherestrictlytothedefinitionoftheDFT●Thezerofrequency(DCcomponent)isatA(0)●TheMATLABfunctionfftshiftcentresthespectrum➔Largest“effective”negativefrequencyinA(0)➔Largest“effective”positivefrequencyinA(N-1)●ifftshiftreversestheeffectsoffftshiftplot(g);abs(fft(g))abs(fftshift(fft(g)))FourierDescriptors:OverviewFourierDescriptors:Overview......●Conciseanddescriptionof(object)contours➔Contoursarerepresentedbyvectors●Numerousapplication➔ContourProcessing(filtering,interpolation,morphing)➔Imageanalysis:CharacterisingandrecognisingtheshapesofobjectRepresentingaContourusingtheDFTRepresentingaContourusingtheDFT......(xN,yN):CoordinatesoftheNthpointalongthecircumferencePixelsonthecontourareassumedtobeordered(e.g.clockwise)!Defineacomplexvectorusingcoordinates(x,y).1stStep2ndStepApplythe1DDFTContourProcessingContourProcessing●Inthisexample,acontourisprocessedusingalow-passfilter➔Otherfilters:Sharpening,Edgeextraction,...●MorphingcontoursandinterpolationarealsoeasilyachievedFourierDescriptorsinImageAnalysisFourierDescriptorsinImageAnalysis●ObjectRecognitionusingshapeinformation●Appropriatepre-processingstepsmakeFourierDescriptorsinvarianttocommontransformations➔Translation,changesinscale,rotation●Thecontourofaknownobjectcanthereforeberecognisedirrespectivelyofitsposition,sizeandorientation1.Databasewithknownobjecttypes2.Extractionofobjectcontours...3.ComputationofinvariantFourierDescriptorsFμFμ1.Imagewithunknownobjects2.Extractionofobjectcontoursandinvariantdescriptors...FμFμ3.RecognitionbycomparisonwithdatabaseApplicaApplication:Recognisingandclassifyingtion:RecognisingandclassifyingleavesleavesDatabaseTwotypesofleavesaretoberecognisedandclassifiedApplicaApplication:Recognisingandclassifyingtion:RecognisingandclassifyingleavesleavesImagewithunclassifiedobjectsApplicaApplication:Recognisingandclassifyingtion:RecognisingandclassifyingleavesleavesSegmentedObjects(Thresholding)ApplicaApplication:Recognisingandclassifyingtion:RecognisingandclassifyingleavesleavesLeavesdetectedandclassifiedTranslationTranslationttTranslatingUbyt:Derivation(Translation)Derivation(Translation)=0:0:(Summationoverperiodicsignal!)Allinformationregarding(global)translationiscontainedinelement0ofthedescriptorChangesinScaleChangesinScaleMagnificationbyfactors:Derivation(ChangesinScale)Derivation(ChangesinScale)RotationRotationRotationbyanangleθ:(Derivationidenticaltoscalechange:Multiplicationbyconstant)StartingpointStartingpointDifferentstaringpointsaffecttheorderofelementsinUandtheFobtained.Changingthestartingpointbymplaces(pixels):DerivationDerivation(StartingPointandMirroring)(StartingPointandMirroring)●Shiftingthestartingpointbymplaces(pixels)●Mirroringthecontour(left/rightortop/bottomorclockwise/anticlockwise)(*indicatescomplexconjugation)Normalisation(1)Normalisation(1)●TranslationInvariance:CentrethecontourattheoriginTranslationbyt:Scalechangebys:●ScaleInvariance:Standardisethesizeofthecontour(The0frequencycontainsallandonlytheinformationrelatedtotranslation)Consider:thenNormalisation(2)Normalisation(2)●Rotationandchangesinstartingpoint:Affectonlythephaseofthedescriptor➔SimpleSolution:Simplyremoveallphaseinformation➔Consideronlyabsolutevaluesofthedescriptorelements:Rotationbyangle:Movingthestartingpointbymplaces:But:(Informationloss,bothshapeshavethesameamplitudespectrum)Exercises●functionplotFD(F)➔F:The(non-normalised)Fourierdescriptorofacontour●PlotsthecontourUdescribedbyF●(Note:theMATLABplotcommandalsoacceptscomplexnumbers)●function[G]=shiftFD(F,x,y)➔F:The(non-normalised)Fourierdescriptorofacontour➔x:X-Translation➔y:Y-Translation➔G:The(non-normalised)Fourierdescriptoroftheshiftedcontour●TranslatesthecontourcorrespondingtoFby(X,Y)Pixels●Thisoperationdoesnotrequirean(inverse)DFT!●function[G]=scaleFD(F,scaleFactor)➔F:The(non-normalised)Fourierdescriptorofacontour➔scaleFactor:Changeincontourscale➔G:The(non-normalised)Fourierdescriptorofthescaledcontour●ScalesthecontourcorrespondingtoFby100*scaleFactor%.●Thisoperationdoesnotrequirean(inverse)DFT!●function[G]=resizeFD(F,n)➔F:TheFourierdescriptorofacontour➔G:ThearesizedFourierdescriptorwithnelements●ProcessesFtoobtainG,whichhasbeenshortenedtocontainonlynelements(assumeFhasmorethannelements).●Usefftshifttomovehigh„effective“frequenciestothebeginningandendofF●Removeelementsfrombeginningandenduntilthelengthequalsn.●funct
本文标题:Fourier-Descriptor
链接地址:https://www.777doc.com/doc-7944935 .html