8 Representing Multimedia Digitally
Tags:TDT4109
Representing Multimedia Digitally
Light, Sound, Magic
Learning objectives
- Explain how RGB color is represented in bytes
- Understand the difference between “bits” and “binary numbers”
- Change an RGB color by binary addition
- Discuss concepts related to digitizing addition
- Explain Data compression and it’s lossless and lossy variants
- Explain the meaning of the Bias-Free Universal Medium Principle
SUMMARY 8
In this chapter we considered how different forms of information are represented in the computer. You learned the following:
- With RGBA color, each intensity is a 1-byte numeric quantity represented as a binary number.
- Binary representation and binary arithmetic are the same as they are for decimal numbers, but they are limited to two digits.
- The decimal equivalent of binary numbers is determined by adding their powers of 2 corresponding to 1’s.
- We can use arithmetic on the intensities to “compute on the representation,” for example, making gray lighter and coloriz a black-and-white picture from the nineteenth century.
- When digitizing sound, sampling rate and measurement precision determine how accurate the digital form is; uncompressed audio requires more than 80 million bits per minute.
- Compression makes large files manageable: MP3 for audio, JPEG for still pictures, and MPEG for video. These compact representations work because they remove unnecessary information.
- Optical character recognition technology improves our world.
- The Bias-Free Universal Medium Principle embodies the magic of computers through universal bit representations and unbiased encoding.
TRY IT SOLUTIONS
-
Not in This Case. About the only situation in which programmers manipulate bits of letters is to change them into lowercase - it’s done for matching and searching. Looking back at Figure 7.3, can you discover what change is needed to make the uppercase ASCII alphabet into the corresponding lowercase?
-
Light Sabers. Suppose a red light saber crosses a blue light saber. What color are they at the place where they cross, from the audience’s point of view?
-
Colored Light. Describe what a user sees on the screen when viewing the pixels shown here.
-
Dim Bulb. What is the binary setting needed to show a red subpixel at 1/4 of its brightness, as shown here?
-
Very Powerful. To convert decimal 206 to binary, which powers of 2 will be needed for the table?
-
Decimal Conversion. Convert the decimal number 206 to binary using the algorithm and it’s table.
-
Checking Binary. Compute this addition: Binary addition is so easy even computers can do it!
-
Getting the Gray Out. Using the coloring algorithm, give the new value of 1010 1100.
-
Perfect Timing. The QR Code shown at right, is the Japanese text … Which is from the video game Zero Wing, and was famously and incorrectly translated into English as “All your base are belong to us.” How many black squares are there in the timing tow (or column) of this code?
REVIEW QUESTIONS
Multiple Choice
- Put the following binary values representing the intensity of green in order from least intense to most intense: 1111 1100, 1111 1111, 1100 0000, 1111 0000
- 1111 1100,1111 1111,1100 0000,1111 0000
- 1111 1111,1100 0000,1111 0000,1111 1100
- 1111 1111,1111 1100,1111 0000,1100 0000
- 1100 0000,1111 0000,1111 1100,1111 1111
- The RGB setting for blue is (0 is off, 1 is on)
- 0000 0000 0000 0000 0000 0000
- 1111 1111 0000 0000 0000 0000
- 0000 0000 1111 1111 0000 0000
- 0000 0000 0000 0000 1111 1111
- People tend to be sensitive to small changes in __, but not to small changes in __.
- brightness,color
- color,brightness
- brightness,color
- color,contrast
- Digital information
- discrete
- continuous
- analog
- none of the above
- According to the Nyquist rule, the sampling rate for sound should be roughly
- half of what humans can hear
- the same as what humans can hear
- twice what humans can hear
- three times what humans can hear
- The accuracy of a digitized sound is determined by
- the sampling rate
- the precision of the sample
- the size of the digitez file
- all of the above
- An analog-to-digital converter
- changes digital information to analog waves
- converts continuous sound to digital sound
- converts sound to an electric signal
- sets approximated values
- Which of these is not an image format?
- JPEG
- MPEG
- PNG
- GIF
- Jessica Simpson’s “A little Bit” is 3 minutes 47 seconds long. How many bits is this?
- 1,411,200
- 40,042,800
- 84,672,000
- 320,342,400
- Raymond Kurzweil is known as the inventor of
- computer science
- text-to-speech generation
- image compression
- virtual reality
Short Answer
- RGB values are usually stored as three bytes
- Speed of light is the limit that defines the maximum rate that information can be transmitted
- All colors with equal intensities of RGB subpixels are either black, white, or shades of gray.
- Hz/Hertz is the number of waves per second.
- MP3 sound removes the highest and lowest samplings as part of its compression algorithm.
- Pixel color is determined solely by the intensity of the color.
- In OCR, each pixel is an estimate of how dark the corresponding area is.
- On the computer, compression means to store or transmit information with fewer bits.
- A process that allows the computer to “read” printed characters is called OCR/Optical Character Recognition.
- To increase the contrast of a photo, you should increase the difference between the light and dark parts.
- When converting analog sound to digital sound, using more bits yield a more accurate digitization.
- Small changes in brightness is known as ___.
- Small changes in color is known as ___.
- ___ is a technique to reduce bits while storing images.
Exercises
- Explain the phrases “bits are it” and “bits have no inherent meaning.”
- Bits can represent all discrete information (e.g., numbers, colors, sounds, etc.); but there’s no way we can determine what a bit sequence represents without more information than that.
- In the decimal to binary algorithm presented in this chapter, how do you determine what power of two to start the “place values” row of table?
- Decimal to binary conversion algorithm, the place value of all the powers need to be lesser than the given value.
- convert 1455 and 1557 to binary and then compute their addition, displaying the answer in binary. Show your work.
- 1455 = 0101 1010 1111
- 1557 = 0110 0001 0101
- 0101 1010 1111 + 0110 0001 0101 = 1455 + 1557 = 3012 = 1011 1100 0100
- In binary, add 1011,1001,110, and 1100.
- 1011 + 1001 + 110 + 1100 = 11 + 9 + 6 + 12 = 38 = 00100110
- Convert 168 and 123 to binary and then compute their addition. How many bytes does it take to represent each number= How many bytes are needed for the answer?
- What process could you use to remove “red eye” from a photo? Explain your algorithm in great detail.
- Explain how a picture with 300 pixels per inch could be converted to a picture with 100 pixels per inch.
- Give three applications of OCR systems.
- What do you mean by sample and sampling rate?
- What do you mean by compression?
- What will the best latency be for 255 KB to be transmitted with a bandwidth of 25 KB per second? Explain your answer.
- State five kinds of information that can be represented with four bytes of information. Be creative, recall information discussed in previous chapters, and explain each kind in detail.
- Explain how colored light and colored paint differ. Provide concrete examples in your explanation.
- Provide three advantages og using digital sound over analog sound. Are there any disadvantages? Explain your answer in detail.
- Assuming you had a small file of 0’s and 1’s as follows, use run-length encoding to compress this file.
0000 0000 1100 0000 1111 1111 0011 1111 0011 1111 0000 0000 1100 0000 0000 0000
- MP3 is a lossy compression that loses some pieces of information. Why is it okay to lose information?
- Devise an algorithm that allows you to remove certain letters from the following sentence and yet retain it’s clarity, making it understandable by most humans:
Ultimately, new technical advances transform every facet of human life and society.