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)translationiscontainedinelement0ofthedescriptorChangesinScaleChangesinScaleMagnificationbyfactors: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

1 / 27
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功