1 / 141

Multimedia Technology

Multimedia Technology. Tutor: Sebastian Keller Email: sebastian.keller@uni-mannheim.de Date: 07.06.2015. Navigation. Exercise Sheet 1 Exercise Sheet 2 Exercise Sheet 3 Exercise Sheet 4 Exercise Sheet 5 Exercise Sheet 6 Exercise Sheet 7 Exercise Sheet 8 Exercise Sheet 9

treva
Download Presentation

Multimedia Technology

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Multimedia Technology Tutor: Sebastian Keller Email: sebastian.keller@uni-mannheim.de Date: 07.06.2015

  2. Navigation • Exercise Sheet 1 • Exercise Sheet 2 • Exercise Sheet 3 • Exercise Sheet 4 • Exercise Sheet 5 • Exercise Sheet 6 • Exercise Sheet 7 • Exercise Sheet 8 • Exercise Sheet 9 • Exercise Sheet 10 • Exercise Sheet 11 (no Slides available) • Exercise Sheet 12 Multimedia Technology Tutorial - Sebastian Keller

  3. Exercise Sheet 1 Exercise 1 Multimedia Technology Exercise 2 Video Compression Exercise 3 Voice over IP Exercise 4 Image Segmentation Multimedia Technology Tutorial - Sebastian Keller

  4. Exercise 1 Multimedia Technology Name five possible applications of multimedia technology and five devices that directly or indirectly make use of them. Solution • Applications • Voice over IP • Video on Demand • Messenger • Face Recognition • Navigation • … • Devices • Microphone • Television • Speakers • Smartphone • Camera • … Multimedia Technology Tutorial - Sebastian Keller

  5. Exercise 2 Video Compression A video has pixels, frames per second, and color-channels (RGB). Each color-channel is encoded with bits. The video is minutes long. No data compression is used. How many gigabytes are necessary to store the video ( gigabyte = bytes)? Solution Byte Byte GB Multimedia Technology Tutorial - Sebastian Keller

  6. Exercise 3 Voice over IP Three students are sharing an internet connection. All three want to use Voice over IP to phone their families at the same time. What possible problem can occur? Solution Voice over IP needs kbit/s in duplex mode. They need an upload rate of kbit/s. That is the maximum upload rate of ADSL. Multimedia Technology Tutorial - Sebastian Keller

  7. Exercise 4 Image Segmentation The pixel, bit gray-scale picture that you find on the next page is given. The pixels' intensities are represented by the decimal numbers. Suggest a way how this picture could be segmented. Solution Use a threshold, e.g. , to determine if a pixel belongs to an object or not. Multimedia Technology Tutorial - Sebastian Keller

  8. Exercise Sheet 2 Exercise 1 Huffman Coding 1 Exercise 2 Huffman Coding 2 Exercise 3 Huffman Coding 3 Exercise 4 Run Length Encoding Multimedia Technology Tutorial - Sebastian Keller

  9. Exercise 1 Huffman Coding 1 Encode the string MISSISSIPPI using the algorithm invented by Huffman. • At first, calculate the relative occurrence of each character. Solution Multimedia Technology Tutorial - Sebastian Keller

  10. Exercise 1 Huffman Coding 1 Encode the string MISSISSIPPI using the algorithm invented by Huffman. • Then, build the Huffman tree accordingly. Solution 0.99 1 0 0.63 1 0 0.27 0 1 0.18 0.36 0.36 0.09 S M P I Multimedia Technology Tutorial - Sebastian Keller

  11. Exercise 1 Huffman Coding 1 Encode the string MISSISSIPPI using the algorithm invented by Huffman. • Determine the codeword of each character. Solution Multimedia Technology Tutorial - Sebastian Keller

  12. Exercise 1 Huffman Coding 1 Encode the string MISSISSIPPI using the algorithm invented by Huffman. • Determine the average length of a codeword. Solution Average length: Multimedia Technology Tutorial - Sebastian Keller

  13. Exercise 1 Huffman Coding 1 Encode the string MISSISSIPPI using the algorithm invented by Huffman. • How large are the savings with regard to an 8-bit coding of the string? Solution Savings: Multimedia Technology Tutorial - Sebastian Keller

  14. Exercise 2 Huffman Coding 2 Huffman coding is used to transmit data between two computers. The string which will be transmitted is MULTI-MEDIA and the output stream of the Huffman coding algorithm is 111 1001 011 1000 110 101 111 010 001 110 000. • Generate the coding table according to the output stream. Use the following columns for the table: Solution Multimedia Technology Tutorial - Sebastian Keller

  15. Exercise 2 Huffman Coding 2 Huffman coding is used to transmit data between two computers. The string which will be transmitted is MULTI-MEDIA and the output stream of the Huffman coding algorithm is 111 1001 011 1000 110 101 111 010 001 110 000. • Determine the average length of a codeword. Solution Average length: Multimedia Technology Tutorial - Sebastian Keller

  16. Exercise 2 Huffman Coding 2 Huffman coding is used to transmit data between two computers. The string which will be transmitted is MULTI-MEDIA and the output stream of the Huffman coding algorithm is 111 1001 011 1000 110 101 111 010 001 110 000. • Determine the percentage savings of the number of bits in comparison to a bytewise transmission using 8-Bit ASCII encoding. Solution Savings: Multimedia Technology Tutorial - Sebastian Keller

  17. Exercise 2 Huffman Coding 2 Huffman coding is used to transmit data between two computers. The string which will be transmitted is MULTI-MEDIA and the output stream of the Huffman coding algorithm is 111 1001 011 1000 110 101 111 010 001 110 000. • Sketch the complete Huffman tree corresponding to the coding table. Solution 0.99 0 1 0.63 0 1 0.36 0.27 0 1 1 0 0.18 0.18 0.18 0.36 0 1 0 1 0 1 0 1 0.09 0.09 0.09 0.18 0.18 0.09 0.09 0.09 0.09 A D E L T U – I M Multimedia Technology Tutorial - Sebastian Keller

  18. Exercise 3 Huffman Coding 3 Write a small program to encode any given text by means of the Huffman algorithm. Use the java project Huffman.zip on the website. • Calculate the absolute occurrence of each character. Solution Multimedia Technology Tutorial - Sebastian Keller

  19. Exercise 3 Huffman Coding 3 Write a small program to encode any given text by means of the Huffman algorithm. Use the java project Huffman.zip on the website. • Build the Huffman tree. A PriorityQueue of Nodes may be useful. Solution Multimedia Technology Tutorial - Sebastian Keller

  20. Exercise 3 Huffman Coding 3 Write a small program to encode any given text by means of the Huffman algorithm. Use the java project Huffman.zip on the website. • Determine the codeword of each character. Solution Multimedia Technology Tutorial - Sebastian Keller

  21. Exercise 3 Huffman Coding 3 Write a small program to encode any given text by means of the Huffman algorithm. Use the java project Huffman.zip on the website. • Encode the text. Solution Multimedia Technology Tutorial - Sebastian Keller

  22. Exercise 4 Run Length Encoding The following three matrices should be compressed using run length encoding. The length of the compressed sequence of each matrix' coefficients shouldn't exceed numbers. The way you traverse the matrix doesn't need to be stored within the compressed sequence. Solution Matrix A Matrix C Matrix B 0 0 0 0 5 2 3 7 7 6 7 7 8 8 5 0 0 0 6 5 3 7 7 6 1 8 8 8 1 0 0 2 6 5 8 3 3 3 2 2 8 2 1 0 0 2 6 3 1 8 3 3 2 2 9 1 1 0 0 0 2 1 1 8 8 3 2 2 9 9 1 0 0 0 3 27 68 12 51 15 90 13 12 33 47 53 26 11 62 39 80 32 36 35 13 31 48 Multimedia Technology Tutorial - Sebastian Keller

  23. Exercise Sheet 3 Exercise 1 Lempel-Ziv-Welch Coding Exercise 2 Arithmetic Coding Exercise 3 Block Truncation Coding Multimedia Technology Tutorial - Sebastian Keller

  24. Exercise 1 Lempel-Ziv-Welch Coding • Encode the string MISSISSIPPIMISSISSIPPI using Lempel-Ziv coding in the version of Welch (the one taught in the lecture). The predefined alphabet looks like this: Solution Output: 2, 1, 4, 4, 6, 8, 3, 3, 1, 5, 7, 9, 1, 11, 1. Multimedia Technology Tutorial - Sebastian Keller

  25. Exercise 1 Lempel-Ziv-Welch Coding • Encode the string KAKAOPULVER using the Lempel-Ziv-Welch algorithm. When encoding the string, build up the following code table (dictionary): Alphabet X = {A, E, K, L, O, P, R, U, V} Solution Output: 3, 1, 10, 5, 6, 8, 4, 9, 2, 7. Multimedia Technology Tutorial - Sebastian Keller

  26. Exercise 1 Lempel-Ziv-Welch Coding • Consider two stations A and B linked by a communication channel. A would like to send the encoded message above to B. What information will be transmitted? Solution The alphabet and the encoded message have to be transmitted. Multimedia Technology Tutorial - Sebastian Keller

  27. Exercise 1 Lempel-Ziv-Welch Coding • Assuming a maximum code table size of 32 entries, calculate the compression factor of the transmitted message. (8 bits are required for an uncoded character.) Solution Multimedia Technology Tutorial - Sebastian Keller

  28. Exercise 2 Arithmetic Coding • Using the predefined relative occurrences from the table below, encode (compress) the string MISP using the arithmetic encoding. P is considered to be the terminal symbol which means that the decoder knows that it can stop, once a P is encountered. So in order to encode the entire message, you will have to pick a (binary) number from the interval for P in the end. Try to go for the shortest number you can find in the P-interval to use as few bits as possible. Like in the lecture, you can use 8-bit-wide registers to compute the interval bounds. Solution Output: 000 0 100 1 Multimedia Technology Tutorial - Sebastian Keller

  29. M I S P 116 01110100 116 11010001 255 11111111 23 00010111 0 00000000 M I S P 87 01010111 156 10011100 191 10111111 17 00010001 0 00000000 M I S P 98 01100010 149 10010101 175 10101111 47 00101111 34 00100010 M I S P 121 01111001 140 10001100 149 10010101 103 01100111 98 01100010 Multimedia Technology Tutorial - Sebastian Keller

  30. Exercise 2 Arithmetic Coding • The arithmetic coding is known to be a generalization of Human. Explain why arithmetic coding can be at least as efficient as Human but not vice versa. In particular, which advantage does arithmetic coding have as compared to Huffman? Solution Remember that results in the number of bits that correspond to a given probability p. Since Huffman only assigns full bits p can only be 1/2, 1/4, 1/8, and so on. If the true occurrences of symbols are different then Huffman can only assign the closest match. In contrast arithmetic encoding partitions another domain. In particular it assigns parts of an interval to a symbol. Rather than the coarse assignments of Huffman the interval can be partitioned finer. Thus arithmetic encoding adapts much better to the true occurrences of symbols than Huffman can. Multimedia Technology Tutorial - Sebastian Keller

  31. Exercise 3 Block Truncation Coding A tiny image is defined by the following table: Encode the image using the block truncation coding (BTC) algorithm. Solution Multimedia Technology Tutorial - Sebastian Keller

  32. Exercise Sheet 4 Exercise 1 Lempel-Ziv-Welch Coding Exercise 2DCT & Quantization Multimedia Technology Tutorial - Sebastian Keller

  33. Exercise 1 Lempel-Ziv-Welch Coding Decode the string 1, 2, 5, 1, 3, 1, 4, 6, 8 using Lempel-Ziv coding in the version of Welch (the one taught in the lecture). The predefined alphabet looks like this: Solution Message: ABRACADABRA Multimedia Technology Tutorial - Sebastian Keller

  34. Exercise 2 DCT & Quantization • The table below lists gray values for a given block of the well-known image lena. Transform the block according to the forward 2D DCT equation, which is given below. The resulting coefficients may be rounded to full integer values by cutting values after the decimal point. Solution with Multimedia Technology Tutorial - Sebastian Keller

  35. Exercise 2 DCT & Quantization • The table below lists gray values for a given block of the well-known imagelena. Transform the block according to the forward 2D DCT equation, which is given below. The resulting coefficients may be rounded to full integer values by cutting values after the decimal point. Solution DCT Multimedia Technology Tutorial - Sebastian Keller

  36. Exercise 2 DCT & Quantization • Now do the quantization of the coefficients from the previous exercise according to the following quantization table. Again, round the values like you did before. Solution Multimedia Technology Tutorial - Sebastian Keller

  37. Exercise 2 DCT & Quantization • Now do the quantization of the coefficients from the previous exercise according to the following quantization table. Again, round the values like you did before. Solution Quantization Multimedia Technology Tutorial - Sebastian Keller

  38. Exercise 2 DCT & Quantization • What is the longest run of identical values according to the zig-zag ordering of the coefficients? Solution The longest run of zeros consists of 45 zeros. Multimedia Technology Tutorial - Sebastian Keller

  39. Exercise 2 DCT & Quantization • Decode the quantized coefficients from the last exercise. You may have to investigate the equation for the inverse DCT, which is given below. Display the original image and its modified version. How did the characteristics of the image change? Try to explain why. Solution swith Multimedia Technology Tutorial - Sebastian Keller

  40. Exercise 2 DCT & Quantization • Decode the quantized coefficients from the last exercise. You may have to investigate the equation for the inverse DCT, which is given below. Display the original image and its modified version. How did the characteristics of the image change? Try to explain why. Solution The reconstructed image appears to be smoother. This is caused by the high quantization values in the quantization table. Those coefficients which are responsible for the higher frequencies are quantized by larger values, causing a rougher approximation. This is justified since the human visual system is less sensitive for high frequencies. Multimedia Technology Tutorial - Sebastian Keller

  41. Exercise Sheet 5 Exercise 1Block Truncation Coding Exercise 2 JPEG Exercise 3 MPEG – Frame Types Exercise 4 MPEG – Motion Vectors Multimedia Technology Tutorial - Sebastian Keller

  42. Exercise 1 Block Truncation Coding Show that the grey values a and b for the compressed image were chosen in a way that the mean grey value of the original image is preserved. Solution Multimedia Technology Tutorial - Sebastian Keller

  43. Exercise 2 JPEG • Answer the following basic question about: • How does JPEG achieve its high compression rates? • What does the abbreviation DCT mean? • Why is a transformation used at all? What is being transformed and where to? Solution Loss of color information (color subsampling) and level of quantization Discrete Cosine Transformation Human recognition is less disturbed by compression errors in the frequency domain. An image block is transformed to the frequency domain using the DCT. Multimedia Technology Tutorial - Sebastian Keller

  44. Exercise 2 JPEG • Transform the following 2x2 block (given as separate blocks for the RGB components) into the YUV color space. Finally compress the YUV space according to the JPEG procedure (determine the mean value for U and V). Use the following formulas: Solution R G B Y U V Multimedia Technology Tutorial - Sebastian Keller

  45. Exercise 2 JPEG • Now transform only the 2x2 Y-block according to the DCT. The DCT formula for 2x2 blocks is defined as followed: with Solution Multimedia Technology Tutorial - Sebastian Keller

  46. Exercise 2 JPEG • Quantize the transformed Y-block from the previous exercise. Use the following matrix for the quantization: Solution Quantization Multimedia Technology Tutorial - Sebastian Keller

  47. Exercise 2 JPEG • Encode the quantized Y-block using run-length encoding as done by JPEG. Use the notation DC amount character amount character ... . The preceding Y-block (after quantization) was: Solution 28 2 0 1 2 Multimedia Technology Tutorial - Sebastian Keller

  48. Exercise 3 MPEG – Frame Types • Which different types of MPEG frames do you know? Which of those show similarities to JPEG? Solution I-frame: Intra frame (most similarity to JPEG) P-frame: Predictive coded frame B-frame:Bidirectionallypredictive coded frame D-frame: DC direct coded frame (similar to JPEG with high quantization) Multimedia Technology Tutorial - Sebastian Keller

  49. Exercise 3 MPEG – Frame Types • Explain the properties of P frames. Solution A P-frame refers to preceding I and P-frames. It uses delta encoding to improve compression. Motion vectors are also possible. Multimedia Technology Tutorial - Sebastian Keller

  50. Exercise 3 MPEG – Frame Types • Explain the difference between P and B frames. Solution A B-Frame refers additionally to succeeding frames. Multimedia Technology Tutorial - Sebastian Keller

More Related