您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 公司方案 > 北邮国际学院--大四--多媒体方向---高级变换-lab2
ELEM018ELEM018ELEM018ELEM018AdvancedAdvancedAdvancedAdvancedTransformTransformTransformTransformMethodsMethodsMethodsMethodsLabLabLabLab2:2:2:2:TheTheTheTheWaveletWaveletWaveletWaveletTransformTransformTransformTransform(2(2(2(2weeks)weeks)weeks)weeks)Name:Name:Name:Name:SuiSuiSuiSuiLuyiLuyiLuyiLuyiQMQMQMQMNumber:Number:Number:Number:jp092792jp092792jp092792jp0927921.1.1.1.ObjectivesObjectivesObjectivesObjectives2.2.2.2.IntroductionIntroductionIntroductionIntroduction3.3.3.3.ExercisesExercisesExercisesExercises3.13.13.13.1DiscreteDiscreteDiscreteDiscreteWaveletWaveletWaveletWaveletTransformTransformTransformTransformFilterFilterFilterFilterBankBankBankBankQuestion:Question:Question:Question:ExplainhowthisMatlabfunctionworksandcheckthatitimplementstherecursionformulassimilar∑−=−iimnmcnihc,0,1]2[2to∑−=−ijmnmcnihd,1,1]2[2and(Arethefiltersh0h0h0h0andh1h1h1h1intheMatlabcodeexactlythesamefiltersash0andh1intheseformulas?Explainanydifference(s)youdiscover).Answer:Answer:Answer:Answer:Thefunctionisiterationfunction.Atfirstthefunctionwillcheckvalidationoftheinput.Thenthefunctionwillgeneratetwosequenceslowpass_c=conv(h0,c)andhipass_c=conv(h1,c),theyareconvolutionoftheinputsequencecwithhigh-passfilterh1andlow-passfilterh0.Thenitwillsubsamplethesequenceswithfactorof2withacoefficient2astheformulad1=sqrt(2)*hipass_c(2:2:end)andc1=sqrt(2)*lowpass_c(2:2:end).Theresultd1ishighfrequencypart,itwillbeputbackintheoutputsequence.Theresultc1islowfrequencypart,itwillbetookasinputsequenceofthenestiteration.Fortheformularh0=[1/21/2]andh1=[1/2-1/2].Inthecodeh0isthesame,h1isinversed.Sciencethefunctionneedstodotheconvolutionineachiteration,itwillgetthesameresultastheformulasdo.3.23.23.23.2InverseInverseInverseInverseDWTDWTDWTDWTFilterFilterFilterFilterBankBankBankBankQuestion:Question:Question:Question:ExplainhowthisMatlabfunctionworks,andcheckthatitimplementsarecursionformulasimilarto:⎟⎠⎞⎜⎝⎛−+−∑∑−−=iiimimnmdinhcinhc,11,10,]2[]2[2Answer:Answer:Answer:Answer:Atfirst,itshouldmakesurewhethertheinputsequenceisvalidandwhethertheiterationattheendstep.Accordingtotheformular,itwillgeneratethefilterkernelandprocessthefirsthalfinthenextiteration.Andthen,itwillup-samplethetwopartsofthesequencewithzero.Bycalculatingtheconvolutionofthefilterkernel,itcanfilterthesignal.Finally,itwilltakethetwopartstogetherwiththecoefficientof2andtakeofftheredundancy.ThealgorithemisatypeofFWT,itusebasevectorofwaveletj-2th,andthej-1thapproximationandthescalefunctiontogetjthcoefficient.Fortheformular,Canddstandfortheconnectionofthelastleveltransform(reasonofrecursion),andthen-2istandsfortheup-sampling(interpolatezerovalue).3.33.33.33.3SignalSignalSignalSignalCompressionCompressionCompressionCompressionusingusingusingusingthethethetheDWTDWTDWTDWTPlottheDWTofthissignalforafewdifferentlevels.Thecompress.mismodifiedasabove.Theuncompressed.mismodifiedasabove.maxthreshold=1.65Level0Level1Level2Level3Question:Question:Question:Question:DoestheDWThelpstocompressthesignal?Howcanyoutell?Answer:Answer:Answer:Answer:WhentheDWTstepis4,thedistortionincreasesmoothlyatfirstandthenincreasecliffywiththecompressratioincreasing.Ifthestepiszero,thecompressratioisunacceptableinthesamedistortionvalue.ThusDWTishelpfultocompress.Asthemaxthresholdincreasing,thecompressratiodecreaseinasmalldegreeandtheintervalbecomebroader.Withethesteptimeincreasing,thecalculationcomplexitywillincreasingandthecompressratiowilldecrease.Thuswesetthethresholdbetweenthecalculationandcompressioncomplexity.3.43.43.43.4ComparisonComparisonComparisonComparisonwithwithwithwithFFTFFTFFTFFTmaxthreshold=1.65Question:Question:Question:Question:CompareyourresultswiththeFFTtotheresultsyougotfortheDWT.Describeanydifferencesyouobserve.Answer:Answer:Answer:Answer:FFTtransformasignalfromtimedomaintofrequencydomain.Frequencydomaincontainsrealpartandimaginarypart.Thenumberofnon-zerovaluesinthesequencyisusedtocalculate.Comparedtotheoriginalsignal,thenon-zerovaluesmayhavealargenumber.Thecompressratioisstartat1.6.Fromtheresultwecanfind,ifthecompressionratioislargerthan0.5,DWTwillachievealow,flatdistortion,thedistortionincreaserapidly.ComparedtotheFFT,thedistortionislarger.Ifwewanttogetalowlevelofcompress,DWTisveryhelpful.FFTwillachieveagoodresultifwewantahighlevelcompress.Becauseofthetradeoffonresolution,whenresolutioninfrequencydomainislowandviceverse,DWThasahighresolutionintimedomain.Whencompressingthesignal,DWTwilldropthehighestfrequency.Comparedtothehighfrequency,thetimeresolutionistoolowtoperceive.Asthecompressratiodecrease,thefrequencywedroppeddecrease.Thelowerthefrequencyisthehigherthedistortionis.SinceFFThasthesameresolutioninbothfrequencyandtimedomains,thedistortion-ratiocurvestretcheslikeastraightline.ThuswecanknowFFTishelpfultoachieveagoodhighlevelcompression.4.4.4.4.ExercisesExercisesExercisesExercises[Week[Week[Week[Week2]2]2]2]4.14.14.14.12-D2-D2-D2-DWaveletWaveletWaveletWaveletTransformTransformTransformTransformThenewfunctioniswroteasbelow.Usingdwt2_haar(im,steps),performa2DDWTfortestimageatdifferentsteps.Question:Questi
本文标题:北邮国际学院--大四--多媒体方向---高级变换-lab2
链接地址:https://www.777doc.com/doc-7299729 .html