多媒体期末总结

  有 修 改 的 话 , 会 用 蓝 色 标 \ \color{blue}有修改的话,会用蓝色标  

多媒体总结

一.简答题汇总

  1. Briefly explain the advantages of logarithmic quantisation when applied to speech signals?

Answer: Logarithmic quantisation provides lower quantisation errors for low amplitude values.(对低幅值有利)

  1. what is the advantage of backward adaptive quantisation compared with forward adaptive quantisation?

Answer: Backward adaptive quantisation does not require transmission of quantisation steps and has lower delay as does not require lookahead.(后向自适应量化不需要传输量化步骤,有着更低的延时)

  1. Describe the difference between lossless and lossy compression,Given two examples of signals where lossy compression is appropriate?

Answer:
Lossless compression prefectly reconstructs the orign signal while lossly compression produces an accurate representation of the orignal signal,Lossly compression is appreciate for speech signal and audio signal.
(无损压缩可以重建原始信号,有损压缩智能精确描述原始信号)

  1. Brifely explain the difference a gray scale digital image and a color digital image?

Answer:
(1)Gray scale image is black and white.Only one colour component per pixel with a range of values from 0 to 255.(灰度图图像每个像素仅有一个颜色成分)
(2) Colour image have multiple component per pixel,representing Red,Green and Blue.(彩色图像每个像素有红绿蓝三种颜色成分)

  1. What is the purpose of the transforming in image compression?

Answer: Transforming aims to compact the energy of the image into a few significant coefficients,This allow for efficient coding.

  1. what criteria should be used when choosing the resolution for a digital image?

Answer:Should be chosen so that Subjective distoration is minimised.(主观失真最小化)

  1. Brifely compare the RGB color space with YCrCb color space?

Answer: Y is made up of R,G and B color components,represents the luminance or black and white color components,Cr and Cb is the combination of the luminance and one of the color components .They represent colour

  1. What is the zig-zag scanning pattern designed to achieve in JPEG image compression?

Answer: This is designed to order the coefficients in magnitude.This then allows run/length or entropy encoding as it will lead to long sequences of zeros.

  1. What are the two components that need to be compressed in video compression?

Answer:The image frame and the temporal information.

  1. Explain the difference between interframe coding and intraframe coding of video frames.what advantages does interframe coding have over intraframe coding of video?

Answer:
(1) Interframe coding:coding the information between frames
(2) Intraframe coding :code the information within the frame,
interframe coding leads to lower bit rates than intraframe coding.

  1. Brifely explain motion estimate and motion compensation and why it is used in video coding ?

Answer:
(1)Motion estimate determines how block of pixels have moved from one frame to the next.
(2)Motion vector derived from motion estimate predicts the current frame based on previous frame.
Motion estimate and motion compensation are used to code the temporal information of video using interframe coding and reduce bit rates compared to intraframe coding only.

  1. Brifely explain the 3-step algorithm used in motion estimate and what advantage it has compared with the Exhaustive Block Matching Algorithm?

Answer:
(1)step 1: predict the motion using 9 points in search regin,finding the closest match.
(2)step 2:center the search block of 0.5 the size as step 1 at the vector resulting in the minimum error from step 1,perform 8 matches around this point.
(3)Step 3:Repeat step 2 for a search regin 0.5 the size of the step 2,choose the vector giving the closest match as the motion vector,This has the advantage of a much shorter search time.

  1. Brifely explain how MPEG-4 treats video and compare with how MPEG-1 and MPEG-2 treats video,Brifely explain one advantage that the MPEG-4 approach to video compression has over MPEG-1 and MPEG-2 approach?

Answer:
MPEG-4:object-based,coded video object separately.(基于object)
MPEG-1/MPEG-2:frame based,Doesn’t divided the frame into objects.(基于frame)
An advantage of MPEG-4 is that is has more scability,more interactivity and lower bit rates.

  1. why is it important to study HVS in order to develop still image and video related application?

Answer:
Sensitive to moderately changing patterns.
Not sensitive to rapidly changing patterns.
Accurate measurement requires stabilizing intrinic rapid eye-movement.

  1. Describe the important steps in compressing an image using JPEG?

Answer: Source Image data ---->DCT Transform ---->Quantisation—>Entropy Encoding

  1. What are the major improvements in JPEG 2000?

Answer:
(1)Excellent low bit performance.
(2)Superior quaility in text compression
(3)No blockiness (没有块效应)
块效应:块效应是所有基于DCT技术压缩可能出现的现象。造成的原因主要是传输误码。

  1. Why was the YUV system capable of catering for both black & white and colour television?

Answer:Y is the luminance,it is the grayscale image ,The inital transmissions were in Y only,Later when Y,U,V were telecast,black and white tvs could display black and white using Y only and colour could use all the components to display colour.

  1. Explain the difference between I ,P and B frames used in MPEG-1 video compression,What is the advantage of increasing number of B frames compared to the number of I and P frames?

Answer:
I f r a m e s − − − I n t r a f r a m e   c o d e d   f r a m e s ( 帧 内 编 码 帧 ) \color{blue} I frames---Intraframe \ coded \ frames (帧内编码帧) IframesIntraframe coded frames
P frames-- Backward predicted frames
B frames-- Bi-directionally prediction frames
For a given distortion rate,using more B frames leads to a lower bit rate.
B   f r a m e   h a s   h i g h e r   c o m p r e s s i o n   r a t i o   t h a n   P   f r a m e . \color{blue}B \ frame \ has \ higher \ compression \ ratio \ than \ P \ frame. B frame has higher compression ratio than P frame.

  1. which transform is capable of producing the maximum energy compaction?

Answer: DCT

  1. What are the drawbacks in JPEG?

Answer: Blockiness , poor quality in text compression. The poblem lies in 8*8 blok size

  1. How to improve this scheme?

Answer: Using a large block size 8* 8 in JPEG 2000,this is tackled,Again JPEG tackles poor text quality

  1. what are the key stages involved in the JPEG encoder?

Answer:
(1) Perform the DCT on a block of 8-by-8 pixels.
(2) Quantise the DCT coefficients using uniform quantzation and the quantization table
(3) Perform a zig-zag scan of the DCT coefficients
(4) Perform entropy coding of the resulting quantized coefficients.

  1. Why is the DCT used in image compression?

Answer:
The DCT of an image result in many transform coefficients that are close to 0,this means that they do not need to be used in the reconstruction transform.Hence,only a few coefficients,corresponding the those with the highest magnitude,need to be used to get a good quality reconstruction.

二.计算题

  1. RGB–>YUV
    (1) (0,255,0) (2) (0,255,255)
    [ Y U V ] = [ 0.299 0.587 0.114 − 0.147 − 0.289 0.436 0.615 − 0.515 − 0.100 ] [ R G B ] \left[ \begin{matrix} Y \\ U\\ V \end{matrix} \right] = \left[ \begin{matrix} 0.299 & 0.587 & 0.114\\ -0.147 & -0.289 & 0.436\\ 0.615 & -0.515 & -0.100 \end{matrix} \right] \left[ \begin{matrix} R \\ G\\ B \end{matrix} \right] YUV=0.2990.1470.6150.5870.2890.5150.1140.4360.100RGB
    Answer

[ Y 1 U 1 V 1 ] = [ 0.299 0.587 0.114 − 0.147 − 0.289 0.436 0.615 − 0.515 − 0.100 ] [ 0 255 0 ] = [ 149.685 − 73.695 − 131.325 ] \left[ \begin{matrix} Y1 \\ U1\\ V1 \end{matrix} \right] = \left[ \begin{matrix} 0.299 & 0.587 & 0.114\\ -0.147 & -0.289 & 0.436\\ 0.615 & -0.515 & -0.100 \end{matrix} \right] \left[ \begin{matrix} 0 \\ 255\\ 0 \end{matrix} \right]=\left[ \begin{matrix} 149.685 \\ -73.695\\ -131.325 \end{matrix} \right] Y1U1V1=0.2990.1470.6150.5870.2890.5150.1140.4360.10002550=149.68573.695131.325
[ Y 2 U 2 V 2 ] = [ 0.299 0.587 0.114 − 0.147 − 0.289 0.436 0.615 − 0.515 − 0.100 ] [ 0 255 255 ] = [ 178.755 37.485 − 156.825 ] \left[ \begin{matrix} Y2 \\ U2\\ V2 \end{matrix} \right] = \left[ \begin{matrix} 0.299 & 0.587 & 0.114\\ -0.147 & -0.289 & 0.436\\ 0.615 & -0.515 & -0.100 \end{matrix} \right] \left[ \begin{matrix} 0 \\ 255\\ 255 \end{matrix} \right]=\left[ \begin{matrix} 178.755 \\ 37.485\\ -156.825 \end{matrix} \right] Y2U2V2=0.2990.1470.6150.5870.2890.5150.1140.4360.1000255255=178.75537.485156.825

  1. Use Dithering to map the following 4*4 image into an image with a range with a range 0-16
    [ 35 37 89 127 198 245 258 21 78 124 128 56 198 187 39 128 ] \left[ \begin{matrix} 35& 37&89&127 \\ 198& 245&258&21\\ 78&124&128&56\\ 198&187&39&128 \end{matrix} \right] 35198781983724512418789258128391272156128
    Dithering matrix
    [ 0 8 2 10 12 4 14 6 3 11 1 9 15 7 13 5 ] \left[ \begin{matrix} 0& 8&2&10 \\ 12& 4&14&6\\ 3&11&1&9\\ 15&7&13&5 \end{matrix} \right] 0123158411721411310695
Answer

1. [ 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 ] × 1 17 = [ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ] \left[ \begin{matrix} 35& 35&35&35 \\ 35& 35&35&35\\ 35&35&35&35\\ 35&35&35&35 \end{matrix} \right] \times\frac{1}{17}= \left[ \begin{matrix} 2& 2&2&2 \\ 2& 2&2&2\\ 2&2&2&2\\ 2&2&2&2 \end{matrix} \right] 35353535353535353535353535353535×171=2222222222222222
compared with dithering matrix:
[ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ] − [ 0 8 2 10 12 4 14 6 3 11 1 9 15 7 13 5 ] = [ 2 − 6 0 − 8 − 10 − 2 − 12 − 4 − 1 − 9 1 − 7 − 13 − 5 − 11 − 3 ] \left[ \begin{matrix} 2& 2&2&2 \\ 2& 2&2&2\\ 2&2&2&2\\ 2&2&2&2 \end{matrix} \right]-\left[ \begin{matrix} 0& 8&2&10 \\ 12& 4&14&6\\ 3&11&1&9\\ 15&7&13&5 \end{matrix} \right]= \left[ \begin{matrix} 2& -6&0&-8\\ -10& -2&-12&-4\\ -1&-9&1&-7\\ -13&-5&-11&-3 \end{matrix} \right] 22222222222222220123158411721411310695=21011362950121118473
if elements is greater than 0,the value is 1,else 0
[ 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 ] \left[ \begin{matrix} 1& 0&0&0\\ 0& 0&0&0\\ 0&0&1&0\\ 0&0&0&0 \end{matrix} \right] 1000000000100000
others are same as the above.

  1. Use the threshold of 128 to map the following image to a binary image.(you may use 0 and 1 binary values).Repeat the process for threshold value of 78?
2341234789
251676749
8815789189
381783489

Answer:

int a[] []=new int[][]{(234,123,47,89},{25,167,47,89},{88,157,89,189},  {38,178,34,89}};
int b[][]= new int[4][4];
int T=128;
for(int i=0;i<4;i++){
  for(int j=0;j<4;j++){
     if(a[i][j]<T)
            b[i][j]=0;
    else
         b[i][j]=1;
      }
  }  
1000
0100
0101
0100

when T=87,the operation is same as above.

  1. Map the above image into a negative image,logarithmic image using c=1.3,Also map it into a power-law mapping c=1.3 and gamma equal to 3?
    Answer:
    注释:考试不写程序,此处写只是为了描述方便

4.1 negative transform

int a[] []=new int[][]{(234,123,47,89},{25,167,47,89},{88,157,89,189},  {38,178,34,89}};    
int b[][]= new int[4][4];
for(int i=0;i<4;i++){
  for(int j=0;j<4;j++){
    b[i][j]=255-a[i][j];
      }
  }  

4.2 logarithmic transform

  int a[] []=new int[][]{(234,123,47,89},{25,167,47,89},{88,157,89,189},  {38,178,34,89}};
  int b[][]= new int[4][4];
  int c=1.3;
for(int i=0;i<4;i++){
  for(int j=0;j<4;j++){
    b[i][j]=c*Math.log(1+a[i][j])/Math.log(2);
      }
  }  

4.3 Power-law transform

  int a[] []=new int[][]{(234,123,47,89},{25,167,47,89},{88,157,89,189},  {38,178,34,89}};
  int b[][]= new int[4][4];
  int c=1.3;
  int r=3;
for(int i=0;i<4;i++){
  for(int j=0;j<4;j++){
    b[i][j]=c*Math.power(a[i][j]/255,r);
      }
  }  
  1. Use 3-pt medain filter on the sequence below?
    16 14 15 12 2 13 15 52 51 50 49

A n s w e r : \color{blue}Answer: Answer:
step1:在队首和队尾填充数据,填充的数据可以比队列里面最小的值还要小的数,或者比队列里面最大的值还要大的数(保证填充的数据不会是中值)
0 16 14 15 12 2 13 15 52 51 50 49 0
step 2:连续三个为一组,对组内三个数据进行排序,求出中值,直至所有组结束
0 , 16 , 14 , ⎵ 14 16 , 14 , 15 , ⎵ 15 14 , 15 , 12 , ⎵ 14 15 , 12 , 2 , ⎵ 12 12 , 2 , 13 , ⎵ 12 2 , 13 , 15 , ⎵ 13 13 , 15 , 52 , ⎵ 15 15 , 52 , 51 , ⎵ 51 52 , 51 , 50 , ⎵ 51 51 , 50 , 49 , ⎵ 50 50 , 49 , 0 , ⎵ 49 \begin{matrix} \underbrace{ 0,16,14 ,} \\ \color{Blue}14 \end{matrix} \begin{matrix} \underbrace{ 16,14 ,15,} \\ \color{Blue}15 \end{matrix} \begin{matrix} \underbrace{ 14,15 ,12,} \\ \color{Blue}14 \end{matrix} \begin{matrix} \underbrace{ 15,12 ,2,} \\ \color{Blue}12 \end{matrix} \begin{matrix} \underbrace{ 12,2,13,} \\ \color{Blue}12 \end{matrix} \begin{matrix} \underbrace{ 2,13 ,15,} \\ \color{Blue}13 \end{matrix} \begin{matrix} \underbrace{ 13,15 ,52,} \\ \color{Blue}15 \end{matrix} \begin{matrix} \underbrace{ 15,52 ,51,} \\ \color{Blue}51 \end{matrix} \begin{matrix} \underbrace{ 52,51 ,50,} \\ \color{Blue}51 \end{matrix} \begin{matrix} \underbrace{ 51,50 ,49,} \\ \color{Blue}50 \end{matrix} \begin{matrix} \underbrace{ 50,49 ,0,} \\ \color{Blue}49 \end{matrix} 0,16,14,14 16,14,15,15 14,15,12,14 15,12,2,12 12,2,13,12 2,13,15,13 13,15,52,15 15,52,51,51 52,51,50,51 51,50,49,50 50,49,0,49

  1. Imagine an image of size 1280*760,if the image is down-sampled to 2:1 in both directions,what is the size of the image?If the image is compressed 16:1,what is the size of the image in kilobytes?(assume a gray-scale image of 8-bit)

A n s w e r : \color{blue}Answer: Answer:
down-sampled: s i z e = 1280 × 760 × 8 2 × 2 × 8 × 1024 = 237.5 k B size=\frac{1280\times760\times 8}{2\times2\times8\times1024}=237.5kB size=2×2×8×10241280×760×8=237.5kB
compressed:
s i z e = 1280 × 760 × 8 16 × 1024 × 8 = 59.375 k B size=\frac{1280\times760\times 8}{16\times1024\times8}=59.375kB size=16×1024×81280×760×8=59.375kB

7.Table 1A lists the probabilities of occurence of the symbols A to E,find Huffman codes to represent each of these symbols?

symbolprobability
A0.16
B0.29
C0.05
D0.36
E0.14

Answer:
在这里插入图片描述
备 注 : 哈 夫 曼 编 码 的 编 码 结 果 不 唯 一 , 但 平 均 码 字 长 度 是 一 样 的 \color{red}备注:哈夫曼编码的编码结果不唯一,但平均码字长度 是一样的
Average codeword length=3*0.16+2*0.29+4*0.05+1*0.36+4*0.14=0.48+0.58+0.2+0.36+0.56=2.18bits/symbol
Compression rate=2.18/3=0.727
此 处 除 的 3 , 是 等 长 编 码 所 需 要 的 最 小 位 数 , 五 个 状 态 ( A , B , C , D , E ) , 因 为 2 3 &gt; 5 &gt; 2 2 , 所 以 取 3 \color{blue}此处除的3,是等长编码所需要的最小位数,五个状态(A,B,C,D,E),因为2^3 &gt;5&gt;2^2,所以取3 3A,B,C,D,E),23>5>223

  • 11
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值