




已阅读5页,还剩97页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
.,1,Ch3GraphicsandImageDataRepresentations,.,2,1.Brieflyexplainwhyweneedtobeabletohavelessthan24-bitcolorandwhythismakesforaproblem.Generally,whatdoweneedtodotoadaptivelytransform24-bitcolorvaluesto8-bitones?Answer:Maynotbeabletohandlesuchlargefilesizesornothave24-bitdisplays.Thecolorswillbesomewhatwrong,however.,.,3,Weneedtoclustercolorpixelssoastobestusethebitsavailabletobeasaccurateaspossibleforthecolorsinanimage.Inmoredetail:varianceminimizationquantizationvmquant.mMinimumvariancequantizationallocatesmoreoftheavailablecolormapentriestocolorsthatappearfrequentlyintheinputimageandallocatesfewerentriestocolorsthatappearinfrequently.Thereforeifthereareforexamplemanyreds,asinaredapple,therewillbemoreresolutionintheredpartofthecolorcube.AnexcellentimplementationofthisideaisWusColorQuantizer(seeGraphicsGemsvol.II,pp.126-133).,.,4,2.Supposewedecidetoquantizean8-bitgrayscaleimagedowntojust2bitsofaccuracy.Whatisthesimplestwaytodoso?Whatrangesofbytevaluesintheoriginalimagearemappedtowhatquantizedvalues?Answer:,.,5,.,6,0to6364to127128to191192to255Thenreconstructionvaluesshouldbetakenasthemiddleoftheseranges;i.e.,3296160224,.,7,3.Supposewehavea5-bitgrayscaleimage.Whatsizeofordereddithermatrixdoweneedtodisplaytheimageona1-bitprinter?Answer:25=32levels=n2+1withn=6;thereforeneedD(6),.,8,4.Supposewehaveavailable24bitsperpixelforacolorimage.However,wenoticethathumansaremoresensitivetoRandGthantoBinfact,1.5timesmoresensitivetoRorGthantoB.Howcouldwebestmakeuseofthebitsavailable?Answer:ratiois3:3:2,sousebits9:9:6forR:G:B.,.,9,5.Atyourjob,youhavedecidedtoimpressthebossbyusingupmorediskspaceforthecompanysgrayscaleimages.Insteadofusing8bitsperpixel,youdliketouse48bitsperpixelinRGB.Howcouldyoustoretheoriginalgrayscaleimagessothatinthenewformattheywouldappearthesameastheyusedto,visually?,.,10,Answer:48bitsRGBmeans16bitsperchannel:sore-storetheoldints,whichwere28,asnewints216.Butthenthenewvalueshavetobecreatedbymultiplyingtheoldvaluesby28,sothate.g.amid-grayisstillamid-gray.Aswell,havetoduplicatetheoldgrayintoallthreeofR,G,B.,.,11,6.ForthecolorLUTproblem,tryoutthemedian-cutalgorithmonasampleimage.Explainbrieflywhyitisthatthisalgorithm,carriedoutonanimageofredapples,putsmorecolorgradationintheresulting24-bitcolorimagewhereitisneeded,amongthereds.,.,12,7.Writedownanalgorithm(pseudocode)forcalculatingacolorhistogramforRGBdata.Answer:inthist256256256;imageisanappropriatestructwithintfieldsred,green,bluefori=0.(MAX_Y-1)forj=0.(MAX_X-1)R=imagexy.red;G=imagexy.green;B=imagexy.blue;histRGB+;,.,13,Ch4ColorinImageandVideo,.,14,Exercise3,1.Considerthefollowingsetofcolor-relatedterms:(a)wavelength(b)colorlevel(c)brightness(d)whitenessHowwouldyoumatcheachofthefollowing(morevaguelystated)characteristicstoeachoftheaboveterms?,.,15,(a)luminance)brightness(b)hue)wavelength(c)saturation)whiteness(d)chrominance)colorlevel,.,16,2.Whatcolorisoutdoorlight?Forexample,aroundwhatwavelengthwouldyouguessthepeakpowerisforaredsunset?Forblueskylight?Answer:450nm,650nm.,.,17,3.(a)Supposeimagesarenotgammacorrectedbyacamcorder.Generally,howwouldtheyappearonascreen?Answer:Toodarkatthelow-intensityend.,.,18,(b)Whathappensifweartificiallyincreasetheoutputgammaforstoredimagepixels?(WecandothisinPhotoshop.)Whatistheeffectontheimage?Answer:Increasethenumberofbrightpixelsweincreasethenumberofpixelsthatmaptotheupperhalfoftheoutputrange.Thiscreatesalighterimage.andincidentally,wealsodecreasehighlightcontrastandincreasecontrastintheshadows.,.,19,Ch5FundamentalConceptsinVideo,.,20,1.NTSCvideohas525linesperframeand63.6secperline,with20linesperfieldofverticalretraceand10.9sechorizontalretrace.(a)Wheredoesthe63.6seccomefrom?Answer:,.,21,(b)Whichtakesmoretime,horizontalretraceorverticalretrace?Howmuchmoretime?Answer:,.,22,2.Whichdoyouthinkhaslessdetectableflicker,PALinEuropeorNTSCisNorthAmerica?Justifyyourconclusion.Answer:PALcouldbebettersincemorelines,butisworsebecauseoffewerframes/sec.,.,23,3.SometimesthesignalsfortelevisionarecombinedintofewerthanallthepartsrequiredforTVtransmission.(a)Altogether,howmanyandwhatarethesignalsusedforstudiobroadcastTV?Answer:5R,G,B,audio,sync;cansay“blanking”instead,too.,.,24,(b)HowmanyandwhatsignalsareusedinS-Video?WhatdoesS-Videostandfor?Answer:Luminance+chrominance=2+audio+sync=4Separatedvideo(c)HowmanysignalsareactuallybroadcastforstandardanalogTVreception?Whatkindofvideoisthatcalled?Answer:1Composite,.,25,4.OnesometimeshearsthattheoldBetamaxformatforvideotape,whichcompetedwithVHSandlost,wasactuallyabetterformat.Howwouldsuchastatementbejustified?Answer:Betamaxhasmoresamplesperline:500,asopposedto240.,.,26,5.WedontseeflickeronaworkstationscreenwhendisplayingvideoatNTSCframerate.Whydoyouthinkthismightbe?Answer:NTSCvideoisdisplayedat30framespersec,soflickerispossiblypresent.Nonetheless,whenvideoisdisplayedonaworkstationscreenthevideobufferisreadandthenrenderedonthescreenatamuchhigherrate,typicallytherefreshrate60to90Hzsonoflickerisperceived.,.,27,(Andinfactmostdisplaysystemshavedoublebuffers,completelyremovingflicker:sincemainmemoryismuchfasterthanvideomemory,keepacopyofthescreeninmainmemoryandthenwhenwethisbufferupdateiscomplete,thewholebufferiscopiedtothevideobuffer.),.,28,6.Digitalvideouseschromasubsampling.Whatisthepurposeofthis?Whyisitfeasible?Answer:Humanvisionhaslessacuityincolorvisionthanithasinblackandwhiteonecandistinguishcloseblacklinesmoreeasilythancoloredlines,whichsoonareperceivedjustamasswithouttextureasthelinesmoveclosetoeachother.Therefore,itisacceptableperceptuallytoremoveagooddealofcolorinformation.Inanalog,thisisaccomplishedinbroadcastTVbysimplyassigningasmallerfrequencybandwidthtocolorthantoblackandwhiteinformation.Indigital,we“decimate”thecolorsignalbysubsampling(typically,averagingnearbypixels).Thepurposeistohavelessinformationtotransmitorstore.,.,29,7.WhatarethemostsalientdifferencesbetweenordinaryTVandHDTV?Answer:Morepixels,andaspectratioof16/9ratherthan4/3.WhatwasthemainimpetusforthedevelopmentofHDTV?Immersion“beingthere”.Goodforinteractivesystemsandapplicationssuchasvirtualreality.,.,30,8.Whatistheadvantageofinterlacedvideo?Whataresomeofitsproblems?Answer:Positive:Reduceflicker.Negative:Introducesserratededgestomovingobjectsandflickersalonghorizontaledges.,.,31,9.Onesolutionthatremovestheproblemsofinterlacedvideoistode-interlaceit.Whycanwenotjustoverlaythetwofieldstoobtainade-interlacedimage?Suggestsomesimplede-interlacingalgorithmsthatretaininformationfrombothfields.Answer:Thesecondfieldiscapturedatalatertimethanthefirst,creatingatemporalshiftbetweentheoddandevenlinesoftheimage.,.,32,Themethodsusedtoovercomethisarebasicallytwo:non-motioncompensatedandmotioncompensatedde-interlacingalgorithms.Thesimplestnon-motioncompensatedalgorithmiscalled“Weave”;itperformslinearinterpolationbetweenthefieldstofillinafull,“progressive”,frame.Adefectwiththismethodisthatmovingedgesshowupwithsignificantserratedlinesnearthem.,.,33,Abetteralgorithmiscalled“Bob”:inthisalgorithm,onefieldisdiscardedandaafullframeisinterpolatedfromasinglefield.Thismethodgeneratesnomotionartifacts(butofcoursedetailisreducedintheresultingprogressiveimage).,.,34,Inavertical-temporal(VT)de-interlacer,verticaldetailisreducedforhighertemporalfrequencies.Other,non-linear,techniquesarealsoused.Motioncompensatedde-interlacingperformsinter-fieldmotioncompensationandthencombinesfieldssoastomaximizetheverticalresolutionoftheimage.,.,35,Ch6BasicsofDigitalAudio,.,36,Exercise1,1.MyoldSoundblastercardisan8bitcard.(a)Whatisit8bitsof?(b)WhatisthebestSQNR(SignaltoQuantizationNoiseRatio)itcanachieve?,.,37,Answer:,.,38,2.Ifasetofearprotectorsreducesthenoiselevelby30dB,howmuchdotheyreducetheintensity(thepower)?Answer:Areductioninintensityof1000.,.,39,3.Alossofaudiooutputatbothendsoftheaudiblefrequencyrangeisinevitable,duetothefrequencyresponsefunctionofanaudioamplifierandthemedium(e.g.,tape).(a)Iftheoutputwas1voltforfrequenciesatmidrange,whatistheoutputvoltageafteralossof3dBat18kHz?(b)Tocompensatefortheloss,alistenercanadjustthegain(andhencetheoutput)onanequalizeratdifferentfrequencies.Ifthelossremains3dBandagainthroughtheequalizeris6dBat18kHz,whatistheoutputvoltagenow?Hint:Assumelog102=0.3.,.,40,.,41,4.Supposethesamplingfrequencyis1.5timesthetruefrequency.Whatisthealiasfrequency?Answer:0.5timestheTrueFrequency.,.,42,5.Inacrowdedroom,wecanstillpickoutandunderstandanearbyspeakersvoice,notwithstandingthefactthatgeneralnoiselevelsmaybehigh.Thisisknownasthecocktail-partyeffect.Thewayitoperatesisthatourhearingcanlocalizeasoundsourcebytakingadvantageofthedifferenceinphasebetweenthetwosignalsenteringourleftandrightears(binauralauditoryperception).Inmono,wecouldnothearourneighborsconversationwellifthenoiselevelwereatallhigh.Statehowyouthinkakaraokemachineworks.,.,43,Hint:Themixforcommercialmusicrecordingsissuchthatthe“pan”parameterisdifferentgoingtotheleftandrightchannelsforeachinstrument.Thatis,foraninstrument,eithertheleftorrightchannelisemphasized.Howwouldthesingerstracktiminghavetoberecordedtomakeiteasytosubtractthesoundofthesinger(whichistypicallydone)?,.,44,Answer:Forthesinger,leftandrightisalwaysmixedwiththeexactsamepan.Thisinformationcanbeusedtosubtractoutthesoundofthesinger.Todoso,replacetheleftchannelbythedifferencebetweentheleftandtheright,andboostthemaximumamplitude;andsimilarlyfortherightchannel.,.,45,6.ThedynamicrangeofasignalVistheratioofthemaximumtotheminimumabsolutevalue,expressedindecibels.Thedynamicrangeexpectedinasignalistosomeextentanexpressionofthesignalquality.Italsodictatesthenumberofbitspersampleneededtoreducethequantizationnoisetoanacceptablelevel.Forexample,wemaywanttoreducethenoisetoatleastanorderofmagnitudebelowVmin.Supposethedynamicrangeforasignalis60dB.Canweuse10bitsforthissignal?Canweuse16bits?,.,46,.,47,.,48,7.SupposethedynamicrangeofspeechintelephonyimpliesaratioVmax/Vminofabout256.Usinguniformquantization,howmanybitsshouldweusetoencodespeechtomakethequantizationnoiseatleastanorderofmagnitudelessthanthesmallestdetectabletelephonicsound?Answer:Vmin=Vmax/256.ThequantizationnoiseisVmax=2exp(n),ifweusenbits.Thereforetogetquantizationnoiseaboutafactorof16belowtheminimumsound,weneed12bits.,.,49,8.Perceptualnonuniformityisageneraltermfordescribingthenonlinearityofhumanperception.Thatis,whenacertainparameterofanaudiosignalvaries,humansdonotnecessarilyperceivethedifferenceinproportiontotheamountofchange.(a)Brieflydescribeatleasttwotypesofperceptualnonuniformitiesinhumanauditoryperception.(b)WhichoneofthemdoesA-law(or-law)attempttoapproximate?Whycoulditimprovequantization?,.,50,Answer:(a):(1)Logarithmicresponsetomagnitude,(2)differentsensitivitytodifferentfrequencies,(b):A-law(or-law)approximatesthenon-linearresponsetomagnitude.Itmakesbetteruseofthelimitednumberofbitsavailableforeachquantizeddata.,.,51,9.Supposeasignalcontainstonesat1,10,and21kHzandissampledattherate12kHz(andthenprocessedwithanantialiasingfilterlimitingoutputto6kHz).Whattonesareincludedintheoutput?Hint:Mostoftheoutputconsistsofaliasing.Answer:1kHz,12-10=2kHz,and2*12-21=3kHztonesarepresent.,.,52,10.(a)CanasingleMIDImessageproducemorethanonenotesounding?Answer:No.(b)Isitpossibleformorethanonenotetosoundatonceonaparticularinstrument?Ifso,howisitdoneinMIDI?Answer:YesusetwoNoteOnmessagesforonechannelbeforetheNoteOffmessageissent.,.,53,(c)IstheProgramChangeMIDImessageaChannelMessage?Whatdoesthismessageaccomplish?BasedontheProgramChangemessage,howmanydifferentinstrumentsarethereinGeneralMIDI?Why?Answer:Yes.Replacespatchforachannel.128,sincehasonedatabyte,whichmustbein0.127.,.,54,(d)Ingeneral,whatarethetwomainkindsofMIDImessages?Intermsofdata,whatisthemaindifferencebetweenthetwotypesofmessages?Withinthosetwocategories,listthedifferentsubtypes.Answer:ChannelMessagesandSystemMessages.Channelvoicemessages,Channelmodemessages,Systemreal-timemessages,Systemcommonmessages,Systemexclusivemessages.Channelmessageshaveastatusbytewithleadingmost-significant-bitset,and4bitsofchannelinformation;Systemmessageshavethe4MSBsset.,.,55,11.(a)Giveanexample(inEnglish,nothex)ofaMIDIvoicemessage.Answer:NoteOn(b)Describethepartsofthe“assembler”statementforthemessage.Answer:opcode=Noteon;data=note,orkey,number;data=“velocity”=loudness.,.,56,(c)WhatdoesaProgramChangemessagedo?SupposeProgramchangeishex“PB=0.4;PC=0.1.Forsimplicity,letsalsoassumethatbothencoderanddecoderknowthatthelengthofthemessagesisalways3,sothereisnoneedforaterminator.i.HowmanybitsareneededtoencodethemessageBBBbyHuffmancoding?Answer:6bits.HuffmanCode:A-0,B-10,C-11;orA-1,B-00,C-01.,.,67,ii.HowmanybitsareneededtoencodethemessageBBBbyarithmeticcoding?,.,68,4、(a)WhataretheadvantagesofAdaptiveHuffmanCodingcomparedtotheoriginalHuffmanCodingalgorithm?(b)AssumethattheAdaptiveHuffmanCodingisusedtocodeaninformationsourceSwithavocabularyoffourletters(a,b,c,d).Beforeanytransmission,theinitialcodingisa=00,b=01,c=10,d=11.AsintheexampleillustratedinFig.7.7,aspecialsymbolNEWwillbesentbeforeanyletterifitistobesentthefirsttime.,.,69,Fig.7.11istheAdaptiveHuffmanTreeaftersendinglettersaabb.Afterthat,theadditionalbitstreamreceivedbythedecoderforthenextfewlettersis01010010101.i.Whataretheadditionallettersreceived?ii.DrawtheadaptiveHuffmantreesaftereachoftheadditionallettersisreceived.,.,70,.,71,Answer:(a)Likeanyotheradaptivecompressionalgorithms,itismoredynamic,thereforeoffersbettercompressionandworksevenwhenpriorstatisticsofthedatadistributionisunavailableasitisinmostmultimediaapplications.Italsosavestheoverheadsincenosymboltableneedstobetransmitted.(b)(i)Theadditionallettersreceivedare“b(01)a(01)c(0010)c(101)”.(ii)Thetreesareasbelow.,.,72,.,73,.,74,5、Considerthedictionary-basedLZWcompressionalgorithm.Supposethealphabetisthesetofsymbols0,1.Showthedictionary(symbolsetsplusassociatedcodes)andoutputforLZWcompressionoftheinput0110011,.,75,.,76,6、Considerthedictionary-basedLZWcompressionalgorithm.Supposethealphabetisthesetofsymbolsa,b,c.Showthedictionary(symbolsetsplusassociatedcodes),outputforLZWcompressionoftheinput,.,77,LossyCompressionAlgorithms,.,78,1、Whentheblocksizeis8,thedefinitionoftheDCTisgiveninEq.(8.17).(a)Ifan88grayscaleimageisintherange0.255,whatisthelargestvalueaDCTcoefficientcouldbe,andforwhatinputimage?(Also,statealltheDCTcoefficientvaluesforthatimage.)Answer:WhentheimageisallWHITE,i.e.,allpixelshaveI=255.ThelargestcoefficientistheDCvaluewhichis8*255=2,040.Allothers(ACvalues)arezero.(b)Ifwefirstsubtractthevalue128fromthewholeimageandthencarryouttheDCT,whatistheexacteffectontheDCTvalueF2,3?Answer:ThereisnoeffectonF2,3.Infact,noeffectonanyACvalues.,.,79,(c)Whywouldwecarryoutthatsubtraction?Doesthesubtractionaffectthenumberofbitsweneedtocodetheimage?Answer:Theideahereistoturnitintoazeromeanimage,sowedonotwasteanybitsincodingthemeanvalue.(Thinkofan8*8blockwithintensityvaluesrangingfrom120to135.)(d)Woulditbepossibletoinvertthatsubtraction,intheIDCT?Ifso,how?Answer:Afterdecoding,simplyadd128backtoallpixelvalues.,.,80,ImageCompressionStandards,.,81,1.(a)JPEGusestheDiscreteCosineTransform(DCT)forimagecompression.i.WhatisthevalueofF(0,0)iftheimagef(i,j)isasbelow?ii.WhichACcoefficientF(u,v)isthelargestforthisf(i,j)?Why?IsthisF(u,v)positiveornegative?Why?,.,82,Answer:i.8timesaverage-intensity=8*110=880.ii.|F(1,0)|isthelargest,becausetheintensityvaluechangeissimilartoahalfcosinecycleverticallywithinthe8*8block.F(1,0)isnegative,becausethephaseofthechangeisoffby180degrees.(Orsimplyput,itisopposite.),.,83,(b)Showindetailhowathree-levelhierarchicalJPEGwillencodetheimageabove,assumingthati.TheencoderanddecoderatallthreelevelsuseLosslessJPEG.ii.Reductionsimplyaverageseach22blockintoasinglepixelvalue.iii.Expansionduplicatesthesinglepixelvaluefourtimes.,.,84,.,85,AssumingP1modeofLosslessJPEG(i.e.,taketheimmediateprecedingpixelasthepredictedvalue),thenthecodewordsgeneratedare:,.,86,2.InJPEG,theDiscreteCosineTtransformisappliedto8*8blocksinanimage.Fornow,letscallitDCT-8.Generally,wecandefineaDCT-NtobeappliedtoNNblocksinanimage.DCT-Nisdefinedas:Givenf(i;j)asbelow,showyourworkforderivingallpixelvaluesofF2(u;v).(Thatis,showtheresultofapplyingDCT-2totheimagebelow.),.,87,.,88,Dividetheimageinto2by2blocks.WeonlyneedtoworkoutthefourcoefficientsforF2(u,v),thentheyllrepeat.F2(0,0)=0,becauseaverageintensityiszero.F2(1,0)=0,becausenochangevertically.F2(0,1)=,=200,.,89,F2(u,v):,.,90,3.Supposeweviewadecompressed512*512JPEGimagebutuseonlythecolorpartofthestoredimageinformation,nottheluminancepart,todecompress.Whatdoesthe512*512colorimagelooklike?AssumeJPEGiscompressedusinga4:2:0scheme.,.,91,Answer:Withoutallcomponents,wecannotrestorethecolorimage.Assumingthatweareonlyrecoveringthemonochromepart,thenfirst,eachpixelisanenlarged(duplicated)versionofasubsampled2*2block,sotheimageis“pixellated”lookingblocky.Second,althoughtheluminanceandchrominanceimagesareoftencorrelated,thereisnoguaranteethattheywillcapturethesameshapeandtextureinformation.Dependingontheimagecontent,theimagedisplayedmaybehighlydistortedintermsofshapeandtexture.,.,92,4.(a)HowmanyprincipalmodesdoesJPEGhave?Whataretheirnames?(b)Inthehierarchicalmodel,explainbrieflywhywemustincludeanencode/decodecycleonthecodersidebeforetransmittingdifferenceimagestothedecodeside.(c)WhatarethetwomethodsusedtodecodeonlypartoftheinformationinaJPEGfile,sothattheimagecanbecoarselydisplayedquicklyanditerativelyincreasedinquality?,
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 肉桂温阳散寒茶行业跨境出海项目商业计划书
- 经济型洗衣机行业跨境出海项目商业计划书
- 美容行业数据分析平台行业跨境出海项目商业计划书
- 第1课搜集与处理文字-2025-2026学年初中信息技术七年级上册(人教版)-说课稿
- 市政管廊(管沟)浅埋暗挖施工质量保证措施
- 物业智能能源审计服务创新创业项目商业计划书
- 老年志愿者服务平台创新创业项目商业计划书
- 进口葡萄酒流通创新创业项目商业计划书
- 2025年沥青路面养护车项目合作计划书
- 安装监控知情同意书2025
- 2025年新版精二药品培训试题及答案
- 2025年秋季广东湛江市教育局直属五校联合面向全国招聘教职员70人备考考试题库附答案解析
- 2025-2026学年高一上学期第一次月考英语试卷(北师大版)
- 秋季安全生产知识培训课件
- 消费者画像分析报告2025年宠物用品行业消费者行为研究
- 2025山东菏泽鲁西新区招聘城市社区工作者招聘80人笔试参考题库附答案解析
- 市容安全培训课件
- 各位小伙们好下面我来讲解下4键键盘的使用
- 仪表-xk3102s使用手册
- AutoCAD批处理数字增减
- 隧道工程施工监理工作流程图.docx
评论
0/150
提交评论