资源描述
Ch3 Graphics and Ch3 Graphics and Image Data Image Data RepresentationsRepresentations1.Briefly explain why we need to be able to have less than 24-bit color and why this makes for a problem.Generally,what do we need to do to adaptively transform 24-bit color values to 8-bit ones?Answer:Answer:May not be able to handle such large file sizes May not be able to handle such large file sizes or not have 24-bit displays.or not have 24-bit displays.The colors will be somewhat wrong,however.The colors will be somewhat wrong,however.We need to cluster color pixels so as to best We need to cluster color pixels so as to best use the bits available to be as accurate as use the bits available to be as accurate as possible for the colors in an image.In more possible for the colors in an image.In more detail:variance minimization quantizationdetail:variance minimization quantizationvmquant.m Minimum variance quantization vmquant.m Minimum variance quantization allocates more of the available colormap allocates more of the available colormap entries to colors that appear frequently in entries to colors that appear frequently in the input image and allocates fewer entries the input image and allocates fewer entries to colors that appear infrequently.to colors that appear infrequently.Therefore if there are for example many reds,Therefore if there are for example many reds,as in a red apple,there will be more as in a red apple,there will be more resolution in the red part of the color resolution in the red part of the color cube.An excellent implementation of this cube.An excellent implementation of this idea is Wus Color Quantizer(see Graphics idea is Wus Color Quantizer(see Graphics Gems vol.II,pp.126-133).Gems vol.II,pp.126-133).2.Suppose we decide to quantize an 8-bit grayscale image down to just 2 bits of accuracy.What is the simplest way to do so?What ranges of byte values in the original image are mapped to what quantized values?Answer:Answer:0to6364to127128to191192to255Thenreconstructionvaluesshouldbetakenasthemiddleoftheseranges;i.e.,32961602243.Suppose we have a 5-bit grayscale image.What size of ordered dither matrix do we need to display the image on a 1-bit printer?Answer:Answer:25=32levels=n2+1withn=6;thereforeneedD(6)4.Suppose we have available 24 bits per pixel for a color image.However,we notice that humans are more sensitive to R and G than to B in fact,1.5 times more sensitive to R or G than to B.How could we best make use of the bits available?Answer:Answer:ratio is 3:3:2,so use bits 9:9:6 for R:G:B.ratio is 3:3:2,so use bits 9:9:6 for R:G:B.5.At your job,you have decided to impress the boss by using up more disk space for the companys grayscale images.Instead of using 8 bits per pixel,youd like to use 48 bits per pixel in RGB.How could you store the original grayscale images so that in the new format they would appear the same as they used to,visually?Answer:Answer:48 bits RGB means 16 bits per channel:so re-48 bits RGB means 16 bits per channel:so re-store the old ints,which were store the old ints,which were 28,as new,as new ints ints 216.But then the new values have to be.But then the new values have to be created by multiplying the old values by created by multiplying the old values by 28,so that e.g.a mid-gray is still a mid-gray.As so that e.g.a mid-gray is still a mid-gray.As well,have to duplicate the old gray into all well,have to duplicate the old gray into all three of R,G,B.three of R,G,B.6.For the color LUT problem,try out the median-cut algorithm on a sample image.Explain briefly why it is that this algorithm,carried out on an image of red apples,puts more color gradation in the resulting 24-bit color image where it is needed,among the reds.7.Write down an algorithm(pseudocode)for calculating a color histogram for RGB data.Answer:Answer:inthist256256256;imageisanappropriatestructwithintfieldsred,green,bluefori=0.(MAX_Y-1)forj=0.(MAX_X-1)R=imagexy.red;G=imagexy.green;B=imagexy.blue;histRGB+;Ch4 Color in Image Ch4 Color in Image and Videoand VideoExercise 3 1.Consider the following set of color-related terms:(a)wavelength(b)color level(c)brightness(d)whitenessHow would you match each of the following(more vaguely stated)characteristics to each of the above terms?(a)luminance)brightnessbrightness(b)hue)wavelengthwavelength(c)saturation)whitenesswhiteness(d)chrominance)color levelcolor level2.What color is outdoor light?For example,around what wavelength would you guess the peak power is for a red sunset?For blue sky light?Answer:Answer:450 nm,650 nm.450 nm,650 nm.3.(a)Suppose images are not gamma corrected by a camcorder.Generally,how would they appear on a screen?Answer:Answer:Too dark at the low-intensity end.Too dark at the low-intensity end.(b)What happens if we artificially increase the output gamma for stored image pixels?(We can do this in Photoshop.)What is the effect on the image?Answer:Answer:Increase the number of bright pixels we Increase the number of bright pixels we increase the number of pixels that map to the increase the number of pixels that map to the upper half of the output range.This creates a upper half of the output range.This creates a lighter image.and incidentally,we also lighter image.and incidentally,we also decrease highlight contrast and increase decrease highlight contrast and increase contrast in the shadows.contrast in the shadows.Ch5 Fundamental Ch5 Fundamental Concepts in VideoConcepts in Video1.NTSC video has 525 lines per frame and 63.6 sec per line,with 20 lines per field of vertical retrace and 10.9 sec horizontal retrace.(a)Where does the 63.6 sec come from?Answer:Answer:(b)Which takes more time,horizontal retrace or vertical retrace?How much more time?Answer:Answer:2.Which do you think has less detectable flicker,PAL in Europe or NTSC is North America?Justify your conclusion.Answer:Answer:PAL could be better since more lines,but is PAL could be better since more lines,but is worse because of fewer frames/sec.worse because of fewer frames/sec.3.Sometimes the signals for television are combined into fewer than all the parts required for TV transmission.(a)Altogether,how many and what are the signals used for studio broadcast TV?Answer:Answer:5 5R,G,B,audio,sync;can say“blanking”R,G,B,audio,sync;can say“blanking”instead,too.instead,too.(b)How many and what signals are used in S-Video?What does S-Video stand for?Answer:Answer:Luminance+chrominance=2+audio+sync=4Luminance+chrominance=2+audio+sync=4Separated videoSeparated video(c)How many signals are actually broadcast for standard analog TV reception?What kind of video is that called?Answer:Answer:1 1CompositeComposite4.One sometimes hears that the old Betamax format for videotape,which competed with VHS and lost,was actually a better format.How would such a statement be justified?Answer:Answer:Betamax has more samples per line:500,as Betamax has more samples per line:500,as opposed to 240.opposed to 240.5.We dont see flicker on a workstation screen when displaying video at NTSC frame rate.Why do you think this might be?Answer:Answer:NTSC video is displayed at 30 frames per sec,so NTSC video is displayed at 30 frames per sec,so flicker is possibly present.Nonetheless,when flicker is possibly present.Nonetheless,when video is displayed on a workstation screen the video is displayed on a workstation screen the video buffer is read and then rendered on the video buffer is read and then rendered on the screen at a much higher rate,typically the screen at a much higher rate,typically the refresh rate 60 to 90 Hz so no flicker is refresh rate 60 to 90 Hz so no flicker is perceived.perceived.(And in fact most display systems have double(And in fact most display systems have double buffers,completely removing flicker:since main buffers,completely removing flicker:since main memory is much faster than video memory,keep a memory is much faster than video memory,keep a copy of the screen in main memory and then when copy of the screen in main memory and then when we this buffer update is complete,the whole we this buffer update is complete,the whole buffer is copied to the video buffer.)buffer is copied to the video buffer.)6.Digital video uses chroma subsampling.What is the purpose of this?Why is it feasible?Answer:Answer:Human vision has less acuity in color vision Human vision has less acuity in color vision than it has in black and whiteone can than it has in black and whiteone can distinguish close black lines more easily distinguish close black lines more easily than colored lines,which soon are perceived than colored lines,which soon are perceived just a mass without texture as the lines just a mass without texture as the lines move close to each other.Therefore,it is move close to each other.Therefore,it is acceptable perceptually to remove a good acceptable perceptually to remove a good deal of color information.In analog,this deal of color information.In analog,this is accomplished in broadcast TV by simply is accomplished in broadcast TV by simply assigning a smaller frequency bandwidth to assigning a smaller frequency bandwidth to color than to black and white information.color than to black and white information.In digital,we“decimate”the color signal In digital,we“decimate”the color signal by subsampling(typically,averaging nearby by subsampling(typically,averaging nearby pixels).The purpose is to have less pixels).The purpose is to have less information to transmit or store.information to transmit or store.7.What are the most salient differences between ordinary TV and HDTV?Answer:Answer:More pixels,and aspect ratio of 16/9 rather than More pixels,and aspect ratio of 16/9 rather than 4/3.4/3.What was the main impetus for the development of HDTV?Immersion “being there”.Good for Immersion “being there”.Good for interactive systems and applications such as interactive systems and applications such as virtual reality.virtual reality.8.What is the advantage of interlaced video?What are some of its problems?Answer:Answer:Positive:Reduce flicker.Negative:Introduces Positive:Reduce flicker.Negative:Introduces serrated edges to moving objects and flickers serrated edges to moving objects and flickers along horizontal edges.along horizontal edges.9.One solution that removes the problems of interlaced video is to de-interlace it.Why can we not just overlay the two fields to obtain a de-interlaced image?Suggest some simple de-interlacing algorithms that retain information from both fields.Answer:Answer:The second field is captured at a later time than The second field is captured at a later time than the first,creating a temporal shift between the the first,creating a temporal shift between the odd and even lines of the image.odd and even lines of the image.The methods used to overcome this are basically The methods used to overcome this are basically two:non-motion compensated and motion two:non-motion compensated and motion compensated de-interlacing pensated de-interlacing algorithms.The simplest non-motion compensated algorithm is The simplest non-motion compensated algorithm is called“Weave”;it performs linear called“Weave”;it performs linear interpolation between the fields to fill in a interpolation between the fields to fill in a full,“progressive”,frame.A defect with this full,“progressive”,frame.A defect with this method is that moving edges show up with method is that moving edges show up with significant serrated lines near them.significant serrated lines near them.A better algorithm is called“Bob”:in this A better algorithm is called“Bob”:in this algorithm,one field is discarded and a a full algorithm,one field is discarded and a a full frame is interpolated from a single field.This frame is interpolated from a single field.This method generates no motion artifacts(but of method generates no motion artifacts(but of course detail is reduced in the resulting course detail is reduced in the resulting progressive image).progressive image).In a vertical-temporal(VT)de-interlacer,In a vertical-temporal(VT)de-interlacer,vertical detail is reduced for higher temporal vertical detail is reduced for higher temporal frequencies.Other,non-linear,techniques are frequencies.Other,non-linear,techniques are also used.also used.Motion compensated de-interlacing performs inter-Motion compensated de-interlacing performs inter-field motion compensation and then field motion compensation and then combinesfields so as to maximize the vertical combinesfields so as to maximize the vertical resolution of the image.resolution of the image.Ch6 Basics of Digital Ch6 Basics of Digital AudioAudioExercise 1 1.My old Soundblaster card is an 8bit card.(a)What is it 8 bits of?(b)What is the best SQNR(Signal to Quantization Noise Ratio)it can achieve?Answer:2.If a set of ear protectors reduces the noise level by 30 dB,how much do they reduce the intensity(the power)?Answer:Answer:A reduction in intensity of 1000.A reduction in intensity of 1000.3.A loss of audio output at both ends of the 3.A loss of audio output at both ends of the 3.A loss of audio output at both ends of the 3.A loss of audio output at both ends of the audible frequency range is inevitable,due audible frequency range is inevitable,due audible frequency range is inevitable,due audible frequency range is inevitable,due to the frequency response function of an to the frequency response function of an to the frequency response function of an to the frequency response function of an audio amplifier and the medium(e.g.,tape).audio amplifier and the medium(e.g.,tape).audio amplifier and the medium(e.g.,tape).audio amplifier and the medium(e.g.,tape).(a)If the output was 1 volt for frequencies(a)If the output was 1 volt for frequencies(a)If the output was 1 volt for frequencies(a)If the output was 1 volt for frequencies at midrange,what is the output voltage at midrange,what is the output voltage at midrange,what is the output voltage at midrange,what is the output voltage after a loss of after a loss of after a loss of after a loss of 3333dB at 18 kHz?dB at 18 kHz?dB at 18 kHz?dB at 18 kHz?(b)To compensate for the loss,a listener can(b)To compensate for the loss,a listener can(b)To compensate for the loss,a listener can(b)To compensate for the loss,a listener can adjust the gain(and hence the output)on an adjust the gain(and hence the output)on an adjust the gain(and hence the output)on an adjust the gain(and hence the output)on an equalizer at different frequencies.If the equalizer at different frequencies.If the equalizer at different frequencies.If the equalizer at different frequencies.If the loss remains loss remains loss remains loss remains 3333dB and a gain through the dB and a gain through the dB and a gain through the dB and a gain through the equalizer is 6 dB at 18 kHz,what is the equalizer is 6 dB at 18 kHz,what is the equalizer is 6 dB at 18 kHz,what is the equalizer is 6 dB at 18 kHz,what is the output voltage now?output voltage now?output voltage now?output v
展开阅读全文