• 1.22 MB
  • 2022-04-22 11:31:06 发布

数字图像处理 第三版 (冈萨雷斯 著) 电子工业出版社 部分答案 课后答案

  • 115页
  • 当前文档由用户上传发布,收益归属用户
  1. 1、本文档共5页,可阅读全部内容。
  2. 2、本文档内容版权归属内容提供方,所产生的收益全部归内容提供方所有。如果您对本文有版权争议,可选择认领,认领后既往收益都归您。
  3. 3、本文档由用户上传,本站不保证质量和数量令人满意,可能有诸多瑕疵,付费之前,请仔细先通过免费阅读内容等途径辨别内容交易风险。如存在严重挂羊头卖狗肉之情形,可联系本站下载客服投诉处理。
  4. 文档侵权举报电话:19940600175。
'课后答案网您最真诚的朋友www.hackshp.cn网团队竭诚为学生服务,免费提供各门课后答案,不用积分,甚至不用注册,旨在为广大学生提供自主学习的平台!课后答案网:www.hackshp.cn视频教程网:www.efanjy.comPPT课件网:www.ppthouse.com课后答案网www.hackshp.cn khdaw.comStudentProblem课后答案网Solutionswww.hackshp.cnkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com khdaw.com课后答案网www.hackshp.cnkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com DigitalImageProcessingThirdEditionkhdaw.comStudentProblemSolutionsVersion3.0RafaelC.GonzalezRichardE.Woods课后答案网www.hackshp.cnPrenticeHallUpperSaddleRiver,NJ07458www.imageprocessingplace.comCopyright©1992-2008R.C.GonzalezandR.E.Woodskhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com Chapter1Introductionkhdaw.com1.1AboutThisManualThisabbreviatedmanualcontainsdetailedsolutionstoallproblemsmarkedwithastarinDigitalImageProcessing,3rdEdition.1.2ProjectsYoumaybeaskedbyyourinstructortopreparecomptuterprojectsinthefol-lowingformat:Page1:Coverpage.•Projecttitle课后答案网•Projectnumber•Coursenumberwww.hackshp.cn•Studentsname•Datedue•Datehandedin•Abstract(nottoexceed1/2page)Page2:Onetotwopages(max)oftechnicaldiscussion.Page3(or4):Discussionofresults.Onetotwopages(max).1khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 2CHAPTER1.INTRODUCTIONResults:Imageresults(printedtypicallyonalaserorinkjetprinter).Allimagesmustcontainanumberandtitlereferredtointhediscussionofresults.Appendix:Programlistings,focusedonanyoriginalcodepreparedbythestu-dent.Forbrevity,functionsandroutinesprovidedtothestudentarereferredtobyname,butthecodeisnotincluded.Layout:Theentirereportmustbeonastandardsheetsize(e.g.,lettersizeintheU.S.orA4inEurope),stapledwiththreeormorestaplesontheleftmargintoformabooklet,orboundusingclearplasticstandardbindingproducts.khdaw.com1.3AbouttheBookWebSiteThecompanionwebsitewww.prenhall.com/gonzalezwoods(oritsmirrorsite)www.imageprocessingplace.comisavaluableteachingaid,inthesensethatitincludesmaterialthatpreviouslywascoveredinclass.Inparticular,thereviewmaterialonprobability,matri-ces,vectors,andlinearsystems,waspreparedusingthesamenotationasinthebook,andisfocusedonareasthataredirectlyrelevanttodiscussionsinthetext.Thisallowstheinstructortoassignthematerialasindependentreading,andspendnomorethanonetotallectureperiodreviewingthosesubjects.An-课后答案网othermajorfeatureisthesetofsolutionstoproblemsmarkedwithastarinthebook.Thesesolutionsarequitedetailed,andwerepreparedwiththeideaofusingthemasteachingsupport.Theon-lineavailabilityofprojectsanddigitalwww.hackshp.cnimagesfreestheinstructorfromhavingtoprepareexperiments,data,andhand-outsforstudents.Thefactthatmostoftheimagesinthebookareavailablefordownloadingfurtherenhancesthevalueofthewebsiteasateachingresource.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com Chapter2ProblemSolutionskhdaw.comProblem2.1Thediameter,x,oftheretinalimagecorrespondingtothedotisobtainedfromsimilartriangles,asshowninFig.P2.1.Thatis,(d/2)(x/2)=0.20.017whichgivesx=0.085d.FromthediscussioninSection2.1.1,andtakingsomelibertiesofinterpretation,wecanthinkofthefoveaasasquaresensorarrayhavingontheorderof337,000elements,whichtranslatesintoanarrayofsize580×580elements.Assumingequalspacingbetweenelements,thisgives580elementsand579spacesonaline1.5mmlong.Thesizeofeachelementandeachspaceisthen课后答案网s=[(1.5mm)/1,159]=1.3×10−6m.Ifthesize(onthefovea)oftheimageddotislessthanthesizeofasingleresolutionelement,weassumethatthedotwillbeinvisibletotheeye.Inotherwords,theeyewillnotdetectadotifitsdiameter,d,issuchthat0.085www.hackshp.cn(d)<1.3×10−6m,ord<15.3×10−6m.EdgeviewofdotImageofthedotxx/2onthefovead/2d0.2m0.017mFigureP2.13khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 4CHAPTER2.PROBLEMSOLUTIONSProblem2.3Thesolutionisλ=c/v=2.998×108(m/s)/60(1/s)=4.997×106m=4997Km.khdaw.comProblem2.6Onepossiblesolutionistoequipamonochromecamerawithamechanicalde-vicethatsequentiallyplacesared,agreenandabluepassfilterinfrontofthelens.Thestrongestcameraresponsedeterminesthecolor.Ifallthreeresponsesareapproximatelyequal,theobjectiswhite.Afastersystemwouldutilizethreedifferentcameras,eachequippedwithanindividualfilter.Theanalysisthenwouldbebasedonpollingtheresponseofeachcamera.Thissystemwouldbealittlemoreexpensive,butitwouldbefasterandmorereliable.Notethatbothsolutionsassumethatthefieldofviewofthecamera(s)issuchthatitiscom-pletelyfilledbyauniformcolor[i.e.,thecamera(s)is(are)focusedonapartofthevehiclewhereonlyitscolorisseen.Otherwisefurtheranalysiswouldbere-quiredtoisolatetheregionofuniformcolor,whichisallthatisofinterestinsolvingthisproblem].课后答案网Problem2.9(a)Thetotalamountofdata(includingthestartandstopbit)inan8-bit,1024×1024image,iswww.hackshp.cn(1024)2×[8+2]bits.Thetotaltimerequiredtotransmitthisimageovera56Kbaudlinkis(1024)2×[8+2]/56000=187.25secorabout3.1min.(b)At3000Kthistimegoesdowntoabout3.5sec.Problem2.11LetpandqbeasshowninFig.P2.11.Then,(a)S1andS2arenot4-connectedbecauseqisnotinthesetN4(p);(b)S1andS2are8-connectedbecauseqisinthesetN8(p);(c)S1andS2arem-connectedbecause(i)qisinND(p),and(ii)thesetN4(p)∩N4(q)isempty.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 5FigureP2.11khdaw.comProblem2.12Thesolutionofthisproblemconsistsofdefiningallpossibleneighborhoodshapestogofromadiagonalsegmenttoacorresponding4-connectedsegmentsasFig.P2.12illustrates.Thealgorithmthensimplylooksfortheappropriatematchev-erytimeadiagonalsegmentsisencounteredintheboundary.or课后答案网orwww.hackshp.cnororFigureP2.12khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 6CHAPTER2.PROBLEMSOLUTIONSFigureP.2.15Problem2.15(a)WhenV={0,1},4-pathdoesnotexistbetweenpandqbecauseitisimpos-khdaw.comsibletogetfromptoqbytravelingalongpointsthatareboth4-adjacentandalsohavevaluesfromV.FigureP2.15(a)showsthiscondition;itisnotpossibletogettoq.Theshortest8-pathisshowninFig.P2.15(b);itslengthis4.Thelengthoftheshortestm-path(showndashed)is5.Bothoftheseshortestpathsareuniqueinthiscase.Problem2.16(a)Ashortest4-pathbetweenapointpwithcoordinates(x,y)andapointqwithcoordinates(s,t)isshowninFig.P2.16,wheretheassumptionisthatallpointsalongthepatharefromV.Thelengthofthesegmentsofthepathare|x−s|andy−t,respectively.Thetotalpathlengthis|x−s|+y−t,whichwerecognizeasthedefinitionoftheD4distance,asgiveninEq.(2.5-2).(Recallthatthisdistanceisindependentofanypathsthatmayexistbetweenthepoints.)TheD4distanceobviouslyisequaltothelengthoftheshortest4-pathwhenthelengthofthepathis课后答案网|x−s|+y−t.Thisoccurswheneverwecangetfromptoqbyfollowingapathwhoseelements(1)arefromV,and(2)arearrangedinsuchawaythatwecantraversethepathfromptoqbymakingturnsinatmosttwodirections(e.g.,rightandup).www.hackshp.cnProblem2.18WithreferencetoEq.(2.6-1),letHdenotethesumoperator,letS1andS2de-notetwodifferentsmallsubimageareasofthesamesize,andletS1+S2denotethecorrespondingpixel-by-pixelsumoftheelementsinS1andS2,asexplainedinSection2.6.1.Notethatthesizeoftheneighborhood(i.e.,numberofpixels)isnotchangedbythispixel-by-pixelsum.TheoperatorHcomputesthesumofpixelvaluesinagivenneighborhood.Then,H(aS1+bS2)means:(1)mul-tiplythepixelsineachofthesubimageareasbytheconstantsshown,(2)addkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 7FigureP2.16khdaw.comthepixel-by-pixelvaluesfromaS1andbS2(whichproducesasinglesubimagearea),and(3)computethesumofthevaluesofallthepixelsinthatsinglesubim-agearea.Letap1andbp2denotetwoarbitrary(butcorresponding)pixelsfromaS1+bS2.ThenwecanwriteH(aS1+bS2)=ap1+bp2p1∈S1andp2∈S2=ap1+bp2p1∈S1p2∈S2=ap1+bp2p1∈S1p2∈S2=aH(S1)+bH(S2)which,accordingtoEq.(2.6-1),indicatesthat课后答案网Hisalinearoperator.Problem2.20FromEq.(2.6-5),atanypointwww.hackshp.cn(x,y),KKK111g=gi=fi+ηi.KKKi=1i=1i=1ThenKK11E{g}=E{fi}+E{ηi}.KKi=1i=1Butallthefiarethesameimage,soE{fi}=f.Also,itisgiventhatthenoisehaszeromean,soE{ηi}=0.Thus,itfollowsthatE{g}=f,whichprovesthevalidityofEq.(2.6-6).khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 8CHAPTER2.PROBLEMSOLUTIONSToprovethevalidityofEq.(2.6-7)considertheprecedingequationagain:KKK111g=gi=fi+ηi.KKKi=1i=1i=1Itisknownfromrandom-variabletheorythatthevarianceofthesumofuncor-relatedrandomvariablesisthesumofthevariancesofthosevariables(Papoulis[1991]).Becauseitisgiventhattheelementsoffareconstantandtheηiareuncorrelated,then1σ2=σ2+[σ2+σ2+···+σ2].gf2η1η2ηkhdaw.comKKThefirsttermontherightsideis0becausetheelementsoffareconstants.Thevariousσ2aresimplysamplesofthenoise,whichishasvarianceσ2.Thus,ηiησ2=σ2andwehaveηiηK1σ2=σ2=σ2gK2ηKηwhichprovesthevalidityofEq.(2.6-7).Problem2.22Letg(x,y)denotethegoldenimage,andletf(x,y)denoteanyinputimageac-quiredduringroutineoperationofthesystem.Changedetectionviasubtrac-tionisbasedoncomputingthesimpledifferenced(x,y)=g(x,y)−f(x,y).Theresultingimage,d(x,y),canbeusedintwofundamentalwaysforchangede-tection.Onewayisusepixel-by-pixelanalysis.Inthiscasewesaythat课后答案网f(x,y)iscloseenoughtothegoldenimageifallthepixelsind(x,y)fallwithinaspec-ifiedthresholdband[Tmin,Tmax]whereTminisnegativeandTmaxispositive.Usually,thesamevalueofthresholdisusedforbothnegativeandpositivedif-www.hackshp.cnferences,sothatwehaveaband[−T,T]inwhichallpixelsofd(x,y)mustfallinorderforf(x,y)tobedeclaredacceptable.Thesecondmajorapproachissim-plytosumallthepixelsind(x,y)andcomparethesumagainstathresholdQ.Notethattheabsolutevalueneedstobeusedtoavoiderrorscancelingout.Thisisamuchcrudertest,sowewillconcentrateonthefirstapproach.Therearethreefundamentalfactorsthatneedtightcontrolfordifference-basedinspectiontowork:(1)properregistration,(2)controlledillumination,and(3)noiselevelsthatarelowenoughsothatdifferencevaluesarenotaffectedappreciablybyvariationsduetonoise.Thefirstconditionbasicallyaddressestherequirementthatcomparisonsbemadebetweencorrespondingpixels.Twoimagescanbeidentical,butiftheyaredisplacedwithrespecttoeachother,khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 9khdaw.comFigureP2.23comparingthedifferencesbetweenthemmakesnosense.Often,specialmark-ingsaremanufacturedintotheproductformechanicalorimage-basedalign-mentControlledillumination(notethatilluminationisnotlimitedtovisiblelight)obviouslyisimportantbecausechangesinilluminationcanaffectdramaticallythevaluesinadifferenceimage.Oneapproachusedofteninconjunctionwithilluminationcontrolisintensityscalingbasedonactualconditions.Forexam-ple,theproductscouldhaveoneormoresmallpatchesofatightlycontrolledcolor,andtheintensity(andperhapsevencolor)ofeachpixelsintheentireim-agewouldbemodifiedbasedontheactualversusexpectedintensityand/orcolorofthepatchesintheimagebeingprocessed.Finally,thenoisecontentofadifferenceimageneedstobelowenoughsothatitdoesnotmateriallyaffectcompar课后答案网isonsbetweenthegoldenandinputim-ages.Goodsignalstrengthgoesalongwaytowardreducingtheeffectsofnoise.Another(sometimescomplementary)approachistoimplementimageprocess-ingtechniques(e.g.,imageaveraging)toreducenoise.www.hackshp.cnObviouslythereareanumberifvariationsofthebasicthemejustdescribed.Forexample,additionalintelligenceintheformofteststhataremoresophisti-catedthanpixel-by-pixelthresholdcomparisonscanbeimplemented.Atech-niqueusedofteninthisregardistosubdividethegoldenimageintodifferentregionsandperformdifferent(usuallymorethanone)testsineachofthere-gions,basedonexpectedregioncontent.Problem2.23(a)TheanswerisshowninFig.P2.23.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 10CHAPTER2.PROBLEMSOLUTIONSProblem2.26FromEq.(2.6-27)andthedefinitionofseparablekernels,M−1N−1T(u,v)=f(x,y)r(x,y,u,v)x=0y=0M−1N−1=r1(x,u)f(x,y)r2(y,v)x=0y=0M−1=T(x,v)r1(x,u)x=0khdaw.comwhereN−1T(x,v)=f(x,y)r2(y,v).y=0Forafixedvalueofx,thisequationisrecognizedasthe1-Dtransformalongonerowoff(x,y).Bylettingxvaryfrom0toM−1wecomputetheentirearrayT(x,v).Then,bysubstitutingthisarrayintothelastlineofthepreviousequa-tionwehavethe1-DtransformalongthecolumnsofT(x,v).Inotherwords,whenakernelisseparable,wecancomputethe1-Dtransformalongtherowsoftheimage.Thenwecomputethe1-Dtransformalongthecolumnsofthisin-termediateresulttoobtainthefinal2-Dtransform,T(u,v).Weobtainthesameresultbycomputingthe1-Dtransformalongthecolumnsoff(x,y)followedbythe1-Dtransformalongtherowsoftheintermediateresult.ThisresultplaysanimportantroleinChapter4whenwediscussthe2-DFouriertransform.FromEq.(2.6-33),the2-DFouriertransformisgivenby课后答案网M−1N−1T(u,v)=f(x,y)e−j2π(ux/M+vy/N).www.hackshp.cnx=0y=0ItiseasilyverifiedthattheFouriertransformkernelisseparable(Problem2.25),sowecanwritethisequationasM−1N−1T(u,v)=f(x,y)e−j2π(ux/M+vy/N)x=0y=0M−1N−1=e−j2π(ux/M)f(x,y)e−j2π(vy/N)x=0y=0M−1=T(x,v)e−j2π(ux/M)x=0khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 11whereN−1T(x,v)=f(x,y)e−j2π(vy/N)y=0isthe1-DFouriertransformalongtherowsoff(x,y),asweletx=0,1,...,M−1.khdaw.com课后答案网www.hackshp.cnkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com Chapter3ProblemSolutionskhdaw.comProblem3.1Letfdenotetheoriginalimage.Firstsubtracttheminimumvalueoffdenotedfminfromftoyieldafunctionwhoseminimumvalueis0:g1=f−fminNextdivideg1byitsmaximumvaluetoyieldafunctionintherange[0,1]andmultiplytheresultbyL−1toyieldafunctionwithvaluesintherange[0,L−1]L−1g=g1maxg1L−1=f−fmin课后答案网maxf−fminKeepinmindthatfminisascalarandfisanimage.www.hackshp.cnProblem3.31(a)s=T(r)=E.1+(m/r)Problem3.5(a)Thenumberofpixelshavingdifferentintensitylevelvalueswoulddecrease,thuscausingthenumberofcomponentsinthehistogramtodecrease.Becausethenumberofpixelswouldnotchange,thiswouldcausetheheightofsomeoftheremaininghistogrampeakstoincreaseingeneral.Typically,lessvariabilityinintensitylevelvalueswillreducecontrast.13khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 14CHAPTER3.PROBLEMSOLUTIONS2(L1)L10L/4L/23/4LL1khdaw.comL1(L1)/20L/4L/23/4LL1FigureP3.9.Problem3.6Allthathistogramequalizationdoesisremaphistogramcomponentsonthein-课后答案网tensityscale.Toobtainauniform(flat)histogramwouldrequireingeneralthatpixelintensitiesactuallyberedistributedsothatthereareLgroupsofn/Lpixelswiththesameintensity,wherewww.hackshp.cnListhenumberofalloweddiscreteintensitylev-elsandn=MNisthetotalnumberofpixelsintheinputimage.Thehistogramequalizationmethodhasnoprovisionsforthistypeof(artificial)intensityredis-tributionprocess.Problem3.9Weareinterestedinjustoneexampleinordertosatisfythestatementoftheproblem.ConsidertheprobabilitydensityfunctioninFig.P3.9(a).AplotofthetransformationT(r)inEq.(3.3-4)usingthisparticulardensityfunctionisshowninFig.P3.9(b).Becausepr(r)isaprobabilitydensityfunctionweknowfromthediscussioninSection3.3.1thatthetransformationT(r)satisfiescon-khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 15ditions(a)and(b)statedinthatsection.However,weseefromFig.P3.9(b)thattheinversetransformationfromsbacktorisnotsinglevalued,asthereareaninfinitenumberofpossiblemappingsfroms=(L−1)/2backtor.Itisimpor-tanttonotethatthereasontheinversetransformationfunctionturnedoutnottobesinglevaluedisthegapinpr(r)intheinterval[L/4,3L/4].Problem3.10(b)Ifnoneoftheintensitylevelsrk,k=1,2,...,L−1,are0,thenT(rk)willbestrictlymonotonic.Thisimpliesaone-to-onemappingbothways,meaningthatkhdaw.combothforwardandinversetransformationswillbesingle-valued.Problem3.12Thevalueofthehistogramcomponentcorrespondingtothekthintensitylevelinaneighborhoodisnkpr(rk)=nfork=1,2,...,K−1,wherenkisthenumberofpixelshavingintensitylevelrk,nisthetotalnumberofpixelsintheneighborhood,andKisthetotalnumberofpossibleintensitylevels.Supposethattheneighborhoodismovedonepixeltotheright(weareassumingrectangularneighborhoods).Thisdeletestheleft-mostcolumnandintroducesanewcolumnontheright.Theupdatedhistogramthenbecomes1p(r)=[n−n+n]rkkLkRk课后答案网nfork=0,1,...,K−1,wherenLkisthenumberofoccurrencesoflevelrkontheleftcolumnandnRkisthesimilarquantityontherightcolumn.Theprecedingequationcanbewrittenalsoaswww.hackshp.cn1p(r)=p(r)+[n−n]rkrkRkLknfork=0,1,...,K−1.Thesameconceptappliestoothermodesofneighborhoodmotion:1p(r)=p(r)+[b−a]rkrkkknfork=0,1,...,K−1,whereakisthenumberofpixelswithvaluerkintheneigh-borhoodareadeletedbythemove,andbkisthecorrespondingnumberintro-ducedbythemove.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 16CHAPTER3.PROBLEMSOLUTIONSProblem3.13Thepurposeofthissimpleproblemistomakethestudentthinkofthemeaningofhistogramsandarriveattheconclusionthathistogramscarrynoinformationaboutspatialpropertiesofimages.Thus,theonlytimethatthehistogramoftheimagesformedbytheoperationsshownintheproblemstatementcanbede-terminedintermsoftheoriginalhistogramsiswhenone(both)oftheimagesis(are)constant.In(d)wehavetheadditionalrequirementthatnoneofthepixelsofg(x,y)canbe0.Assumeforconveniencethatthehistogramsarenotnormalized,sothat,forexample,hf(rk)isthenumberofpixelsinf(x,y)havingintensitylevelrk.Assumealsothatallthepixelsing(x,y)haveconstantvaluec.Thepixelsofbothimagesareassumedtobepositive.Finally,letukdenotethekhdaw.comintensitylevelsofthepixelsoftheimagesformedbyanyofthearithmeticoper-ationsgivenintheproblemstatement.Undertheprecedingsetofconditions,thehistogramsaredeterminedasfollows:(a)Weobtainthehistogramhsum(uk)ofthesumbylettinguk=rk+c,andalsohsum(uk)=hf(rk)forallk.Inotherwords,thevalues(height)ofthecompo-nentsofhsumarethesameasthecomponentsofhf,buttheirlocationsontheintensityaxisareshiftedrightbyanamountc.Problem3.15(a)Considera3×3maskfirst.Becauseallthecoefficientsare1(weareignoringthe1/9scalefactor),theneteffectofthelowpassfilteroperationistoaddalltheintensityvaluesofpixelsunderthemask.Initially,ittakes8additionstoproducetheresponseofthemask.However,whenthemaskmovesonepixellocationtotheright,itpicksuponlyonenewcolumn.Thenewresponsecanbecomputed课后答案网aswww.hackshp.cnRnew=Rold−C1+C3whereC1isthesumofpixelsunderthefirstcolumnofthemaskbeforeitwasmoved,andC3isthesimilarsuminthecolumnitpickedupafteritmoved.Thisisthebasicbox-filterormoving-averageequation.Fora3×3maskittakes2additionstogetC3(C1wasalreadycomputed).TothisweaddonesubtractionandoneadditiontogetRnew.Thus,atotalof4arithmeticoperationsareneededtoupdatetheresponseafteronemove.Thisisarecursiveprocedureformovingfromlefttorightalongonerowoftheimage.Whenwegettotheendofarow,wemovedownonepixel(thenatureofthecomputationisthesame)andcontinuethescanintheoppositedirection.Foramaskofsizen×n,(n−1)additionsareneededtoobtainC3,plusthesinglesubtractionandadditionneededtoobtainRnew,whichgivesatotalofkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 17(n+1)arithmeticoperationsaftereachmove.Abrute-forceimplementationwouldrequiren2−1additionsaftereachmove.Problem3.16(a)Thekeytosolvingthisproblemistorecognize(1)thattheconvolutionre-sultatanylocation(x,y)consistsofcenteringthemaskatthatpointandthenformingthesumoftheproductsofthemaskcoefficientswiththecorrespondingpixelsintheimage;and(2)thatconvolutionofthemaskwiththeentireimageresultsineverypixelintheimagebeingvisitedonlyoncebyeveryelementofthemask(i.e.,everypixelismultipliedoncebyeverycoefficientofthemask).khdaw.comBecausethecoefficientsofthemasksumtozero,thismeansthatthesumoftheproductsofthecoefficientswiththesamepixelalsosumtozero.Carryingoutthisargumentforeverypixelintheimageleadstotheconclusionthatthesumoftheelementsoftheconvolutionarrayalsosumtozero.Problem3.18(a)Therearen2pointsinann×nmedianfiltermask.Becausenisodd,themedianvalue,ζ,issuchthatthereare(n2−1)/2pointswithvalueslessthanorequaltoζandthesamenumberwithvaluesgreaterthanorequaltoζ.How-ever,becausetheareaA(numberofpoints)intheclusterislessthanonehalfn2,andAandnareintegers,itfollowsthatAisalwayslessthanorequalto(n2−1)/2.Thus,evenintheextremecasewhenallclusterpointsareencom-passedbythefiltermask,therearenotenoughpointsintheclusterforanyofthemtobeequaltothevalueofthemedian(remember,weareassumingthatallclusterpointsarelighterordarkerthanthebackgroundpoints).Therefore,if课后答案网thecenterpointinthemaskisaclusterpoint,itwillbesettothemedianvalue,whichisabackgroundshade,andthusitwillbeeliminatedfromthecluster.Thisconclusionobviouslyappliestothelessextremecasewhenthenumberofwww.hackshp.cnclusterpointsencompassedbythemaskislessthanthemaximumsizeofthecluster.Problem3.19(a)Numericallysortthen2values.Themedianisζ=[(n2+1)/2]-thlargestvalue.(b)Oncethevalueshavebeensortedonetime,wesimplydeletethevaluesinthetrailingedgeoftheneighborhoodandinsertthevaluesintheleadingedgekhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 18CHAPTER3.PROBLEMSOLUTIONSFigureP3.21khdaw.comintheappropriatelocationsinthesortedarray.Problem3.21FromFig.3.33weknowthattheverticalbarsare5pixelswide,100pixelshigh,andtheirseparationis20pixels.Thephenomenoninquestionisrelatedtothehorizontalseparationbetweenbars,sowecansimplifytheproblembyconsid-eringasinglescanlinethroughthebarsintheimage.Thekeytoansweringthisquestionliesinthefactthatthedistance(inpixels)betweentheonsetofonebarandtheonsetofthenextone(say,toitsright)is25pixels.ConsiderthescanlineshowninFig.P3.21.Alsoshownisacrosssectionofa25×25mask.Theresponseofthemaskistheaverageofthepixelsthatitencompasses.Wenotethatwhenthemaskmovesonepixeltotheright,itlosesonevalueoftheverticalbarontheleft,butitpicksupanidenticaloneontheright,sotheresponsedoesntchange.Infact,thenumberofpixelsbelongingtotheverticalbarsandcontainedwithinthemaskdoesnotchange,regardlessofwherethemaskislocated(aslongasitiscontainedwithinthebars,andnot课后答案网neartheedgesofthesetofbars).Thefactthatthenumberofbarpixelsunderthemaskdoesnotchangeisduetothepeculiarseparationbetweenbarswww.hackshp.cnandthewidthofthelinesinrelationtothe25-pixelwidthofthemaskThisconstantresponseisthereasonwhynowhitegapsareseenintheimageshownintheproblemstatement.Notethatthisconstantresponsedoesnothappenwiththe23×23orthe45×45masksbecausetheyarenotsynchronizedwiththewidthofthebarsandtheirseparation.Problem3.24TheLaplacianoperatorisdefinedas∂2f∂2f∇2f=+∂x2∂y2khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 19fortheunrotatedcoordinates,andas∂2f∂2f∇2f=+.∂x2∂y2forrotatedcoordinates.Itisgiventhatx=xcosθ−ysinθandy=xsinθ+ycosθwhereθistheangleofrotation.Wewanttoshowthattherightsidesofthefirsttwoequationsareequal.Westartwith∂f∂f∂x∂f∂ykhdaw.com∂x=∂x∂x+∂y∂x∂f∂f=cosθ+sinθ.∂x∂yTakingthepartialderivativeofthisexpressionagainwithrespecttoxyields∂2f∂2f∂∂f∂∂f∂2f=cos2θ+sinθcosθ+cosθsinθ+sin2θ.∂x2∂x2∂x∂y∂y∂x∂y2Next,wecompute∂f∂f∂x∂f∂y=+∂y∂x∂y∂y∂y课后答案网∂f∂f=−sinθ+cosθ.∂x∂yTakingthederivativeofthisexpressionagainwithrespecttowww.hackshp.cnygives∂2f∂2f∂∂f∂∂f∂2f=sin2θ−cosθsinθ−sinθcosθ+cos2θ.∂y2∂x2∂x∂y∂y∂x∂y2Addingthetwoexpressionsforthesecondderivativesyields∂2f∂2f∂2f∂2f+=+∂x2∂y2∂x2∂y2whichprovesthattheLaplacianoperatorisindependentofrotation.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 20CHAPTER3.PROBLEMSOLUTIONSProblem3.25TheLaplacianmaskwitha−4inthecenterperformsanoperationproportionaltodifferentiationinthehorizontalandverticaldirections.Considerforamo-menta3×3Laplacianmaskwitha−2inthecenterand1saboveandbelowthecenter.Allotherelementsare0.Thismaskwillperformdifferentiationinonlyonedirection,andwillignoreintensitytransitionsintheorthogonaldirec-tion.Animageprocessedwithsuchamaskwillexhibitsharpeninginonlyonedirection.ALaplacianmaskwitha-4inthecenterand1sintheverticalandhorizontaldirectionswillobviouslyproduceanimagewithsharpeninginbothdirectionsandingeneralwillappearsharperthanwiththepreviousmask.Sim-ilarly,andmaskwitha−8inthecenterand1sinthehorizontal,vertical,andkhdaw.comdiagonaldirectionswilldetectthesameintensitychangesasthemaskwiththe−4inthecenterbut,inaddition,itwillalsobeabletodetectchangesalongthediagonals,thusgenerallyproducingsharper-lookingresults.Problem3.28Considerthefollowingequation:f(x,y)−∇2f(x,y)=f(x,y)−f(x+1,y)+f(x−1,y)+f(x,y+1)+f(x,y−1)−4f(x,y)=6f(x,y)−f(x+1,y)+f(x−1,y)+f(x,y+1)+f(x,y−1)+f(x,y)=51.2f(x,y)−1课后答案网f(x+1,y)+f(x−1,y)+f(x,y+1)5+f(x,y−1)+f(x,y)www.hackshp.cn=51.2f(x,y)−f(x,y)wheref(x,y)denotestheaverageoff(x,y)inapredefinedneighborhoodcen-teredat(x,y)andincludingthecenterpixelanditsfourimmediateneighbors.Treatingtheconstantsinthelastlineoftheaboveequationasproportionalityfactors,wemaywritef(x,y)−∇2f(x,y)f(x,y)−f(x,y).Therightsideofthisequationisrecognizedwithinthejust-mentionedpropor-tionalityfactorstobeofthesameformasthedefinitionofunsharpmaskinggiveninEqs.(3.6-8)and(3.6-9).Thus,ithasbeendemonstratedthatsubtract-ingtheLaplacianfromanimageisproportionaltounsharpmasking.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 21Problem3.33Thethicknessoftheboundariesincreasesasathesizeofthefilteringneigh-borhoodincreases.Wesupportthisconclusionwithanexample.Consideraone-pixel-thickstraightblacklinerunningverticallythroughawhiteimage.Ifa3×3neighborhoodisused,anyneighborhoodswhosecentersaremorethantwopixelsawayfromthelinewillproducedifferenceswithvaluesofzeroandthecenterpixelwillbedesignatedaregionpixel.Leavingthecenterpixelatsamelocation,ifweincreasethesizeoftheneighborhoodto,say,5×5,thelinewillbeencompassedandnotalldifferencesbezero,sothecenterpixelwillnowbedesignatedaboundarypoint,thusincreasingthethicknessoftheboundary.Asthesizeoftheneighborhoodincreases,wewouldhavetobefurtherandfurtherkhdaw.comfromthelinebeforethecenterpointceasestobecalledaboundarypoint.Thatis,thethicknessoftheboundarydetectedincreasesasthesizeoftheneighbor-hoodincreases.Problem3.34(a)Iftheintensityofthecenterpixelofa3×3regionislargerthantheintensityofallitsneighbors,thendecreaseit.Iftheintensityissmallerthantheintensityofallitsneighbors,thenincreaseit.Else,donotnothing.(b)RulesIFd2isPOANDd4isPOANDd6isPOANDd8isPOTHENvisPOIFd2isNEANDd4isNEANDd6isNEANDd8isNETHENvisNEELSEvisZR.课后答案网Note:Inrule1,allpositivedifferencesmeanthattheintensityofthenoisepulse(z5)islessthanthatofallits4-neighbors.Thenwellwanttomaketheoutputzmorepositivesothatwhenitisaddedtozitwillbringthevalueofthecen-5www.hackshp.cn5terpixelclosertothevaluesofitsneighbors.Theconverseistruewhenallthedifferencesarenegative.Amixtureofpositiveandnegativedifferencescallsfornoactionbecausethecenterpixelisnotaclearspike.Inthiscasethecorrectionshouldbezero(keepinmindthatzeroisafuzzysettoo).khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com Chapter4ProblemSolutionskhdaw.comProblem4.2(a)Toproveinfiniteperiodicityinbothdirectionswithperiod1/ΔT,wehavetoshowthatFμ+k[1/ΔT]=F(μ)fork=0,±1,±2,....FromEq.(4.3-5),∞1knFμ+k[1/ΔT]=Fμ+−TTTn=−∞∞1k−n课后答案网=Fμ+TTn=−∞∞1m=Fμ−www.hackshp.cnTm=−∞T=Fμwherethethirdlinefollowsfromthefactthatkandnareintegersandthelimitsofsummationaresymmetricabouttheorigin.ThelaststepfollowsfromEq.(4.3-5).(b)Again,weneedtoshowthatFμ+k/ΔT=F(μ)fork=0,±1,±2,....FromEq.(4.4-2),23khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 24CHAPTER4.PROBLEMSOLUTIONS∞Fμ+k/ΔT=fe−j2π(μ+k/ΔT)nΔTnn=−∞∞=fe−j2πμnΔTe−j2πknnn=−∞∞=fe−j2πμnΔTnn=−∞=Fμwherethethirdlinefollowsfromthefactthate−j2πkn=1becausebothkandnkhdaw.comareintegers(seeEulersformula),andthelastlinefollowsfromEq.(4.4-2).Problem4.3Fromthedefinitionofthe1-DFouriertransforminEq.(4.2-16),∞Fμ=f(t)e−j2πμtdt−∞∞=sin(2πnt)e−j2πμtdt−∞∞−j=ej2πnt−e−j2πnte−j2πμtdt2−∞∞∞−j−j=ej2πnte−j2πμtdt−e−j2πnte−j2πμtdt.课后答案网22−∞−∞FromthetranslationpropertyinTable4.3weknowthatf(t)ej2πμ0t⇔Fμ−μwww.hackshp.cn0andweknowfromthestatementoftheproblemthattheFouriertransformofaconstantf(t)=1isanimpulse.Thus,(1)ej2πμ0t⇔δμ−μ.0Thus,weseethattheleftmostintegralinthethelastlineaboveistheFouriertransformof(1)ej2πnt,whichisδμ−n,andsimilarly,thesecondintegralisthetransformof(1)e−j2πnt,orδμ+n.CombiningallresultsyieldsjFμ=δμ+n−δμ−n2asdesired.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 25F()-nn(a)F()khdaw.com....11n+nnTT1n1TT....(b)FigureP4.4Problem4.4(a)Theperiodissuchthat2课后答案网πnt=2π,ort=1/n.(b)Thefrequencyis1dividedbytheperiod,orn.ThecontinuousFouriertrans-formofthegivensinewavelooksasinFig.P4.4(a)(seeProblem4.3),andthewww.hackshp.cntransformofthesampleddata(showingafewperiods)hasthegeneralformil-lustratedinFig.P4.4(b)(thedashedboxisanidealfilterthatwouldallowrecon-structionifthesinefunctionweresampled,withthesamplingtheorembeingsatisfied).(c)TheNyquistsamplingrateisexactlytwicethehighestfrequency,or2n.Thatis,(1/ΔT)=2n,orΔT=1/2n.Takingsamplesatt=±ΔT,±2ΔT,...wouldyieldthesampledfunctionsin(2πnΔT)whosevaluesareall0sbecauseΔT=1/2nandnisaninteger.IntermsofFig.P4.4(b),weseethatwhenΔT=1/2nallthepositiveandnegativeimpulseswouldcoincide,thuscancelingeachotherandgivingaresultof0forthesampleddata.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 26CHAPTER4.PROBLEMSOLUTIONSProblem4.5StartingfromEq.(4.2-20),∞f(t)Hg(t)=f(τ)g(t−τ)dτ.−∞TheFouriertransformofthisexpressionis⎡⎤∞∞ℑf(t)Hg(t)=⎣f(τ)g(t−τ)dτ⎦e−j2πμtdt−∞−∞⎡⎤∞∞=f(τ)⎣g(t−τ)e−j2πμtdt⎦dτ.khdaw.com−∞−∞TheterminsidetheinnerbracketsistheFouriertransformofg(t−τ).But,weknowfromthetranslationproperty(Table4.3)thatℑg(t−τ)=G(μ)e−j2πμτso∞ℑf(t)Hg(t)=f(τ)G(μ)e−j2πμτdτ−∞∞=G(μ)f(τ)e−j2πμτdτ−∞=G(μ)F(μ).Thisprovesthatmultiplicationinthefrequencydomainisequaltoconvolution课后答案网inthespatialdomain.Theproofthatmultiplicationinthespatialdomainisequaltoconvolutioninthespatialdomainisdoneinasimilarway.www.hackshp.cnProblem4.8(b)Wesolvethisproblemasabove,bydirectsubstitutionandusingorthogonal-ity.SubstitutingEq.(4.4-7)into(4.4-6)yields⎡⎤M−1M−11F(u)=⎣F(u)e−j2πrx/M⎦e−j2πux/MMx=0r=0⎡⎤M−1M−11=F(r)⎣e−j2πrx/Me−j2πux/M⎦Mr=0x=0=F(u)khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 27wherethelaststepfollowsfromtheorthogonalityconditiongivenintheprob-lemstatement.SubstitutingEq.(4.4-6)into(4.6-7)andusingthesamebasicprocedureyieldsasimilaridentityforf(x).Problem4.10WithreferencetothestatementoftheconvolutiontheoremgiveninEqs.(4.2-21)and(4.2-22),weneedtoshowthatf(x)Hh(x)⇔F(u)H(u)andthatkhdaw.comf(x)h(x)⇔F(u)HH(u).FromEq.(4.4-10)andthedefinitionoftheDFTinEq.(4.4-6),⎡⎤M−1M−1ℑf(x)Hh(x)=⎣f(m)h(x−m)⎦e−j2πux/Mx=0m=0⎡⎤M−1M−1=f(m)⎣h(x−m)e−j2πux/M⎦m=0x=0M−1=f(m)H(u)e−j2πum/Mm=0M−1=H(u)f(m)e−j2πum/Mm=0课后答案网=H(u)F(u).Theotherhalfofthediscreteconvolutiontheoremisprovedinasimilarmanner.Problem4.11www.hackshp.cnWithreferencetoEq.(4.2-20),∞∞f(t,z)Hh(t,z)=f(α,β)h(t−α,z−β)dαdβ.−∞−∞Problem4.14FromEq.(4.5-7),∞∞Recallthatinthischapterwe−j2π(μt+νz)use(t,z)and(μ,ν)forF(μ,ν)=ℑf(t,z)=f(t,z)edtdz.continuousvariables,and−∞−∞(x,y)and(u,v)fordiscretevariables.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 28CHAPTER4.PROBLEMSOLUTIONSFromEq.(2.6-2),theFouriertransformoperationislinearifℑa1f1(t,z)+a2f2(t,z)=a1ℑf1(t,z)+a2ℑf2(t,z).SubstitutingintothedefinitionoftheFouriertransformyields∞∞ℑa1f1(t,z)+a2f2(t,z)=a1f1(t,z)+a2f2(t,z)−∞−∞×e−j2π(μt+νz)dtdz∞∞=af(t,z)e−j2π(μt+νz)dtdz1−∞−∞∞∞khdaw.com+af(t,z)e−j2π(μt+νz)dtdz22−∞−∞=a1ℑf1(t,z)+a2ℑf2(t,z).wherethesecondstepfollowsfromthedistributivepropertyoftheintegral.Similarly,forthediscretecase,M−1N−1ℑaf(x,y)+af(x,y)=af(x,y)+af(x,y)e−j2π(ux/M+vy/N)11221122x=0y=0M−1N−1=af(x,y)e−j2π(ux/M+vy/N)11x=0y=0M−1N−1+af(x,y)e−j2π(ux/M+vy/N)22x=0y=0课后答案网=a1ℑf1(x,y)+a2ℑf2(x,y).Thelinearityoftheinversetransformsisprovedinexactlythesameway.www.hackshp.cnProblem4.16(a)FromEq.(4.5-15),M−1N−1ℑf(x,y)ej2π(u0x+v0y)=f(x,y)ej2π(u0x+v0y)e−j2π(ux/M+vy/N)x=0y=0M−1N−1=f(x,y)e−j2π[(u−u0)x/M+(v−v0)y/N]x=0y=0=F(u−u0,v−v0).khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 29Problem4.20ThefollowingareproofsofsomeofthepropertiesinTable4.1.ProofsoftheotherpropertiesaregiveninChapter4.Recallthatwhenwerefertoafunctionasimaginary,itsrealpartiszero.Weusethetermcomplextodenoteafunctionwhoserealandimaginarypartsarenotzero.WeproveonlytheforwardparttheFouriertransformpairs.Similartechniquesareusedtoprovetheinversepart.(a)Property2:Iff(x,y)isimaginary,f(x,y)⇔F∗(−u,−v)=−F(u,v).Proof:Becausef(x,y)isimaginary,wecanexpressitasjg(x,y),whereg(x,y)isarealfunction.Thentheproofisasfollows:khdaw.com⎡⎤∗M−1N−1∗⎢j2π(ux/M+vy/N)⎥F(−u−v)=⎣jg(x,y)e⎦x=0y=0M−1N−1=−jg(x,y)e−j2π(ux/M+vy/N)x=0y=0M−1N−1=−jg(x,y)e−j2π(ux/M+vy/N)x=0y=0M−1N−1=−f(x,y)e−j2π(ux/M+vy/N)x=0y=0=−F(u,v).(b)Property4:课后答案网Iff(x,y)isimaginary,thenR(u,v)isoddandI(u,v)iseven.Proof:Fiscomplex,soitcanbeexpressedaswww.hackshp.cnF(u,v)=real[F(u,v)]+jimag[F(u,v)]=R(u,v)+jI(u,v).Then,−F(u,v)=−R(u,v)−jI(u,v)andF∗(−u,−v)=R(−u,−v)−jI(−u,−v).But,becausef(x,y)isimaginary,F∗(−u,−v)=−F(u,v)(seeProperty2).ItthenfollowsfromtheprevioustwoequationsthatR(u,v)=−R(−u,−v)(i.e.,Risodd)andI(u,v)=I(−u,−v)(Iiseven).(d)Property7:Whenf(x,y)iscomplex,f∗(x,y)⇔F∗(−u,−v).Proof:khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 30CHAPTER4.PROBLEMSOLUTIONSM−1N−1ℑf∗(x,y)=f∗(x,y)e−j2π(ux/M+vy/N)x=0y=0⎡⎤∗M−1N−1⎢j2π(ux/M+vy/N)⎥=⎣f(x,y)e⎦x=0y=0=F∗(−u,−v).(g)Property11:Iff(x,y)isimaginaryandodd,thenF(u,v)isrealandodd,andconversely.Proof:Iff(x,y)isimaginary,weknowthattherealpartofF(u,v)isoddanditsimaginarypartiseven.Ifwecanshowthattheimaginarypartiskhdaw.comzero,thenwewillhavetheproofforthisproperty.Asabove,M−1N−1F(u,v)=[jodd](even)(even)−2j(even)(odd)−(odd)(odd)x=0y=0M−1N−1=[jodd][even−jodd][even−jodd]x=0y=0M−1N−1M−1N−1=j[(odd)(even)]+2[(even)(even)]x=0y=0x=0y=0M−1N−1−j[(odd)(even)]x=0y=0=realwherethelaststepfollowsfromEq.(4.6-13).课后答案网Problem4.21Recallthatthereasonforpaddingistoestablishabufferbetweentheperiodswww.hackshp.cnthatareimplicitintheDFT.Imaginetheimageontheleftbeingduplicatedin-finitelymanytimestocoverthexy-plane.Theresultwouldbeacheckerboard,witheachsquarebeinginthecheckerboardbeingtheimage(andtheblackex-tensions).Nowimaginedoingthesamethingtotheimageontheright.Theresultswouldbeidentical.Thus,eitherformofpaddingaccomplishesthesameseparationbetweenimages,asdesired.Problem4.22Unlessallbordersonofanimageareblack,paddingtheimagewith0sintro-ducessignificantdiscontinuities(edges)atoneormorebordersoftheimage.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 31Thesecanbestronghorizontalandverticaledges.Thesesharptransitionsinthespatialdomainintroducehigh-frequencycomponentsalongtheverticalandhorizontalaxesofthespectrum.Problem4.23(a)Theaveragesofthetwoimagesarecomputedasfollows:M−1N−11f¯(x,y)=f(x,y)MNx=0y=0khdaw.comandP−1Q−11f¯p(x,y)=fp(x,y)PQx=0y=0M−1N−11=f(x,y)PQx=0y=0MN=f¯(x,y)PQwherethesecondstepisresultofthefactthattheimageispaddedwith0s.Thus,theratiooftheaveragevaluesisPQr=MNThus,weseethattheratioincreasesasafunctionof课后答案网PQ,indicatingthattheaveragevalueofthepaddedimagedecreasesasafunctionofPQ.Thisisasexpected;paddinganimagewithzerosdecreasesitsaveragevalue.www.hackshp.cnProblem4.25(a)FromEq.(4.4-10)andthedefinitionofthe1-DDFT,M−1ℑf(x)Hh(x)=f(x)Hh(x)e−j2πux/Mx=0M−1M−1=f(m)h(x−m)e−j2πux/Mx=0m=0M−1M−1=f(m)h(x−m)e−j2πux/Mm=0x=0khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 32CHAPTER4.PROBLEMSOLUTIONSbutM−1h(x−m)e−j2πux/M=ℑ[h(x−m)]=H(u)e−j2πmu/Mx=0wherethelaststepfollowsfromEq.(4.6-4).SubstitutingthisresultintothepreviousequationyieldsM−1ℑf(x)Hh(x)=f(m)e−j2πmu/MH(u)m=0=F(u)H(u).Theotherpartoftheconvolutiontheoremisdoneinasimilarmanner.khdaw.com(c)Correlationisdoneinthesameway,butbecauseofthedifferenceinsignintheargumentofhtheresultwillbeaconjugate:M−1N−1ℑf(x,y)Ih(x,y)=f(x,y)Ih(x,y)e−j2π(ux/M+vy/N)x=0y=0⎡⎤M−1N−1M−1N−1=⎣f(m,n)h(x+m,y+n)⎦x=0y=0m=0n=0×e−j2π(ux/M+vy/N)M−1N−1M−1N−1=f(m,n)h(x+m,y+n)m=0n=0x=0y=0×e−j2π(ux/M+vy/N)M−1N−1课后答案网=f(m,n)ej2π(um/M+vn/N)H(u,v)m=0n=0=F∗(u,v)H(u,v).(d)Webeginwithonevariable:www.hackshp.cn∞df(z)df(z)ℑ=e−j2πνzdzdzdz−∞Integrationbypartshasthefollowinggeneralform,sdw=sw−wds.Lets=e−j2πνzandw=f(z).Then,dw/dz=df(z)/dzordf(z)dw=dzandds=(−j2πν)e−j2πνzdzdzkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 33soitfollowsthat∞df(z)df(z)ℑ=e−j2πνzdzdzdz−∞∞∞=f(z)e−j2πνz−f(z)(−j2πν)e−j2πνzdz∞−∞∞=(j2πν)f(z)e−j2πνzdz−∞=(j2πν)F(ν)becausef(±∞)=0byassumption(seeTable4.3).Considernextthesecondkhdaw.comderivative.Defineg(z)=df(z)/dz.Thendg(z)ℑ=(j2πν)G(ν)dzwhereG(ν)istheFouriertransformofg(z).Butg(z)=df(z)/dz,soG(ν)=(j2πν)F(ν),andd2f(z)ℑ=(j2πν)2F(ν).dz2Continuinginthismannerwouldresultintheexpressiondnf(z)ℑ=(j2πν)nF(ν).dznIfwenowgoto2-Dandtakethederivativeofonlyonevariable,wewouldgetthesameresultasintheprecedingexpression,butwehavetousepartialderivatives课后答案网toindicatethevariabletowhichdifferentiationappliesand,insteadofF(μ),wewouldhaveF(μ,ν).Thus,∂nf(t,z)www.hackshp.cnℑ=(j2πν)nF(μ,ν).∂znDefineg(t,z)=∂nf(t,z)/∂tn,then∂mg(t,z)ℑ=(j2πμ)mG(μ,ν).∂tmButG(μ,ν)isthetransformofg(t,z)=∂nf(t,z)/∂tn,whichweknowisequalto(j2πμ)nF(μ,ν).Therefore,wehaveestablishedthatmn∂∂ℑf(t,z)=(j2πμ)m(j2πν)nF(μ,ν).∂t∂zkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 34CHAPTER4.PROBLEMSOLUTIONSBecausetheFouriertransformisunique,weknowthattheinversetransformoftherightofthisequationwouldgivetheleft,sotheequationconstitutesaFouriertransformpair(keepinmindthatwearedealingwithcontinuousvari-ables).Problem4.26(b)Astheprecedingderivationshows,theLaplacianfilterappliestocontinuousvariables.WecangenerateafilterforusingwiththeDFTsimplybysamplingthisfunction:H(u,v)=−4π2(u2+v2)khdaw.comforu=0,1,2,...,M−1andv=0,1,2,...,N−1.Whenworkingwithcenteredtransforms,theLaplacianfilterfunctioninthefrequencydomainisexpressedasH(u,v)=−4π2([u−M/2]2+[v−N/2]2).Insummary,wehavethefollowingFouriertransformpairrelatingtheLaplacianinthespatialandfrequencydomains:∇2f(x,y)⇔−4π2([u−M/2]2+[v−N/2]2)F(u,v)whereitisunderstoodthatthefilterisasampledversionofacontinuousfunc-tion.(c)TheLaplacianfilterisisotropic,soitssymmetryisapproximatedmuchcloserbyaLaplacianmaskhavingtheadditionaldiagonalterms,whichrequiresa−8inthecentersothatitsresponseis0inareasofconstantintensity.课后答案网Problem4.27(a)Thespatialaverage(excludingthecenterterm)iswww.hackshp.cn1g(x,y)=f(x,y+1)+f(x+1,y)+f(x−1,y)+f(x,y−1).4Fromproperty3inTable4.3,1G(u,v)=ej2πv/N+ej2πu/M+e−j2πu/M+e−j2πv/NF(u,v)4=H(u,v)F(u,v)where1H(u,v)=[cos(2πu/M)+cos(2πv/N)]2khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 35isthefiltertransferfunctioninthefrequencydomain.(b)Toseethatthisisalowpassfilter,ithelpstoexpresstheprecedingequationintheformofourfamiliarcenteredfunctions:1H(u,v)=[cos(2π[u−M/2])/M)+cos(2π[v−N/2]/N)].2Consideronevariableforconvenience.Asurangesfrom0toM−1,thevalueofcos(2π[u−M/2]/M)startsat−1,peaksat1whenu=M/2(thecenterofthefilter)andthendecreasesto−1againwhenu=M.Thus,weseethattheamplitudeofthefilterdecreasesasafunctionofdistancefromtheoriginofthecenteredfilter,whichisthecharacteristicofalowpassfilter.Asimilarargumentkhdaw.comiseasilycarriedoutwhenconsideringbothvariablessimultaneously.Problem4.30Theanswerisno.TheFouriertransformisalinearprocess,whilethesquareandsquarerootsinvolvedincomputingthegradientarenonlinearoperations.TheFouriertransformcouldbeusedtocomputethederivativesasdifferences(asinProblem4.28),butthesquares,squareroot,orabsolutevaluesmustbecomputeddirectlyinthespatialdomain.Problem4.31Wewanttoshowthatℑ−1Ae−(μ2+ν2)/2σ2=A2πσ2e−2π2σ2(t2+z2).Theexplanationwillbeclearerifwestartwithonevariable.Wewanttoshow课后答案网that,ifwww.hackshp.cnH(μ)=e−μ2/2σ2thenh(t)=ℑ−1H(μ)∞=e−μ2/2σ2ej2tμtdμ−∞−2π2σ2t2=2πσ.Wecanexpresstheintegralintheprecedingequationsas∞−1[μ2−j4πσ2μt]h(t)=e2σ2dμ.−∞khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 36CHAPTER4.PROBLEMSOLUTIONSMakinguseoftheidentity(2π)2σ2t2(2π)2σ2t2−e2e2=1intheprecedingintegralyields∞(2π)2σ2t2−1[μ2−j4πσ2μt−(2π)2σ4t2]−h(t)=e2e2σ2dμ.−∞∞−(2π)2σ2t2−1[μ−j2πσ2t]2=e2e2σ2dμ.−∞khdaw.comNext,wemakethechangeofvariablesr=μ−j2πσ2t.Then,dr=dμandtheprecedingintegralbecomes∞(2π)2σ2t2−r2−h(t)=e2e2σ2dr.−∞Finally,wemultiplyanddividetherightsideofthisequationby2πσandob-tain⎡⎤∞−(2π)2σ2t2⎣1−r2⎦.h(t)=2πσe2e2σ2dr2πσ−∞TheexpressioninsidethebracketsisrecognizedastheGaussianprobabilitydensityfunctionwhosevaluefrom-∞to∞is1.Therefore,−2π2σ2t2课后答案网h(t)=2πσe.Withtheprecedingresultsasbackground,wearenowreadytoshowthatwww.hackshp.cnh(t,z)=ℑ−1Ae−(μ2+ν2)/2σ2=A2πσ2e−2π2σ2(t2+z2).BysubstitutingdirectlyintothedefinitionoftheinverseFouriertransformwehave:∞∞h(t,z)=Ae−(μ2+ν2)/2σ2ej2π(μt+νz)dμdν−∞−∞∞⎡∞⎤−μ2+j2πμtν2−+j2πνz=⎣Ae2σ2dμ⎦e2σ2dν.−∞−∞khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 37TheintegralinsidethebracketsisrecognizedfromthepreviousdiscussiontobeequaltoA2πσe−2π2σ2t2.Then,theprecedingintegralbecomes∞ν2−2π2σ2t2−+j2πνzh(t,z)=A2πσee2σ2dν.−∞Wenowrecognizetheremainingintegraltobeequalto2πσe−2π2σ2z2,fromwhichwehavethefinalresult:h(t,z)=A2πσe−2π2σ2t22πσe−2π2σ2z2khdaw.com=A2πσ2e−2π2σ2(t2+z2).Problem4.35WithreferencetoEq.(4.9-1),allthehighpassfiltersindiscussedinSection4.9canbeexpresseda1minusthetransferfunctionoflowpassfilter(whichweknowdonothaveanimpulseattheorigin).TheinverseFouriertransformof1givesanimpulseattheorigininthehighpassspatialfilters.Problem4.37(a)Oneapplicationofthefiltergives:G(u,v)=H(u,v)F(u,v)−D2(u,v)/2D2课后答案网=e0F(u,v).Similarly,Kapplicationsofthefilterwouldgive−KD2(u,v)/2D2www.hackshp.cnGK(u,v)=e0F(u,v).TheinverseDFTofGK(u,v)wouldgivetheimageresultingfromKpassesoftheGaussianfilter.IfKislargeenough,theGaussianLPFwillbecomeanotchpassfilter,passingonlyF(0,0).Weknowthatthistermisequaltotheaveragevalueoftheimage.So,thereisavalueofKafterwhichtheresultofrepeatedlowpassfilteringwillsimplyproduceaconstantimage.Thevalueofallpixelsonthisimagewillbeequaltotheaveragevalueoftheoriginalimage.NotethattheanswerappliesevenasKapproachesinfinity.Inthiscasethefilterwillap-proachanimpulseattheorigin,andthiswouldstillgiveusF(0,0)astheresultoffiltering.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 38CHAPTER4.PROBLEMSOLUTIONSProblem4.41BecauseM=2n,wecanwriteEqs.(4.11-16)and(4.11-17)as1m(n)=Mn2anda(n)=Mn.Proofbyinductionbeginsbyshowingthatbothequationsholdforn=1:1m(1)=(2)(1)=1anda(1)=(2)(1)=2.khdaw.com2WeknowtheseresultstobecorrectfromthediscussioninSection4.11.3.Next,weassumethattheequationsholdforn.Then,wearerequiredtoprovethattheyalsoaretrueforn+1.FromEq.(4.11-14),m(n+1)=2m(n)+2n.Substitutingm(n)fromabove,1m(n+1)=2Mn+2n21=22nn+2n2=2n(n+1)1=2n+1(n+1).课后答案网2Therefore,Eq.(4.11-16)isvalidforalln.FromEq.(4.11-17),www.hackshp.cna(n+1)=2a(n)+2n+1.Substitutingtheaboveexpressionfora(n)yieldsa(n+1)=2Mn+2n+1=2(2nn)+2n+1=2n+1(n+1)whichcompletestheproof.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com Chapter5ProblemSolutionskhdaw.comProblem5.1ThesolutionsareshowninFig.P5.1,fromlefttoright.课后答案网FigureP5.1Problem5.3www.hackshp.cnThesolutionsareshowninFig.P5.3,fromlefttoright.FigureP5.339khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 40CHAPTER5.PROBLEMSOLUTIONSProblem5.5ThesolutionsareshowninFig.P5.5,fromlefttoright.khdaw.comFigureP5.5Problem5.7ThesolutionsareshowninFig.P5.7,fromlefttoright.课后答案网FigureP5.7Problem5.9www.hackshp.cnThesolutionsareshowninFig.P5.9,fromlefttoright.FigureP5.9khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 41Problem5.10(a)Thekeytothisproblemisthatthegeometricmeaniszerowheneveranypixeliszero.Drawaprofileofanidealedgewithafewpointsvalued0andafewpointsvalued1.Thegeometricmeanwillgiveonlyvaluesof0and1,whereasthearithmeticmeanwillgiveintermediatevalues(blur).Problem5.12Abandpassfilterisobtainedbysubtractingthecorrespondingbandrejectfilterfrom1:khdaw.comHBP(u,v)=1−HBR(u,v).Then:(a)Idealbandpassfilter:⎧W⎨0ifD(u,v)D0+2(b)Butterworthbandpassfilter:1HBBP(u,v)=1−!2n课后答案网1+D(u,v)WD2(u,v)−D20!2nD(u,v)WD2(u,v)−D20www.hackshp.cn=!2n.D(u,v)W1+22D(u,v)−D0(c)Gaussianbandpassfilter:⎡⎤21D2(u,v)−D2⎢−0⎥2D(u,v)WHGBP(u,v)=1−⎣1−e⎦21D2(u,v)−D2−02D(u,v)W=ekhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 42CHAPTER5.PROBLEMSOLUTIONSProblem5.14Weproceedasfollows:∞F(u,v)=f(x,y)e−j2π(ux+vy)dxdy−∞∞=Asin(ux+vy)e−j2π(ux+vy)dxdy.00−∞Usingtheexponentialdefinitionofthesinefunction,1sinθ=ejθ−e−jθkhdaw.com2jgivesus∞−jAF(u,v)=ej(u0x+v0y)−e−j(u0x+v0y)e−j2π(ux+vy)dxdy2−∞⎡⎤∞−jA=⎣ej2π(u0x/2π+v0y/2π)e−j2π(ux+vy)dxdy⎦−2−∞⎡⎤∞jA⎣e−j2π(u0x/2π+v0y/2π)e−j2π(ux+vy)dxdy⎦.2−∞ThesearetheFouriertransformsofthefunctions1×ej2π(u0x/2π+v0y/2π)and课后答案网1×e−j2π(u0x/2π+v0y/2π)respectively.TheFouriertransformofthe1givesanimpulseattheorigin,andwww.hackshp.cntheexponentialsshifttheoriginoftheimpulse,asdiscussedinSection4.6.3andTable4.3.Thus,!−jAu0v0u0v0F(u,v)=δu−,v−−δu+,v+.22π2π2π2πProblem5.16FromEq.(5.5-13),∞g(x,y)=f(α,β)h(x−α,y−β)dαdβ.−∞khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 43Itisgiventhatf(x,y)=δ(x−a),sof(α,β)=δ(α−a).Then,usingtheimpulseresponsegivenintheproblemstatement,∞"#22−(x−α)+(y−β)g(x,y)=δ(α−a)edαdβ−∞∞"#2−[(x−α)2]−(y−β)=δ(α−a)eedαdβ−∞khdaw.com∞∞"#2−[(x−α)2]−(y−β)=δ(α−a)edαedβ−∞−∞∞"#2−[(x−a)2]−(y−β)=eedβ−∞whereweusedthefactthattheintegraloftheimpulseisnonzeroonlywhenα=a.Next,wenotethat∞"#∞"#22−(y−β)−(β−y)edβ=edβ−∞−∞whichisintheformofaconstanttimesaGaussiandensitywithvariance课后答案网σ2=1/2orstandarddeviationσ=1/2.Inotherwords,"www.hackshp.cn#⎡2⎤2$1−(1/2)(β−y)e−(β−y)=2π(1/2)⎣$e(1/2)⎦.2π(1/2)Theintegralfromminustoplusinfinityofthequantityinsidethebracketsis1,so2g(x,y)=πe−[(x−a)]whichisablurredversionoftheoriginalimage.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 44CHAPTER5.PROBLEMSOLUTIONSProblem5.18FollowingtheprocedureinSection5.6.3,TH(u,v)=e−j2πux0(t)dt0T=e−j2πu[(1/2)at2]dt0T=e−jπuat2dt0Tkhdaw.com=cos(πuat2)−jsin(πuat2)dt0%T2=C(πuaT)−jS(πuaT)2πuaT2where&z2πC(z)=cost2dtT0and&z2S(z)=sint2dt.π0TheseareFresnelcosineandsineintegrals.Theycanbefound,forexample,theHandbookofMathematicalFunctions,byAbramowitz,orothersimilarref-erence.课后答案网Problem5.20www.hackshp.cnMeasuretheaveragevalueofthebackground.Setallpixelsintheimage,ex-ceptthecrosshairs,tothatintensityvalue.DenotetheFouriertransformofthisimagebyG(u,v).Becausethecharacteristicsofthecrosshairsaregivenwithahighdegreeofaccuracy,wecanconstructanimageofthebackground(ofthesamesize)usingthebackgroundintensitylevelsdeterminedpreviously.Wethenconstructamodelofthecrosshairsinthecorrectlocation(determinedfromthegivenimage)usingthedimensionsprovidedandintensitylevelofthecrosshairs.DenotebyF(u,v)theFouriertransformofthisnewimage.TheratioG(u,v)/F(u,v)isanestimateoftheblurringfunctionH(u,v).InthelikelyeventofvanishingvaluesinF(u,v),wecanconstructaradially-limitedfilterus-ingthemethoddiscussedinconnectionwithFig.5.27.BecauseweknowF(u,v)khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 45andG(u,v),andanestimateofH(u,v),wecanrefineourestimateoftheblur-ringfunctionbysubstitutingGandHinEq.(5.8-3)andadjustingKtogetascloseaspossibletoagoodresultforF(u,v)(theresultcanbeevaluatedvisuallybytakingtheinverseFouriertransform).Theresultingfilterineithercasecanthenbeusedtodeblurtheimageoftheheart,ifdesired.Problem5.22Thisisasimplepluginproblem.Itspurposeistogainfamiliaritywiththevari-oustermsoftheWienerfilter.FromEq.(5.8-3),"(21|H(u,v)|HW(u,v)=khdaw.comH(u,v)|H(u,v)|2+Kwhere|H(u,v)|2=H∗(u,v)H(u,v)=H2(u,v)=64π6σ4(u2+v2)2e−4π2σ2(u2+v2).Then,⎡⎤−8π3σ2(u2+v2)e−2π2σ2(u2+v2)HW(u,v)=−⎣⎦.64π6σ4(u2+v2)2e−4π2σ2(u2+v2)+KProblem5.25(a)Itisgiventhat课后答案网Fˆ(u,v)2=|R(u,v)|2|G(u,v)|2.FromProblem5.24(recallthattheimageandnoiseareassumedtobeuncorre-lated),Fˆ(u,v)2www.hackshp.cn=|R(u,v)|2|H(u,v)|2|F(u,v)|2+|N(u,v)|2.ForcingFˆ(u,v)2toequal|F(u,v)|2gives"2(1/2|F(u,v)|R(u,v)=.222|H(u,v)||F(u,v)|+|N(u,v)|Problem5.27Thebasicideabehindthisproblemistousethecameraandrepresentativecoinstomodelthedegradationprocessandthenutilizetheresultsinaninversefilteroperation.Theprincipalstepsareasfollows:khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 46CHAPTER5.PROBLEMSOLUTIONS1.Selectcoinsascloseaspossibleinsizeandcontentasthelostcoins.Selectabackgroundthatapproximatesthetextureandbrightnessofthephotosofthelostcoins.2.Setupthemuseumphotographiccamerainageometryascloseaspossi-bletogiveimagesthatresembletheimagesofthelostcoins(thisincludespayingattentiontoillumination).Obtainafewtestphotos.Tosimplifyexperimentation,obtainaTVcameracapableofgivingimagesthatre-semblethetestphotos.Thiscanbedonebyconnectingthecameratoanimageprocessingsystemandgeneratingdigitalimages,whichwillbeusedintheexperiment.khdaw.com3.Obtainsetsofimagesofeachcoinwithdifferentlenssettings.There-sultingimagesshouldapproximatetheaspectangle,size(inrelationtotheareaoccupiedbythebackground),andblurofthephotosofthelostcoins.4.Thelenssettingforeachimagein(3)isamodeloftheblurringprocessforthecorrespondingimageofalostcoin.Foreachsuchsetting,removethecoinandbackgroundandreplacethemwithasmall,brightdotonauniformbackground,orothermechanismtoapproximateanimpulseoflight.Digitizetheimpulse.ItsFouriertransformisthetransferfunctionoftheblurringprocess.5.Digitizeeach(blurred)photoofalostcoin,andobtainitsFouriertrans-form.Atthispoint,wehaveH(u,v)andG(u,v)foreachcoin.6.ObtainanapproximationtoF(u,v)byusingaWienerfilter.Equation课后答案网(5.8-3)isparticularlyattractivebecauseitgivesanadditionaldegreeoffreedom(K)forexperimenting.7.TheinverseFouriertransformofeachapproximationwww.hackshp.cnFˆ(u,v)givesthere-storedimageforacoin.Ingeneral,severalexperimentalpassesofthesebasicstepswithvariousdifferentsettingsandparametersarerequiredtoobtainacceptableresultsinaproblemsuchasthis.Problem5.28(b)Thesolutionisshowninthefollowingfigure.ThesolutionsareshowninFig.P5.28.Ineachfigurethehorizontalaxisisρandtheverticalaxisisθ,withθ=0◦atthebottomandgoingupto180◦.Thefatlobesoccurat45◦andthesinglepointofintersectionisat135◦.Theintensityatthatpointisdoubletheintensityofallotherpoints.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 47FigureP5.28Problem5.30(a)FromEq.(5.11-3),∞∞khdaw.comℜf(x,y)=g(ρ,θ)=f(x,y)δ(xcosθ+ysinθ−ρ)dxdy−∞−∞∞∞=δ(x,y)δ(xcosθ+ysinθ−ρ)dxdy−∞−∞∞∞=1×δ(0−ρ)dxdy−∞−∞)1ifρ=0=0otherwise.wherethethirdstepfollowsfromthefactthatδ(x,y)iszeroifxand/oryarenotzero.Problem5.31课后答案网(a)FromSection2.6,weknowthatanoperator,O,islinearifO(af1+bf2)=aO(f1)+bO(f2).FromthedefinitionoftheRadontransforminEq.(5.11-3),www.hackshp.cn∞∞O(af1+bf2)=(af1+bf2)δ(xcosθ+ysinθ−ρ)dxdy−∞−∞∞∞=af1δ(xcosθ+ysinθ−ρ)dxdy−∞−∞∞∞+bf2δ(xcosθ+ysinθ−ρ)dxdy−∞−∞=aO(f1)+bO(f2)thusshowingthattheRadontransformisalinearoperation.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 48CHAPTER5.PROBLEMSOLUTIONS(c)FromChapter4(Problem4.11),weknowthattheconvolutionoftwofunc-tionfandhisdefinedasc(x,y)=f(x,y)Hh(x,y)∞∞=f(α,β)h(x−α,y−β)dαdβ.−∞−∞Wewanttoshowthatℜ{c}=ℜfHℜ{h},whereℜdenotestheRadontrans-form.WedothisbysubstitutingtheconvolutionexpressionintoEq.(5.11-3).Thatis,∞∞⎡∞∞⎤ℜ{c}=⎣f(α,β)h(x−α,y−β)dαdβ⎦khdaw.com−∞−∞−∞−∞×δ(xcosθ+ysinθ−ρ)dxdy=f(α,β)αβ⎡⎤×⎣h(x−α,y−β)δ(xcosθ+ysinθ−ρ)dxdy⎦dαdβxywhereweusedthesubscriptsintheintegralsforclaritybetweentheintegralsandtheirvariables.Allintegralsareunderstoodtobebetween−∞and∞.Work-ingwiththeintegralsinsidethebracketswithx=x−αandy=y−βwehave**h(x−α,y−β)δ(xcosθ+ysinθ−ρ)dxdyx*y*=h(x,y)δ(xcosθ+ysinθ−[ρ−αcosθ−βsinθ])dxdy课后答案网xy=ℜ{h}(ρ−αcosθ−βsinθ,θ).WerecognizethesecondintegralastheRadontransformofwww.hackshp.cnh,butinsteadofbeingwithrespecttoρandθ,itisafunctionofρ−αcosθ−βsinθandθ.ThenotationinthelastlineisusedtoindicatetheRadontransformofhasafunctionofρ−αcosθ−βsinθandθ.Then,ℜ{c}=f(α,β)αβ⎡⎤×⎣h(x−α,y−β)δ(xcosθ+ysinθ−ρ)dxdy⎦dαdβxy=f(α,β)ℜ{h}(ρ−ρ,θ)dαdβαβkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 49whereρ=αcosθ+βsinθ.Then,basedonthepropertiesoftheimpulse,wecanwriteℜ{h}(ρ−ρ,θ)=ℜ{h}(ρ−ρ,θ)δ(αcosθ+βsinθ−ρ)dρ.ρThen,ℜ{c}=f(α,β)ℜ{h}(ρ−ρ,θ)dαdβαβ=f(α,β)αβkhdaw.com⎡⎤×⎣ℜ{h}(ρ−ρ,θ)δ(αcosθ+βsinθ−ρ)dρ⎦dαdβρ⎡⎤=ℜ{h}(ρ−ρ,θ)⎣f(α,β)δ(αcosθ+βsinθ−ρ)dαdβ⎦dρραβ=ℜ{h}(ρ−ρ,θ)ℜf(ρ,θ)dρρ=ℜfHℜ{h}wherethefourthstepfollowsfromthedefinitionoftheRadontransformandthefifthstepfollowsfromthedefinitionofconvolution.Thiscompletestheproof.Problem5.33TheargumentoffunctionsinEq.(5.11-24)maybewrittenas:课后答案网rcos(β+α−ϕ)−Dsinα=rcos(β−ϕ)cosα−[rsin(β−ϕ)+D]sinα.FromFig.5.47,www.hackshp.cnRcosα=R+rsin(β−ϕ)Rsinα=rcos(β−ϕ).Then,substitutingintheearlierexpression,rcos(β+α−ϕ)−Rsinα=Rsinαcosα−Rcosαsinα=R(sinαcosα−cosαsinα)=Rsin(α−α)whichagreeswithEq.(5.11-25).khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com Chapter6ProblemSolutionskhdaw.comProblem6.2Denotebycthegivencolor,andletitscoordinatesbedenotedby(x0,y0).Thedistancebetweencandc1is221/2d(c,c1)=(x0−x1)+y0−y1.Similarlythedistancebetweenc1andc2221/2d(c1,c2)=(x1−x2)+y1−y2.Thepercentagep1ofc1incisd(c1,c2)−d(c,c1)p1=×100.课后答案网d(c1,c2)Thepercentagep2ofc2issimplyp2=100−p1.Intheprecedingequationwesee,forexample,thatwhenc=c1,thend(c,c1)=0anditfollowsthatp1=100%andp2=0%.Similarly,whenwww.hackshp.cnd(c,c1)=d(c1,c2),itfollowsthatp1=0%andp2=100%.Valuesinbetweenareeasilyseentofollowfromthesesimplerelations.Problem6.4Usecolorfiltersthataresharplytunedtothewavelengthsofthecolorsofthethreeobjects.Withaspecificfilterinplace,onlytheobjectswhosecolorcor-respondstothatwavelengthwillproduceasignificantresponseonthemono-chromecamera.Amotorizedfilterwheelcanbeusedtocontrolfilterpositionfromacomputer.Ifoneofthecolorsiswhite,thentheresponseofthethreefilterswillbeapproximatelyequalandhigh.Ifoneofthecolorsisblack,theresponseofthethreefilterswillbeapproximatelyequalandlow.51khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 52CHAPTER6.PROBLEMSOLUTIONSFigureP6.6khdaw.comProblem6.6Fortheimagegiven,themaximumintensityandsaturationrequirementmeansthattheRGBcomponentvaluesare0or1.WecancreateTableP6.6with0and255representingblackandwhite,respectively.Thus,wegetthemonochromedisplaysshowninFig.P6.6.Problem6.8(a)AllpixelvaluesintheRedimageare255.IntheGreenimage,thefirstcolumnisall0s;thesecondcolumnall1s;andsoonuntilthelastcolumn,whichiscomposedofall255s.IntheBlueimage,thefirstrowisall255s;thesecondrowall254s,andsoonuntilthelastrowwhichiscomposedofall0s.课后答案网Problem6.10Equation(6.2-1)revealsthateachcomponentoftheCMYimageisafunctionofasinglecomponentofthecorrespondingRGBimagewww.hackshp.cnCisafunctionofR,MofG,andYofB.Forclarity,wewilluseaprimetodenotetheCMYcomponents.FromEq.(6.5-6),weknowthatsi=krifori=1,2,3(fortheR,G,andBcomponents).AndfromEq.(6.2-1),weknowthattheCMYcomponentscorrespondingtotheriandsi(whichwearedenotingwithprimes)arer=1−riiands=1−s.iikhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 53Thus,r=1−riiands=1−s=1−kr=1−k1−riiiisothats=kr+(1−k).iiProblem6.12khdaw.comUsingEqs.(6.2-2)through(6.2-4),wegettheresultsshowninTableP6.12.Notethat,inaccordancewithEq.(6.2-2),hueisundefinedwhenR=G=Bsinceθ=cos−1(0/0).Inaddition,saturationisundefinedwhenR=G=B=0sinceEq.(6.2-3)yieldsS=1−3min(0)/(3×0)=1−(0/0).Thus,wegetthemonochromedisplayshowninFig.P6.12.TableP6.12ColorRGBHSIMonoHMonoSMonoIBlack000000Red100010.33025585Yellow1100.1710.6743255170Green0100.3310.338525585Cyan0110.510.67128255170Blue课后答案网0010.6710.3317025585Magenta1010.8310.67213255170White11www.hackshp.cn1010255Gray0.50.50.500.50128FigureP6.12khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 54CHAPTER6.PROBLEMSOLUTIONSProblem6.14Therearetwoimportantaspectstothisproblem.OneistoapproachitintheHSIspaceandtheotheristousepolarcoordinatestocreateahueimagewhosevaluesgrowasafunctionofangle.Thecenteroftheimageisthemiddleofwhat-everimageareaisused.Then,forexample,thevaluesofthehueimagealongaradiuswhentheangleis0◦wouldbeall0s.Thentheangleisincrementedby,say,onedegree,andallthevaluesalongthatradiuswouldbe1s,andsoon.Valuesofthesaturationimagedecreaselinearlyinallradialdirectionsfromtheorigin.Theintensityimageisjustaspecifiedconstant.Withthesebasicsinkhdaw.comminditisnotdifficulttowriteaprogramthatgeneratesthedesiredresult.Problem6.16(a)ItisgiventhatthecolorsinFig.6.16(a)areprimaryspectrumcolors.Italsoisgiventhatthegray-levelimagesintheproblemstatementare8-bitimages.Thelatterconditionmeansthathue(angle)canonlybedividedintoamaximumnumberof256values.Becausehuevaluesarerepresentedintheintervalfrom0◦to360◦thismeansthatforan8-bitimagetheincrementsbetweencontiguoushuevaluesarenow360/255.Anotherwayoflookingatthisisthattheentire[0,360]huescaleiscompressedtotherange[0,255].Thus,forexample,yellow(thefirstprimarycolorweencounter),whichis60◦nowbecomes43(theclosestinteger)intheintegerscaleofthe8-bitimageshownintheproblemstatement.Similarly,green,whichis120◦becomes85inthisimage.Fromthisweeasilycomputethevaluesoftheothertworegionsasbeing170and213.Theregioninthemiddleispurewhite[equalproportionsofredgreenandblueinFig.6.61(a)]soitshuebydefinitionis0.Thisalsoistrueoftheblackbackground.课后答案网Problem6.18www.hackshp.cnUsingEq.(6.2-3),weseethatthebasicproblemisthatmanydifferentcolorshavethesamesaturationvalue.ThiswasdemonstratedinProblem6.12,wherepurered,yellow,green,cyan,blue,andmagentaallhadasaturationof1.Thatis,aslongasanyoneoftheRGBcomponentsis0,Eq.(6.2-3)yieldsasaturationof1.ConsiderRGBcolors(1,0,0)and(0,0.59,0),whichrepresentshadesofredandgreen.TheHSItripletsforthesecolors[perEq.(6.4-2)through(6.4-4)]are(0,1,0.33)and(0.33,1,0.2),respectively.Now,thecomplementsofthebegin-ningRGBvalues(seeSection6.5.2)are(0,1,1)and(1,0.41,1),respectively;thecorrespondingcolorsarecyanandmagenta.TheirHSIvalues[perEqs.(6.4-2)through(6.4-4)]are(0.5,1,0.66)and(0.83,0.48,0.8),respectively.Thus,forthekhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 55red,astartingsaturationof1yieldedthecyancomplementedsaturationof1,whileforthegreen,astartingsaturationof1yieldedthemagentacomple-mentedsaturationof0.48.Thatis,thesamestartingsaturationresultedintwodifferentcomplementedsaturations.Saturationaloneisnotenoughinforma-tiontocomputethesaturationofthecomplementedcolor.Problem6.20TheRGBtransformationsforacomplement[fromFig.6.33(b)]are:si=1−rikhdaw.comwherei=1,2,3(fortheR,G,andBcomponents).ButfromthedefinitionoftheCMYspaceinEq.(6.2-1),weknowthattheCMYcomponentscorrespondingtoriandsi,whichwewilldenoteusingprimes,arer=1−riis=1−s.iiThus,r=1−riiands=1−s=1−(1−r)=1−1−1−riiiisothats=1−r.课后答案网iProblem6.22BasedonthediscussionisSection6.5www.hackshp.cn.4andwithreferencetothecolorwheelinFig.6.32,wecandecreasetheproportionofyellowby(1)decreasingyellow,(2)increasingblue,(3)increasingcyanandmagenta,or(4)decreasingredandgreen.Problem6.24ThesimplestapproachconceptuallyistotransformeveryinputimagetotheHSIcolorspace,performhistogramspecificationperthediscussioninSection3.3.2ontheintensity(I)componentonly(leavingHandSalone),andconverttheresultingintensitycomponentwiththeoriginalhueandsaturationcomponentsbacktothestartingcolorspace.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 56CHAPTER6.PROBLEMSOLUTIONSProblem6.27(a)ThecubeiscomposedofsixintersectingplanesinRGBspace.ThegeneralequationforsuchplanesisazR+bzG+czB+d=0wherea,b,c,anddareparametersandthezsarethecomponentsofanypoint(vector)zinRGBspacelyingontheplane.IfanRGBpointzdoesnotlieontheplane,anditscoordinatesaresubstitutedintheprecedingequation,theequa-tionwillgiveeitherapositiveoranegativevalue;itwillnotyieldzero.Wesaythatzliesonthepositiveornegativesideoftheplane,dependingonwhetherkhdaw.comtheresultispositiveornegative.Wecanchangethepositivesideofaplanebymultiplyingitscoefficients(exceptd)by−1.Supposethatwetestthepointagivenintheproblemstatementtoseewhetheritisonthepositiveornegativesideeachofthesixplanescomposingthebox,andchangethecoefficientsofanyplaneforwhichtheresultisnegative.Then,awilllieonthepositivesideofallplanescomposingtheboundingbox.Infactallpointsinsidetheboundingboxwillyieldpositivevalueswhentheircoordinatesaresubstitutedintheequa-tionsoftheplanes.Pointsoutsidetheboxwillgiveatleastonenegative(orzeroifitisonaplane)value.Thus,themethodconsistsofsubstitutinganunknowncolorpointintheequationsofallsixplanes.Ifalltheresultsarepositive,thepointisinsidethebox;otherwiseitisoutsidethebox.Aflowdiagramisaskedforintheproblemstatementtomakeitsimplertoevaluatethestudentslineofreasoning.课后答案网www.hackshp.cnkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com Chapter7ProblemSolutionskhdaw.comProblem7.2Ameanapproximationpyramidiscreatedbyforming2×2blockaverages.Sincethestartingimageisofsize4×4,J=2andfx,yisplacedinlevel2ofthemeanapproximationpyramid.Thelevel1approximationis(bytaking2×2blockaveragesoverfx,yandsubsampling)"(3.55.511.513.5andthelevel0approximationissimilarly课后答案网[8.5].Thecompletedmeanapproxi-mationpyramidiswww.hackshp.cn⎡⎤1234⎢⎥"(⎢5678⎥3.55.5⎢⎥[8.5].⎣9101112⎦11.513.513141516Pixelreplicationisusedinthegenerationofthecomplementarypredictionresid-ualpyramid.Level0ofthepredictionresidualpyramidisthelowestresolu-tionapproximation,[8.5].Thelevel2predictionresidualisobtainedbyupsam-plingthelevel1approximationandsubtractingitfromthelevel2approxima-57khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 58CHAPTER7.PROBLEMSOLUTIONStion(originalimage).Thus,weget⎡⎤⎡⎤12343.53.55.55.5⎢⎥⎢⎥⎢5678⎥⎢3.53.55.55.5⎥⎢⎥−⎢⎥=⎣9101112⎦⎣11.511.513.513.5⎦1314151611.511.513.513.5⎡⎤−2.5−1.5−2.5−1.5⎢⎥⎢1.52.51.52.5⎥⎢⎥.⎣−2.5−1.5−2.5−1.5⎦1.52.51.52.5Similarly,thelevel1predictionresidualisobtainedbyupsamplingthelevel0khdaw.comapproximationandsubtractingitfromthelevel1approximationtoyield"("("(3.55.58.58.5−5−3−=.11.513.58.58.535Thepredictionresidualpyramidistherefore⎡⎤−2.5−1.5−2.5−1.5⎢⎥"(⎢1.52.51.52.5⎥−5−3⎢⎥[8.5].⎣−2.5−1.5−2.5−1.5⎦351.52.51.52.5Problem7.3ThenumberofelementsinaJ+1levelpyramidwhereN=2Jisboundedby4N2or42J2=422J(seeSection7.1.1):333课后答案网+,111422J1+++...+≤22J(4)1(4)2(4)J3forJ>0.Wecangeneratethefollowingtable:www.hackshp.cnJPyramidElementsCompressionRatio011155/4=1.2522121/16=1.312538585/64=1.328.........∞4/3=1.33Allbutthetrivialcase,J=0,areexpansions.TheexpansionfactorisafunctionofJandboundedby4/3or1.33.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 59a(m,n)2g0(n)Columns(alongn)2g0(m)RowsdV(m,n)2g1(n)(alongm)Columnsf(m,n)dH(m,n)2g0(n)Columns2g1(m)Rowskhdaw.comdD(m,n)2g1(n)ColumnsFigureP7.7Problem7.7Reconstructionisperformedbyreversingthedecompositionprocessthatis,byreplacingthedownsamplerswithupsamplersandtheanalysisfiltersbytheirsynthesisfiltercounterparts,asFig.P7.7shows.Problem7.10(a)ThebasisisorthonormalandthecoefficientsarecomputedbythevectorequivalentofEq.(7.2-5):"(311α0=课后答案网22252=2www.hackshp.cn"(311α1=−2222=2so,"("(11522522ϕ0+ϕ1=12+212222−22"(3=.2khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 60CHAPTER7.PROBLEMSOLUTIONSProblem7.13FromEq.(7.2-19),wefindthatψ(x)=23/2ψ(23x−3)3,3=22ψ(8x−3)andusingtheHaarwaveletfunctiondefinitionfromEq.(7.2-30),obtaintheplotinFig.P7.13.Toexpressψ3,3(x)asafunctionofscalingfunctions,weemployEq.(7.2-28)khdaw.comandtheHaarwaveletvectordefinedinExample7.6thatis,hψ(0)=1/2andhψ(1)=−1/2.Thuswegetψ(x)=hψ(n)2ϕ(2x−n)nsothatψ(8x−3)=hψ(n)2ϕ(2[8x−3]−n)n1−1=2ϕ(16x−6)+2ϕ(16x−7)22=ϕ(16x−6)−ϕ(16x−7).Then,sinceψ3,3(x)=22ψ(8x−3)fromabove,substitutiongivesψ3,3=22ψ(8x−3)课后答案网=22ϕ(16x−6)−22ϕ(16x−7).www.hackshp.cnψ3,3(x)=22ψ(8x-3)220-2203/81FigureP7.13khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 61{-1/2,-3/2,7/2,-3/2,0}{-1/2,1/2}2Wψ(1,n)={-3/2,-3/2}Wϕ(2,n)=f(n)={1,4,-3,0}{1/2,1/2}2Wϕ(1,n)={5/2,-3/2}{1/2,5/2,1/2,-3/2,0}khdaw.comFigureP7.19Problem7.17Intuitively,thecontinuouswavelettransform(CWT)calculatesaresemblanceindexbetweenthesignalandthewaveletatvariousscalesandtranslations.Whentheindexislarge,theresemblanceisstrong;elseitisweak.Thus,ifafunctionissimilartoitselfatdifferentscales,theresemblanceindexwillbesim-ilaratdifferentscales.TheCWTcoefficientvalues(theindex)willhaveachar-acteristicpattern.Asaresult,wecansaythatthefunctionwhoseCWTisshownisself-similarlikeafractalsignal.Problem7.18(b)TheDWTisabetterchoicewhenweneedaspacesavingrepresentationthatissufficientforreconstructionoftheoriginalfunctionorimage.TheCWTis课后答案网ofteneasiertointerpretbecausethebuilt-inredundancytendstoreinforcetraitsofthefunctionorimage.Forexample,seetheself-similarityofProblem7.17.www.hackshp.cnProblem7.19ThefilterbankisthefirstbankinFig.7.19,asshowninFig.P7.19:Problem7.21(a)Inputϕ(n)={1,1,1,1,1,1,1,1}=ϕ0,0(n)forathree-scalewavelettransformwithHaarscalingandwaveletfunctions.Sincewavelettransformcoefficientsmeasurethesimilarityoftheinputtothebasisfunctions,theresultingtransformis{Wϕ(0,0),Wψ(0,0),Wψ(1,0),Wψ(1,1),Wψ(2,0),Wψ(2,1),Wψ(2,2)khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 62CHAPTER7.PROBLEMSOLUTIONSWψ(2,3)}={22,0,0,0,0,0,0,0}.TheWϕ(0,0)termcanbecomputedusingEq.(7.3-5)withj0=k=0.Problem7.22Theyarebothmulti-resolutionrepresentationsthatemployasinglereduced-resolutionapproximationimageandaseriesofdifferenceimages.FortheFWT,thesedifferenceimagesarethetransformdetailcoefficients;forthepyra-mid,theyarethepredictionresiduals.ToconstructtheapproximationpyramidthatcorrespondstothetransforminFig.7.10(a),wewillusetheFWT−12-dsynthesisbankofFig.7.24(c).First,khdaw.complacethe64×64approximationcoefficientsfromFig.7.10(a)atthetopofthepyramidbeingconstructed.Thenuseit,alongwith64×64horizontal,vertical,anddiagonaldetailcoefficientsfromtheupper-leftofFig.7.10(a),todrivethefilterbankinputsinFig.7.24(c).Theoutputwillbea128×128approximationoftheoriginalimageandshouldbeusedasthenextleveloftheapproximationpyramid.The128×128approximationisthenusedwiththethree128×128de-tailcoefficientimagesintheupper1/4ofthetransforminFig.7.10(a)todrivethesynthesisfilterbankinFig.7.24(c)asecondtimeproducinga256×256ap-proximationthatisplacedasthenextleveloftheapproximationpyramid.Thisprocessisthenrepeatedathirdtimetorecoverthe512×512originalimage,whichisplacedatthebottomoftheapproximationpyramid.Thus,theapprox-imationpyramidwouldhave4levels.Problem7.24课后答案网Ascanbeseeninthesequenceofimagesthatareshown,theDWTisnotshiftinvariant.Iftheinputisshifted,thetransformchanges.Sincealloriginalimagesintheproblemare128×128,theybecometheWϕ(7,m,n)inputsfortheFWTcomputationprocess.ThefilterbankofFig.7.24(a)canbeusedwithwww.hackshp.cnj+1=7.Forasinglescaletransform,transformcoefficientsW(6,m,n)andWi(6,m,n)ϕψfori=H,V,Daregenerated.WithHaarwavelets,thetransformationprocesssubdividestheimageintonon-overlapping2×2blocksandcomputes2-pointaveragesanddifferences(perthescalingandwaveletvectors).Thus,therearenohorizontal,vertical,ordiagonaldetailcoefficientsinthefirsttwotransformsshown;theinputimagesareconstantinall2×2blocks(soalldifferencesare0).Iftheoriginalimageisshiftedbyonepixel,detailcoefficientsaregeneratedsincetherearethen2×2areasthatarenotconstant.Thisisthecaseinthethirdtransformshown.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com Chapter8ProblemSolutionskhdaw.comProblem8.4(a)TableP8.4showsthestartingintensityvalues,their8-bitcodes,theIGSsumusedineachstep,the4-bitIGScodeanditsequivalentdecodedvalue(thedecimalequivalentoftheIGScodemultipliedby16),theerrorbetweenthedecodedIGSintensitiesandtheinputvalues,andthesquarederror.(b)UsingEq.(8.1-10)andthesquarederrorvaluesfromTableP8.4,thermserroris&1erms=(144+25+49+16+16+169+64+9)课后答案网8&1=(492)8=www.hackshp.cn7.84orabout7.8intensitylevels.FromEq.(8.1-11),thesignal-to-noiseratiois962+1442+1282+2402+1762+1602+642+962SNRms=492173824=492353.63khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 64CHAPTER8.PROBLEMSOLUTIONSTableP8.4Intensity8-bitCodeSumIGSCodeDecodedIGSErrorSquareError000000001080110110001101100011096-121441391000101110010111100114452513510000111100011101000128-74924411110100111101001111240-4161721010110010110000101117641617310101101101011011010160-13169560011100001000101010064864khdaw.com990110001101101000011096-39Problem8.6Theconversionfactorsarecomputedusingthelogarithmicrelationship1logax=logbx.logbaThus,1Hartley=3.3219bitsand1nat=1.4427bits.Problem8.7-. TLetthesetofsourcesymbolsbea1,a2,...,aqwithprobabilitiesP(a1),P(a2),...,Paq.Then,usingEq.(8.1-6)andthefactthatthesumofall课后答案网P(ai)is1,weget⎡⎤qq⎢⎥logq−H=logq⎣Paj⎦+PajlogPajwww.hackshp.cnj=1j=1qq=Pajlogq+PajlogPajj=1j=1q=PajlogqPaj.j=1UsingthelogrelationshipfromProblem8.6,thisbecomesq=logePajlnqPaj.j=1khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 65Then,multiplyingtheinequalitylnx≤x−1by-1togetln1/x≥1−xandap-plyingittothislastresult,⎡⎤q1logq−H≥logePaj⎣1−⎦ij=1qPaj⎡⎤qqPa⎢1j⎥≥loge⎣Paj−⎦j=1qj=1Paj≥loge[1−1]≥0khdaw.comsothatlogq≥H.Therefore,Hisalwayslessthan,orequalto,logq.Furthermore,inviewoftheequalitycondition(x=1)forln1/x≥1−x,whichwasintroducedatonlyonepointintheabovederivation,wewillhavestrictequalityifandonlyifP(aj)=1/qforallj.Problem8.9(d)Wecancomputetherelativefrequencyofpairsofpixelsbyassumingthattheimageisconnectedfromlinetolineandendtobeginning.TheresultingprobabilitiesarelistedinTableP8.9-2.TableP8.9-2IntensitypairCountProbability课后答案网(21,21)81/4(21,95)41/8(95,169)41/8www.hackshp.cn(169,243)41/8(243,243)81/4(243,21)41/8TheentropyoftheintensitypairsisestimatedusingEq.(8.1-7)anddividingby2(becausethepixelsareconsideredinpairs):11111111111111H=−log2+log2+log2+log2+log2+log2224488888844882.5=2=1.25bits/pixel.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 66CHAPTER8.PROBLEMSOLUTIONSThedifferencebetweenthisvalueandtheentropyin(a)tellsusthatamappingcanbecreatedtoeliminate(1.811−1.25)=0.56bits/pixelofspatialredundancy.Problem8.15TodecodeGk(n):exp1.Countthenumberof1sinaleft-to-rightscanofaconcatenatedGk(n)expbitsequencebeforereachingthefirst0,andletibethenumberof1scounted.khdaw.com2.Getthek+ibitsfollowingthe0identifiedinstep1andletdbeitsdecimalequivalent.3.Thedecodedintegeristheni−1d+2j+k.j=0Forexample,todecodethefirstG2(n)codeinthebitstream10111011...,letexpi=1,thenumberof1sinaleft-to-rightscanofthebitstreambeforefindingthefirst0.Getthe2+1=3bitsfollowingthe0,thatis,111sod=7.Thedecodedintegeristhen1−17+2j+2=7+22=11.课后答案网j=0Repeattheprocessforthenextcodeword,whichbeginswiththebitsequence011...www.hackshp.cnProblem8.18Thearithmeticdecodingprocessisthereverseoftheencodingprocedure.Startbydividingthe[0,1)intervalaccordingtothesymbolprobabilities.ThisisshowninTableP8.18.Thedecoderimmediatelyknowsthemessage0.23355beginswithane,sincethecodedmessageliesintheinterval[0.2,0.5).Thismakesitclearthatthesecondsymbolisana,whichnarrowstheintervalto[0.2,0.26).Tofurtherseethis,dividetheinterval[0.2,0.5)accordingtothesym-bolprobabilities.Proceedinglikethis,whichisthesameprocedureusedtocodethemessage,wegeteaii!.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 67TableP8.18SymbolProbabilityRangea0.2[0.0,0.2)e0.3[0.2,0.5)i0.1[0.5,0.6)o0.2[0.6,0.8)u0.1[0.8,0.9)!0.1[0.9,1.0)Problem8.20khdaw.comTheinputtotheLZWdecodingalgorithminExample8.7is3939126126256258260259257126Thestartingdictionary,tobeconsistentwiththecodingitself,contains512locationswiththefirst256correspondingtointensityvalues0through255.Thedecodingalgorithmbeginsbygettingthefirstencodedvalue,outputtingthecorrespondingvaluefromthedictionary,andsettingtherecognizedsequencetothefirstvalue.Foreachadditionalencodedvalue,we(1)outputthedictio-naryentryforthepixelvalue(s),(2)addanewdictionaryentrywhosecontentistherecognizedsequenceplusthefirstelementoftheencodedvaluebeingprocessed,and(3)settherecognizedsequencetotheencodedvaluebeingprocessed.FortheencodedoutputinExample8.12,thesequenceofoperationsisasshowninTableP8.20.Note,forexample,inrow5ofthetablethatthenewdictionaryentryforlo-课后答案网cation259is126-39,theconcatenationofthecurrentlyrecognizedsequence,126,andthefirstelementoftheencodedvaluebeingprocessedthe39fromthe39-39entryindictionarylocation256.Theoutputisthenreadfromthethirdwww.hackshp.cncolumnofthetabletoyield3939126126393912612639391261263939126126whereitisassumedthatthedecoderknowsorisgiventhesizeoftheimagethatwasreceived.Notethatthedictionaryisgeneratedasthedecodingiscarriedout.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 68CHAPTER8.PROBLEMSOLUTIONSTableP8.20RecognizedEncodedValuePixelsDict.AddressDict.Entry393939393925639-393912612625739-126126126126258126-12612625639-39259126-39256258126-12626039-39-12625826039-39-126261126-126-39khdaw.com260259126-3926239-39-126-12625925739-126263126-39-3925712612626439-126-126Problem8.24(a)-(b)FollowingtheprocedureoutlinedinSection8.2.8,weobtaintheresultsshowninTableP8.24.TableP8.24DCCoefficientDifferenceTwosComplementValueCode-71...100100000课后答案网-61...101000001-51...101100010-41...110000011www.hackshp.cn40...01000010050...01010010160...01100011070...011100111Problem8.27TheappropriateMPEGdecoderisshowninFig.P8.27.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 69VariableDecodedEncodedInverseInverseMapperLengthQuantizer(e.g.,DCT-1)+ImageMacroblockDecoderMacroblockEncodedVariableMotionLengthMotionEstimatorVectorDecoderandCompensatorFigureP8.27Problem8.29khdaw.comThederivationproceedsbysubstitutingtheuniformprobabilityfunctionintoEqs.(8.2-57)-(8.2-59)andsolvingtheresultingsimultaneousequationswithL=4.Equation(8.2-58)yieldss0=01s1=2(t1+t2)s2=∞.SubstitutingthesevaluesintotheintegralsdefinedbyEq.(8.2-57),wegettwoequations.Thefirstis(assumings1≤A)s1(s−t1)p(s)ds=0s01(t1+t2)112s2(t+t)课后答案网(s−t)ds=−ts212=01102A202www.hackshp.cn(t1+t2)−4t1(t1+t2)=0(t1+t2)(t2−3t1)=0sot1=−t2t2=3t1.Thefirstoftheserelationsdoesnotmakesensesincebotht1andt2mustbepos-itive.Thesecondrelationshipisavalidone.Thesecondintegralyields(notingthats1islessthanAsotheintegralfromAto∞is0bythedefinitionofp(s))khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 70CHAPTER8.PROBLEMSOLUTIONSs2(s−t2)p(s)ds=0s1A1s2A(s−t2)ds=−t2s1=02A1(t22(t1+t2)1+t2)24A2−8At−(t+t)2−4t(t+t)=0.212212Substitutingt2=3t1fromthefirstintegralsimplificationintothisresult,weget8t2−6At+A2=011khdaw.comAt1−(8t1−2A)=02At1=2At1=.4Backsubstitutingthesevaluesoft1,wefindthecorrespondingt2ands1values:3AAt2=2ands1=Afort1=23AAAt2=4ands1=2fort1=4.Becauses1=Aisnotarealsolution(thesecondintegralequationwouldthenbeevaluatedfromAtoA,yielding0ornoequation),thesolutionisgivenbythesecond.Thatis,A课后答案网s0=0s1=2s2=∞A3At1=4t2=4.Problem8.34www.hackshp.cnAvarietyofmethodsforinsertinginvisiblewatermarksintotheDFTcoefficientsofanimagehavebeenreportedintheliterature.Hereisasimplifiedoutlineofoneinwhichwatermarkinsertionisdoneasfollows:1.CreateawatermarkbygeneratingaP-elementpseudo-randomsequenceofnumbers,ω1,ω2,...,ωP,takenfromaGaussiandistributionwithzeromeanandunitvariance.2.ComputetheDFToftheimagetobewatermarked.Weassumethatthex+ytransformhasnotbeencenteredbypre-multiplyingtheimageby(−1).khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 71P3.ChoosecoefficientsfromeachofthefourquadrantsoftheDFTinthe2middlefrequencyrange.Thisiseasilyaccomplishedbychoosingcoeffi-cientsintheordershowninFig.P8.34andskippingthefirstKcoefficients(thelowfrequencycoefficients)ineachquadrant.4.InsertthefirsthalfofthewatermarkintothechosenDFTcoefficients,ciPfor1≤i≤,inquadrantsIandIIIoftheDFTusing2c=c(1+αω)iii5.InsertthesecondhalfofthewatermarkintothechosenDFTcoefficientskhdaw.comofquadrantsIIandIVoftheDFTinasimilarmanner.Notethatthispro-cessmaintainsthesymmetryofthetransformofareal-valuedimage.Inaddition,constantαdeterminesthestrengthoftheinsertedwatermark.6.ComputetheinverseDFTwiththewatermarkedcoefficientsreplacingtheunmarkedcoefficients.Watermarkextractionisperformedasfollows:1.LocatetheDFTcoefficientscontainingthewatermarkbyfollowingthein-sertionprocessintheembeddingalgorithm.2.Computethewatermarkωˆ1,ωˆ2,...,ωˆPusingωˆi=cˆi−ci3.Computethecorrelationbetween课后答案网ωandωˆandcomparetoapre-determinedthresholdTtodetermineifthemarkispresent.www.hackshp.cnThisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 72CHAPTER8.PROBLEMSOLUTIONSIIIkhdaw.comIIIIVFigureP8.34Thisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.Thisissomeblantexttomovefiguretotopofpage.课后答案网Thisissomeblantexttomovefiguretotopofpage.www.hackshp.cnkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com Chapter9ProblemSolutionskhdaw.comProblem9.2(a)WithreferencetothediscussioninSection2.5.2,m-connectivityisusedtoavoidmultiplepathsthatareinherentin8-connectivity.Inone-pixel-thick,fullyconnectedboundaries,thesemultiplepathsmanifestthemselvesinthefourba-sicpatternsshowninFig.P9.2(a).Thesolutiontotheproblemistousethehit-or-misstransformtodetectthepatternsandthentochangethecenterpixelto0,thuseliminatingthemultiplepaths.Abasicsequenceofmorphologicalstepstoaccomplishthisisasfollows:X=AB11Y=A∩Xc11X=YB221课后答案网Y=Y∩Xc212X=YB332Y=Y∩Xcwww.hackshp.cn323X=YB443Y=Y∩Xc434whereAistheinputimagecontainingtheboundary.Problem9.4(a)Erosionissetintersection.Theintersectionoftwoconvexsetsisconvexalso.(b)SeeFig.P9.4(a).Keepinmindthatthedigitalsetsinquestionarethelargerblackdots.Thelinesareshownforconvenienceinvisualizingwhatthecontinu-73khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 74CHAPTER9.PROBLEMSOLUTIONSFigureP9.2khdaw.comFigureP9.4oussetswouldbe,theyarenotpartofthesetsbeingconsideredhere.Theresultofdilationinthiscaseisnotconvexbecausethecenterpointisnotintheset.Problem9.5RefertoFig.P9.5.Thecenterofeachstructuringelementisshownasablackdot.(a)Thissolutionwasobtainedbyerodingtheoriginalset(showndashed)withthestructuringelementshown(notethattheoriginisatthebottom,right).(b)课后答案网Thissolutionwasobtainedbyerodingtheoriginalsetwiththetallrectangu-larstructuringelementshown.(c)Thissolutionwasobtainedbyfirsterodingtheimageshowndowntotwoverticallinesusingtherectangularstructuringelement(notethatthiselementswww.hackshp.cnisslightlytallerthanthecentersectionoftheUfigure).Thisresultwasthendilatedwiththecircularstructuringelement.(d)Thissolutionwasobtainedbyfirstdilatingtheoriginalsetwiththelargediskshown.Thedilatedimagewaserodedwithadiskwhosediameterwasequaltoone-halfthediameterofthediskusedfordilation.Problem9.7(a)Thedilatedimagewillgrowwithoutbound.(b)Aone-elementset(i.e.,aone-pixelimage).khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 75(a)khdaw.com(b)(c)(d)FigureP9.5Problem9.9Theproof,whichconsistsofshowingthattheexpression-.-.x∈Z2|x+b∈A,foreveryb∈B≡x∈Z2|(B)⊆Axfollowsdirectlyfromthedefinitionoftranslationbecausetheset课后答案网(B)xhasele-mentsoftheformx+bforb∈B.Thatis,x+b∈Aforeveryb∈Bimpliesthat(B)x⊆A.Conversely,(B)x⊆Aimpliesthatallelementsof(B)xarecontainedinA,orx+b∈Aforeverywww.hackshp.cnb∈B.Problem9.11Theapproachistoprovethat-.-.x∈Z2(Bˆ)∩A=≡x∈Z2|x=a+bfora∈Aandb∈B.xTheelementsof(Bˆ)xareoftheformx−bforb∈B.Thecondition(Bˆ)x∩A=impliesthatforsomeb∈B,x−b∈A,orx−b=aforsomea∈A(noteintheprecedingequationthatx=a+b).Conversely,ifx=a+bforsomea∈Aandb∈B,thenx−b=aorx−b∈A,whichimpliesthat(Bˆ)x∩A=.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 76CHAPTER9.PROBLEMSOLUTIONSProblem9.14Startingwiththedefinitionofclosing,cc(A•B)=[(A⊕B)B]=(A⊕B)c⊕Bˆ=(AcBˆ)⊕Bˆ=Ac◦Bˆ.Theproofoftheotherdualitypropertyfollowsasimilarapproach.Problem9.15khdaw.com(a)ErosionofasetAbyBisdefinedasthesetofallvaluesoftranslates,z,ofBsuchthat(B)ziscontainedinA.IftheoriginofBiscontainedinB,thenthesetofpointsdescribingtheerosionissimplyallthepossiblelocationsoftheoriginofBsuchthat(B)ziscontainedinA.Thenitfollowsfromthisinterpretation(andthedefinitionoferosion)thaterosionofAbyBisasubsetofA.Similarly,dilationofasetCbyBisthesetofalllocationsoftheoriginofBˆsuchthattheintersectionofCand(Bˆ)zisnotempty.IftheoriginofBiscontainedinB,thisimpliesthatCisasubsetofthedilationofCbyB.FromEq.(9.3-1),weknowthatA◦B=(AB)⊕B.LetCdenotetheerosionofAbyB.ItwasalreadyestablishedthatCisasubsetofA.Fromtheprecedingdiscussion,weknowalsothatCisasubsetofthedilationofCbyB.ButCisasubsetofA,sotheopeningofAbyB(theerosionofAbyBfollowedbyadilationoftheresult)isasubsetofA.Problem9.18课后答案网Itwaspossibletoreconstructthethreelargesquarestotheiroriginalsizebe-causetheywerenotcompletelyerodedandthegeometryoftheobjectsandwww.hackshp.cnstructuringelementwasthesame(i.e.,theyweresquares).Thisalsowouldhavebeentrueiftheobjectsandstructuringelementswererectangular.However,acompletereconstruction,forinstance,bydilatingarectanglethatwaspartiallyerodedbyacircle,wouldnotbepossible.Problem9.20ThekeydifferencebetweentheLakeandtheothertwofeaturesisthatthefor-merformsaclosedcontour.Assumingthattheshapesareprocessedoneatatime,abasictwo-stepapproachfordifferentiatingbetweenthethreeshapesisasfollows:khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 77khdaw.comFigureP9.22Step1.Applyanend-pointdetectortotheobject.Ifnoendpointsarefound,theobjectisaLake.OtherwiseitisaBayoraLine.Step2.TherearenumerouswaystodifferentiatebetweenaBayandaLine.Oneofthesimplestistodeterminealinejoiningthetwoendpointsoftheob-ject.IftheANDoftheobjectandthislinecontainsonlytwopoints,thefig-ureisaBay.OtherwiseitisaLine.Therearepathologicalcasesinwhichthistestwillfail,andadditionalintelligenceneedstobebuiltintotheprocess,butthesepathologicalcasesbecomelessprobablewithincreasingresolutionofthethinnedfigures.课后答案网Problem9.22(a)WithreferencetotheexampleshowninFig.P9.22,theboundarythatre-www.hackshp.cnsultsfromusingthestructuringelementinFig.9.15(c)generallyformsan8-connectedpath(leftmostfigure),whereastheboundaryresultingfromthestruc-turingelementinFig.9.13(b)formsa4-connectedpath(rightmostfigure).Problem9.23(a)Ifthespheresarenotallowedtotouch,thesolutionoftheproblemstartsbydeterminingwhichpointsarebackground(black)points.Todothis,wepickablackpointontheboundaryoftheimageanddetermineallblackpointscon-nectedtoitusingaconnectedcomponentalgorithm(Section9.5.3).Thesecon-khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 78CHAPTER9.PROBLEMSOLUTIONSnectedcomponentsarelabelswithavaluedifferentfrom1or0.Theremainingblackpointsareinteriortospheres.Wecanfillallsphereswithwhitebyapply-ingtheholefillingalgorithminSection9.5.2untilallinteriorblackpointshavebeenturnedintowhitepoints.Thealertstudentwillrealizethatiftheinteriorpointsarealreadyknown,theycanallbeturnedsimplyintowhitepointsthusfillingthesphereswithouthavingtodoregionfillingasaseparateprocedure.Problem9.24DenotetheoriginalimagebyA.Createanimageofthesamesizeastheorigi-nal,butconsistingofall0s,callitB.Chooseanarbitrarypointlabeled1inA,khdaw.comcallitp1,andapplytheconnectedcomponentalgorithm.Whenthealgorithmconverges,aconnectedcomponenthasbeendetected.LabelandcopyintoBthesetofallpointsinAbelongingtotheconnectedcomponentsjustfound,setthosepointsto0inAandcallthemodifiedimageA1.Chooseanarbitrarypointlabeled1inA1,callitp2,andrepeattheprocedurejustgiven.IfthereareKcon-nectedcomponentsintheoriginalimage,thisprocedurewillresultinanimageconsistingofall0safterKapplicationsoftheprocedurejustgiven.ImageBwillcontainKlabeledconnectedcomponents.Problem9.27ErosionisthesetofpointszsuchthatB,translatedbyz,iscontainedinA.IfBisasinglepoint,thisdefinitionwillbesatisfiedonlybythepointscomprisingA,soerosionofAbyBissimplyA.Similarly,dilationisthesetofpointszsuchthatBˆ(Bˆ=Binthiscase),translatedbyz,overlapsAbyatleastonepoint.BecauseB课后答案网isasinglepoint,theonlysetofpointsthatsatisfythisdefinitionisthesetofpointscomprisingA,sothedilationofAbyBisA.Problem9.29www.hackshp.cnConsiderfirstthecaseforn=1:"#c!c(1)(1)E(F)=E(F)GGcc=[(FB)∪G]ccc=(FB)∩G c=Fc⊕Bˆ∩Gcccc=F⊕B∩G"#c(1)c=DGc(F)khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 79wherethethirdstepfollowsfromDeMorganslaw,(A∪B)c=Ac∩Bc,thefourthstepfollowsfromthedualitypropertyoferosionanddilation(seeSection9.2.3),thefifthstepfollowsfromthesymmetryoftheSE,andthelaststepfollowsfrom(2)thedefinitionofgeodesicdilation.Thenextstep,E(F),wouldinvolvetheGgeodesicerosionoftheaboveresult.Butthatresultissimplyaset,sowecouldobtainitintermsofdilation.Thatis,wewouldcomplementtheresultjustmen-tioned,complementG,computethegeodesicdilationofsize1ofthetwo,andcomplementtheresult.Continuinginthismannerweconcludethat"#c!c(n)(1)(n−1)EG=DGcEG(F)"#c(1)(n−1)ckhdaw.com=DGcDGcF.Similarly,"#c!c(1)(1)D(F)=D(F)GGcc=[(F⊕B)∩G]ccc=(F⊕B)∪G c=FcBˆ∪Gcccc=FB∪G"#c(1)c=EGc(F).Asbefore,课后答案网"#c!c(n)(1)(n−1)D=EcD(F)GGG"#cwww.hackshp.cn(1)(n−1)c=EGcEGcF.Problem9.31(a)Considerthecasewhenn=2cc[(F2B)]=[(FB)B]c=(FB)⊕Bˆ=Fc⊕Bˆ⊕Bˆ=Fc⊕2Bˆkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 80CHAPTER9.PROBLEMSOLUTIONSwherethesecondandthirdlinesfollowfromthedualitypropertyinEq.(9.2-5).Foranarbitrarynumberoferosions,cc[(FnB)]=[(F(n−1)B)B]c=[(F(n−1)B)]⊕Bˆwhich,whenexpanded,willyield[(FnB)]c=Fc⊕nBˆ.(b)Provedinasimilarmanner.Problem9.33(a)FromEq.(9.6-1),ckhdaw.comcfb=minf(x+s,y+t)(s,t)∈bc=−max−f(x+s,y+t)(s,t)∈b=max−f(x+s,y+t)(s,t)∈b=−f⊕bˆ=fc⊕bˆ.Thesecondstepfollowsfromthedefinitionofthecomplementofagray-scalefunction;thatis,theminimumofasetofnumbersisequaltothenegativeofthemaximumofthenegativeofthosenumbers.Thethirdstepfollowsfromthedefinitionofthecomplement.Thefourthstepfollowsfromthedefinitionofgray-scaledilationinEq.(9.6-2),usingthefactthatbˆ(x,y)=b(−x−y).Thelaststepfollowsfromthedefinitionofthecomplement,课后答案网−f=fc.Theotherdualitypropertyisprovedinasimilarmanner.(c)Weprovethefirstdualityproperty.Startwiththeageodesicdilationofsize1:www.hackshp.cn"#c!cD(1)f=D(1)fggcc=(f⊕b)∧gcc=−−(f⊕b)∨−gc=−(f⊕b)∨−gccc=(f⊕b)∨gccc=(fb)∨g"#c(1)c=Egcf.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 81khdaw.comFigureP9.35Thesecondstepfollowsfromthedefinitionofgeodesicdilation.Thethirdstepfollowsfromthefactthatthepoint-wiseminimumoftwosetsofnumbersisthenegativeofthepoint-wisemaximumofthetwonumbers.Thefourthandfifthstepsfollowfromthedefinitionofthecomplement.Thesixthstepfollowsfromthedualityofdilationanderosion(weusedthegivenfactthatbˆ=b).Thelaststepfollowsfromthedefinitionofgeodesicerosion.(2)Thenextstepintheiteration,Dgf,wouldinvolvethegeodesicdilationofsize1oftheprecedingresult.Butthatresultissimplyaset,sowecouldobtainitintermsoferosion.Thatis,wewouldcomplementtheresultjustmentioned,complementg,computethegeodesicerosionofthetwo,andcomplementtheresult.Continuinginthismannerweconcludethat课后答案网"#c(n)(1)(n−1)cDg(f)=EgcEgcf.www.hackshp.cnTheotherpropertyisprovedinasimilarway.Problem9.35(a)ThenoisespikesareofthegeneralformshowninFig.P9.35(a),withotherpossibilitiesinbetween.Theamplitudeisirrelevantinthiscase;onlytheshapeofthenoisespikesisofinterest.ToremovethesespikesweperformanopeningwithacylindricalstructuringelementofradiusgreaterthanRmax,asshowninFig.P9.35(b).Notethattheshapeofthestructuringelementismatchedtotheknownshapeofthenoisespikes.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 82CHAPTER9.PROBLEMSOLUTIONSProblem9.36(a)Colortheimageborderpixelsthesamecolorastheparticles(white).CalltheresultingsetofborderpixelsB.Applytheconnectedcomponentalgorithm(Section9.5.3).AllconnectedcomponentsthatcontainelementsfromBareparticlesthathavemergedwiththeborderoftheimage.khdaw.com课后答案网www.hackshp.cnkhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com Chapter10ProblemSolutionskhdaw.comProblem10.1Expandf(x+Δx)intoaTaylorseriesaboutx:(Δx)f(x+Δx)=f(x)+Δxf(x)+f(x)+···2!TheincrementinthespatialvariablexisdefinedinSection2.4.2tobe1,sobylettingΔx=1andkeepingonlythelineartermsweobtaintheresultf(x)=f(x+1)−f(x)whichagreeswithEq.(10.2-1).课后答案网Problem10.2www.hackshp.cnThemaskswouldhavethecoefficientsshowninFig.P10.2.Eachmaskwouldyieldavalueof0whencenteredonapixelofanunbroken3-pixelsegmentori-entedinthedirectionfavoredbythatmask.Conversely,theresponsewouldbea+2whenamaskiscenteredonaone-pixelgapina3-pixelsegmentorientedinthedirectionfavoredbythatmask.Problem10.4(a)Thelineswerethickerthanthewidthofthelinedetectormasks.Thus,when,forexample,amaskwascenteredonthelineitsawaconstantareaandgavearesponseof0.83khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 84CHAPTER10.PROBLEMSOLUTIONSFigureP10.2khdaw.comEdgesandtheirprofilesGradientimagesandtheirprofiles课后答案网FigureP10.5Problem10.5www.hackshp.cn(a)ThefirstrowinFig.P10.5showsastep,ramp,andedgeimage,andhorizontalprofilesthroughtheircenters.Similarly,thesecondrowshowsthecorrespond-inggradientimagesandhorizontalprofilesthroughtheircenters.Thethindarkbordersintheimagesareincludedforclarityindefiningthebordersoftheim-ages;theyarenotpartoftheimagedata.Problem10.7FigureP10.7showsthesolution.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 85khdaw.comFigureP10.7Problem10.9课后答案网ConsiderfirsttheSobelmasksofFigs.10.14and10.15.Asimplewaytoprovethatthesemasksgiveisotropicresultsforedgesegmentsorientedatmultiplesof45◦istoobtainthemaskresponsesforthefourgeneraledgesegmentsshownwww.hackshp.cninFig.P10.9,whichareorientedatincrementsof45◦.TheobjectiveistoshowthattheresponsesoftheSobelmasksareindistinguishableforthesefouredges.ThatthisisthecaseisevidentfromTableP10.9,whichshowstheresponseofeachSobelmasktothefourgeneraledgesegments.Weseethatineachcasetheresponseofthemaskthatmatchestheedgedirectionis(4a−4b),andtheresponseofthecorrespondingorthogonalmaskis0.Theresponseofthere-mainingtwomasksiseither(3a−3b)or(3b−3a).Thesigndifferenceisnotsignificantbecausethegradientiscomputedbyeithersquaringortakingtheabsolutevalueofthemaskresponses.ThesamelineofreasoningappliestothePrewittmasks.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 86CHAPTER10.PROBLEMSOLUTIONSFigureP10.9TableP10.9khdaw.comEdgeHorizontalVertical+45◦−45◦directionSobel(gx)Sobel(gy)Sobel(g45)Sobel(g−45)Horizontal4a−4b03a−3b3b−3aVertical04a−4b3a−3b3a−3b+45◦3a−3b3a−3b4a−4b0−45◦3b−3a3a−3b04a−4bProblem10.11(a)Theoperatorsareasfollows(negativenumbersareshownunderlined):111110101011111110101011000101101101000101101101课后答案网111011101110111011101110Problem10.13(a)Thelocalaverageatapointwww.hackshp.cn(x,y)inanimageisgivenby1f¯(x,y)=zin2zi∈SxywhereSxyistheregionintheimageencompassedbythen×naveragingmaskwhenitiscenteredat(x,y)andtheziaretheintensitiesoftheimagepixelsinthatregion.Thepartial∂f¯/∂x=f¯(x+1,y)−f¯(x,y)khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 87isthusgivenby11∂f¯/∂x=2zi−2zinnzi∈Sx+1,yzi∈SxyThefirstsummationontherightcanbeinterpretedasconsistingofallthepixelsinthesecondsummationminusthepixelsinthefirstrowofthemask,plustherowpickedupbythemaskasitmovedfrom(x,y)to(x+1,y).Thus,wecanwritetheprecedingequationas11∂f¯/∂x=zi−zin2n2zi∈Sx+1,yzi∈Sxy"+,khdaw.com11=zi+(sumofpixelsinnewrow)n2n2zi∈Sxy(11−(sumofpixelsin1strow)−zin2n2zi∈Sxyn−1n−1y+y+221n+11n−1=f(x+,k)−f(x−,k)n22n22k=y−n−1k=y−n−122"y+n−1(21n+1n−1=f(x+,k)−f(x−,k).n222n−1k=y−2Thisexpressiongivesthevalueof∂f¯/∂xatcoordinates(x,y)ofthesmoothedimage.Similarly,课后答案网11∂f¯/∂y=2zi−2zinnzi∈Sx,y+1zi∈Sxy"+,11=www.hackshp.cn2zi+2(sumofpixelsinnewcol)nnzi∈Sxy(11−(sumofpixelsin1stcol)−zin2n2zi∈Sxyn−1n−1x+x+221n+11n−1=f(k,y+)−f(k,y−)n22n22n−1n−1k=x−k=x−22"x+n−1(21n+1n−1=f(k,y+)−f(k,y−).n222n−1k=x−2khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 88CHAPTER10.PROBLEMSOLUTIONSTheedgemagnitudeimagecorrespondingtothesmoothedimagef¯(x,y)isthengivenby$M¯(x,y)=(∂f¯/∂x)2+(∂f¯/∂y)2.Problem10.14(a)Weproceeedasfollows∞∞Average∇2G(x,y)=∇2G(x,y)dxdy−∞−∞∞∞x2+y2−2σ2−x2+y2=e2σ2dxdyσ4khdaw.com−∞−∞∞∞1−x2−y22=xe2σ2dxe2σ2dyσ4−∞−∞∞∞1−y2−x22+ye2σ2dye2σ2dxσ4−∞−∞∞2−x2+y2−e2σ2dxdyσ2−∞1=2πσ×σ22πσσ41+2πσ×σ22πσσ422πσ2−σ2课后答案网=4π−4π=0thefourthlinefollowsfromthefactthatwww.hackshp.cn∞1−z222variance(z)=σ=ze2σ2dz2πσ−∞and∞1−z2e2σ2dz=1.2πσ−∞Problem10.15(b)Theanswerisyesforfunctionsthatmeetcertainmildconditions,andifthezerocrossingmethodisbasedonrotationaloperatorsliketheLoGfunc-khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 89tionandathresholdof0.GeometricalpropertiesofzerocrossingsingeneralareexplainedinsomedetailinthepaperOnEdgeDetection,byV.TorreandT.Poggio,IEEETrans.PatternAnalysisandMachineIntell.,vol.8,no.2,1986,pp.147-163.Lookingupthispaperandbecomingfamiliarwiththemathematicalunderpinningsofedgedetectionisanexcellentreadingassignmentforgraduatestudents.Problem10.18(a)Equation(10.2-21)canbewritteninthefollowingseparableformx2+y2−khdaw.comG(x,y)=e2σ2−x2−y2=e2σ2e2σ2=G(x)G(y).FromEq.(3.4-2)andtheprecedingequation,theconvolutionofG(x,y)andf(x,y)canbewrittenasaaG(x,y)Hf(x,y)=G(s,t)f(x−s,y−t)s=−at=−aaas2t2−−=e2σ2e2σ2f(x−s,y−t)s=−at=−a⎡⎤aas2t2=e−2σ2⎣e−2σ2f(x−s,y−t)⎦课后答案网s=−at=−awherea=(n−1)/2andnisthesizeofthen×nmaskobtainedbysamplingEq.(10.2-21).Theexpressioninsidethebracketsisthe1-Dconvolutionoftheexponentialterm,e−twww.hackshp.cn2/2σ2,withtherowsoff(x,y).Thentheoutersummationistheconvolutionofe−s2/2σ2withthecolumnsoftheresult.Statedanotherway,G(x,y)Hf(x,y)=G(x)HG(y)Hf(x,y).Problem10.19(a)AsEq.(10.2-25)shows,thefirsttwostepsofthealgorithmcanbesumma-rizedintooneequation:g(x,y)=∇2[G(x,y)Hf(x,y)].khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 90CHAPTER10.PROBLEMSOLUTIONSUsingthedefinitionoftheLaplacianoperatorwecanexpressthisequationas∂2∂2g(x,y)=G(x,y)Hf(x,y)+G(x,y)Hf(x,y)∂x2∂y2∂2∂2=G(x)HG(y)Hf(x,y)+G(x)HG(y)Hf(x,y)∂x2∂y2−x2wherethesecondstepfollowsfromProblem10.18,withG(x)=e2σ2andG(y)=y2−e2σ2.Thetermsinsidethetwobracketsarethesame,soonlytwoconvolutionsarerequiredtoimplementthem.UsingthedefinitionsinSection10.2.1,thekhdaw.compartialsmaybewrittenas∂2f=f(x+1)+f(x−1)−2f(x)∂x2and∂2f=f(y+1)+f(y−1)−2f(y).∂y2Thefirsttermcanbeimplementedviaconvolutionwitha1×3maskhavingcoefficientscoefficients,[1−21],andthesecondwitha3×1maskhavingthesamecoefficients.Letting∇2and∇2representthesetwooperatormasks,wexyhavethefinalresult:g(x,y)=∇2HG(x)HG(y)Hf(x,y)+∇2HG(x)HG(y)Hf(x,y)xywhichrequiresatotaloffourdifferent1-Dconvolutionoperations.(b)课后答案网Ifweusethealgorithmasstatedinthebook,convolvinganM×Nimagewithann×nmaskwillrequiren2×M×Nmultiplications(seethesolutiontoProblem10.18).Thenconvolutionwitha3×3Laplacianmaskwilladdanother9×M×Nwww.hackshp.cnmultiplicationsforatotalof(n2+9)×M×Nmultiplications.De-composinga2-Dconvolutioninto1-Dpassesrequires2nMNmultiplications,asindicatedinthesolutiontoProblem10.18.Twomoreconvolutionsofthere-sultingimagewiththe3×1and1×3derivativemasksadds3MN+3MN=6MNmultiplications.Thecomputationaladvantageisthen(n2+9)MNn2+9A==2nMN+6MN2n+6whichisindependentofimagesize.Forexample,forn=25,A=11.32,soittakesontheorderof11timesmoremultiplicationsifdirect2-Dconvolutionisused.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 91Problem10.21Parts(a)through(c)areshowninrows2through4ofFig.P10.21.Problem10.22(b)θ=cot−1(2)=26.6◦andρ=(1)sinθ=0.45.Problem10.23(a)Point1hascoordinatesx=0andy=0.SubstitutingintoEq.(10.2-38)yieldsρ=0,which,inaplotofρvs.θ,isastraightline.khdaw.com(b)Onlytheorigin(0,0)wouldyieldthisresult.(c)Atθ=+90◦,itfollowsfromEq.(10.2-38)thatx·(0)+y·(1)=ρ,ory=ρ.Atθ=−90◦,x·(0)+y·(−1)=ρ,or−y=ρ.Thusthereflectiveadjacency.Problem10.26Theessenceofthealgorithmistocomputeateachstepthemeanvalue,m1,ofallpixelswhoseintensitiesarelessthanorequaltothepreviousthresholdand,similarly,themeanvalue,m2,ofallpixelswithvaluesthatexceedthethreshold.Letpi=ni/ndenotetheithcomponentoftheimagehistogram,whereniisthenumberofpixelswithintensityi,andnisthetotalnumberofpixelsintheimage.Validvaluesofiareintherange0≤i≤L−1,whereListhenumberonintensitiesandiisaninteger.Themeanscanbecomputedatanystepkofthealgorithm:课后答案网I(k−1)m1(k)=ipi/P(k)i=0wherewww.hackshp.cnI(k−1)P(k)=pii=0andL−1m2(k)=ipi/[1−P(k)].i=I(k−1)+1ThetermI(k−1)isthesmallestintegerlessthanorequaltoT(k−1),andT(0)isgiven.Thenextvalueofthethresholdisthen1T(k+1)=[m1(k)+m2(k)].2khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 92CHAPTER10.PROBLEMSOLUTIONSEdgesandtheirprofilesGradientimagesandtheirprofileskhdaw.comLaplacianimagesandtheirprofilesImagesfromSteps1and2oftheMarr-HildrethalgorithmandtheirprofilesFigureP10.21Problem10.27AsstatedinSection10.3.2,weassumethattheinitialthresholdischosenbe-tweentheminimumandmaximumintensitiesintheimage.Tobegin,considerthehistograminFig.P10.27.Itshowsthethresholdatthekthiterativestep,andthefactthatthemean课后答案网m1(k+1)willbecomputedusingtheintensitiesgreaterthanT(k)timestheirhistogramvalues.Similarly,m2(k+1)willbecomputedus-ingvaluesofintensitieslessthanorequaltoT(k)timestheirhistogramvalues.Then,T(kwww.hackshp.cn+1)=0.5[m1(k+1)+m2(k+1)].Theproofconsistsoftwoparts.First,weprovethatthethresholdisboundedbetween0andL−1.Thenweprovethatthealgorithmconvergestoavaluebetweenthesetwolimits.Toprovethatthethresholdisbounded,wewriteT(k+1)=0.5[m1(k+1)+m2(k+1)].Ifm2(k+1)=0,thenm1(k+1)willbeequaltotheimagemean,M,andT(k+1)willequalM/2whichislessthanL−1.Ifm2(k+1)iszero,thesamewillbetrue.Bothm1andm2cannotbezerosimultaneously,soT(k+1)willalwaysbegreaterthan0andlessthanL−1.Toproveconvergence,wehavetoconsiderthreepossibleconditions:1.T(k+1)=T(k),inwhichcasethealgorithmhasconverged.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 93Histogramvalues}}Intensity0IntensitiesTk()IntensitiesL1usedtocomputeusedtocomputekhdaw.commk2(+1)mk1(+1)FigureP10.272.T(k+1)T(k),inwhichcasethethresholdmovestotheright.Incase(2),whenthethresholdvaluemovestotheleft,m2willdecreaseorstaythesameandm1willalsodecreaseorstaythesame(thefactthatm1decreasesorstaysthesameisnotnecessarilyobvious.Ifyoudontseeit,drawasimplehis-togramandconvinceyourselfthatitdoes),dependingonhowmuchthethresh-oldmovedandonthevaluesofthehistogram.However,neitherthresholdcan课后答案网increase.Ifneithermeanchanges,thenT(k+2)willequalT(k+1)andthealgo-rithmwillstop.Ifeither(orboth)meandecreases,thenT(k+2)0,whichweknowisthelowerboundforT.Becausethethresholdal-waysdecreasesorstopschanging,nooscillationsarepossible,sothealgorithmisguaranteedtoconverge.Case(3)causesthethresholdtomovetheright.AnargumentsimilartotheprecedingdiscussionestablishesthatifthethresholdstartsmovingtotherightitwilleitherconvergeorcontinuemovingtotherightandwillstopeventuallywithavaluelessthanL−1.Becausethethresholdalwaysincreasesorstopschanging,nooscillationsarepossible,sothealgorithmisguaranteedtoconverge.khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 94CHAPTER10.PROBLEMSOLUTIONSHistogramvaluesImin}}Intensity0L/2ML1IntensitiesIntensitiesofbackgroundofobjectskhdaw.comFigureP10.29Problem10.29Thevalueofthethethresholdatconvergenceisindependentoftheinitialvalueiftheinitialvalueofthethresholdischosenbetweentheminimumandmax-imumintensityoftheimage(weknowfromProblem10.27thatthealgorithmconvergesunderthiscondition).ThefinalthresholdisnotindependentoftheinitialvaluechosenforTifthatvaluedoesnotsatisfythiscondition.Forex-ample,consideranimagewiththehistograminFig.P10.29.SupposethatweselecttheinitialthresholdT(1)=0.Then,atthenextiterativestep,m2(2)=0,m1(2)=M,andT(2)=M/2.Becausem2(2)=0,itfollowsthatm2(3)=0,m1(3)=M,andT(3)=T(2)=M/2.Anyfollowingiterationswillyieldthesameresult,sothealgorithmconvergeswiththewrongvalueofthreshold.Ifwehadstartedwith课后答案网Imin0,andsgn(wTy)=−1otherwise.Substitutingthepartialderivativeintothegeneralexpressiongivenintheprob-lemstatementgivesc- .Tw(k+1)=w(k)+y(k)−y(k)sgnw(k)y(k)2khdaw.comwherey(k)isthetrainingpatternbeingconsideredatthekthiterativestep.Sub-stitutingthedefinitionofthesgnfunctionintothisresultyields)T0ifw(k)y(k)w(k+1)=w(k)+cy(k)otherwisewherec>0andw(1)isarbitrary.Thisexpressionagreeswiththeformulationgivenintheproblemstatement.Problem12.14Thesingledecisionfunctionthatimplementsaminimumdistanceclassifierfortwoclassesisoftheform1d(x)=xT(m−m)−(mTm−mTm).ijijiijj课后答案网2Thus,foraparticularpatternvectorx,whendij(x)>0,xisassignedtoclassω1and,whendij(x)<0,xisassignedtoclassω2.Valuesofxforwhichdij(x)=0areontheboundary(hyperplane)separatingthetwoclasses.Bylettingwww.hackshp.cnw=(m−m)andw=−1(mTm−mTm),wecanexpresstheabovedecisionijn+12iijjfunctionintheformd(x)=wTx−w.n+1Thisisrecognizedasalineardecisionfunctioninndimensions,whichisimple-mentedbyasinglelayerneuralnetworkwithcoefficientswk=(mik−mjk)k=1,2,...,nand1θ=w=−(mTm−mTm).n+1iijj2khdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 114CHAPTER12.PROBLEMSOLUTIONSProblem12.16(a)WhenP(ωi)=P(ωj)andC=I.(b)No.Theminimumdistanceclassifierimplementsadecisionfunctionthatistheperpendicularbisectorofthelinejoiningthetwomeans.Iftheprobabilitydensitiesareknown,theBayesclassifierisguaranteedtoimplementanopti-mumdecisionfunctionintheminimumaveragelosssense.Thegeneralizeddeltarulefortraininganeuralnetworksaysnothingaboutthesetwocriteria,soitcannotbeexpectedtoyieldthedecisionfunctionsinProblems12.14or12.15.Problem12.18khdaw.comAllthatisneededistogenerateforeachclasstrainingvectorsoftheformx=(x1,x2)T,wherex1isthelengthofthemajoraxisandx2isthelengthofthemi-noraxisoftheblobscomprisingthetrainingset.Thesevectorswouldthenbeusedtotrainaneuralnetworkusing,forexample,thegeneralizeddeltarule.(Becausethepatternsarein2D,itisusefultopointouttostudentsthattheneu-ralnetworkcouldbedesignedbyinspectioninthesensethattheclassescouldbeplotted,thedecisionboundaryofminimumcomplexityobtained,andthenitscoefficientsusedtospecifytheneuralnetwork.Inthiscasetheclassesarefarapartwithrespecttotheirspread,somostlikelyasinglelayernetworkimple-mentingalineardecisionfunctioncoulddothejob.)Problem12.20ThefirstpartofEq.(12.3-3)isprovedbynotingthatthedegreeofsimilarity,k,isnon-negative,so课后答案网D(A,B)=1/k≥0.Similarly,thesecondpartfollowsfromthefactthatkisinfinitewhen(andonlywhen)theshapesareidentical.ToprovethethirdpartweusethedefinitionofDtowritewww.hackshp.cnD(A,C)≤max[D(A,B),D(B,C)]as111≤max,kackabkbcor,equivalently,kac≥min[kab,kbc]wherekijisthedegreeofsimilaritybetweenshapeiandshapej.Recallfromthedefinitionthatkisthelargestorderforwhichtheshapenumbersofshapeiandshapejstillcoincide.AsFig.12.24(b)illustrates,thisisthepointatwhichthefiguresseparateaswemovefurtherdownthetree(notethatkincreaseskhdaw.com若侵犯了您的版权利益,敬请来信通知我们!℡www.khdaw.com 115khdaw.comFigureP12.20aswemovefurtherdownthetree).Weprovethatkac≥min[kab,kbc]bycon-tradiction.Forkac≤min[kab,kbc]tohold,shapeAhastoseparatefromshapeCbefore(1)shapeAseparatesfromshapeB,and(2)beforeshapeBseparatesfromshapeC,otherwisekab≤kacorkbc≤kac,whichautomaticallyvio-latestheconditionkac

您可能关注的文档