




已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 铁概考试题库及答案
- 2025版物业服务公司《公司电梯巡查记录表》模板空表
- 北京市门头沟区2023-2024学年八年级上学期期末考试语文考题及答案
- 新安医院面试题目及答案
- 写初中物理题目及答案大全
- 小学政治试讲题目及答案
- 企业行政文档分类及归档工具包
- 六年级话题作文欣赏艺术品600字15篇
- 高一物理力学的表面积与体积计算实例教案
- 企业员工培训需求分析工具与模板
- 动力网站-艾默生netsure801电源系统用户手册
- DB3302T 1079-2018 管线探测技术规程
- 大唐集团公司工作票、操作票使用和管理标准(版)
- 医学皮肤部年度业务报告课件
- 21年一消防工程师继续教育题
- 中国政治思想史完整版课件
- 太阳能热水系统问题与解决方案
- (完整版)物理化学上教案
- D型便梁工法(二)
- 氟化物与牙健康
- 疑难路段处理能力及室项目分析
评论
0/150
提交评论