1 / 59

Digitizing Data

Digitizing Data. Text is easy What about multimedia ? P hotos, audio, and video Same principles. Color and the Mystery of Light. Color image Grid of pixels Pixel is formed from three primary colors RGB. Showing Colors. Colors formed by using 3 intensities of primaries

andren
Télécharger la présentation

Digitizing Data

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. Digitizing Data • Text is easy • What about multimedia? • Photos, audio, and video • Same principles

  2. Color and the Mystery of Light • Color image • Grid of pixels • Pixel is formed from three primary colors • RGB

  3. Showing Colors • Colors formed by using 3 intensities of primaries • Full intensity red, green, or blue • Full intensity of red, green, and blue? • No intensity of any color? • Other combinations

  4. LCD Display Technology • Close-up of white arrow pointer • Note subpixels

  5. Black and White Colors • Intensity of light color stored in byte • Needs 3 bytes/pixel • Smallest intensity is 0000 0000 • Decimal? • Largest value is 1111 1111 • Decimal?

  6. Black and White Colors • Black is absence of light: • 0000 0000 0000 0000 0000 0000 • White is full intensity of each color: • 1111 1111 1111 1111 1111 1111

  7. Color Intensities • Consider blue (0000 0000 0000 0000 1111 1111) • 8 bits have position values • To cut intensity in half

  8. Color Intensities

  9. Decimal to Binary • How to convert decimal to binary? • Look for powers of 2 and subtract • E.g.: Convert 365 to binary

  10. Lighten Up: Changing Color by Addition What color does this represent? 1100 10001100 10001100 1000 It’s RGB (200, 200, 200), a grey #C8 C8C8 in hex All grays of form (x, x, x)

  11. To Increase Intensity: Add in Binary Increase common value to lighten E.g., add 0001 0000 (decimal 16) to each color 1101 10001101 10001101 1000 RGB (216,216,216)

  12. Lightening Adding another 16… 1101 1000 + 0001 0000 ----------------- Check using decimal!

  13. Lighter Still: Adding with Carry Digits Binary addition is similar to decimal addition Work from right to left 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1 No carry 1 + 1 = 0 Carry of 1

  14. Binary Addition

  15. Binary Addition

  16. Binary Addition

  17. Computing on Representations • Example: changing the brightness and contrast of a photo

  18. Brightness and Contrast • Brightness • How close to white • Contrast • Difference b/w darkest and lightest portions of image • Photo manipulation software often gives values of pixels in a Levels graph

  19. Levels Graph • 0 percent is black point (0, 0, 0) • 100 percent is white point (ff, ff, ff) • Midpoint of pixel range is gamma point

  20. Brightness • Shift pixels closer to white • Add 16 to each pixel • E.g.: (197, 197, 197) => (213, 213, 213)

  21. Contrast • Scale pixel range • Stretch toward right • Add to each pixel, but • add a smaller amount for dark pixels • add a larger amount for light pixels

  22. New Levels Graph

  23. Adding Color • Color => (x, y, z), all 3 differ • Example • Colorize image of moon

  24. Making the Moon Orange Tint white regions Pick a shade of orange, say (255,213,132) Tint light gray Red byte: leave unchanged Green byte: reduce green slightly (subtract 42) Blue byte: reduce blue significantly (subtract 123)

  25. Digitizing Sound • Vibrating object creates sound • Vibrations “push” air to form pressure wave • Wave vibrates our eardrums

  26. Digitizing Sound • Intensity of push determines volume • Frequency (# of waves per second) of pushes determines pitch continuous (analog) representation of the wave

  27. Analog to Digital • Need to digitize to bits • Use binary # for amplitude of wave • At what point do you measure? • Infinitely many possible

  28. Analog to Digital • Sample at regular intervals • Samples/second is sampling rate

  29. Nyquist Rule for Sampling • Sampling rate is key • Nyquist rule • Sampling rate must 2x highest frequency • Range of human hearing 20 Hz – 20 KHz • Digital audio sampling rate is 44.1 KHz

  30. Digitizing Process

  31. Digitizing Process • Recording (digitizing) process • Sound => mic • Signal sampled by ADC • Samples encoded in binary

  32. Digitizing Process • Playing process • Numbers read by DAC • Electrical wave created by interpolation • Electrical signal => speaker

  33. How Many Bits per Sample? • Perfect accuracy requires unlimited bits/sample • Must handle both +/- values • More bits => more accuracy

  34. How Many Bits per Sample? • More bits yields a more accurate digitization • Digital audio uses 16 bits

  35. Advantages of Digital Sound • Key advantage is ability to compute on representation • Remove noise • Compression • Lossless • Lossy • Frequencies outside our range

  36. Advantages of Digital Sound • MP3 format • Allows for compression ratio > 10:1 • Another key advantage of digital representations is exact reproduction

  37. Digital Images and Video • Image is grid of RGB pixels • Stored as linear sequence • Can take up a lot of space

  38. Digital Images and Video • Example • 8 × 10 image scanned at 300 ppi • How many bytes to store? • Sending across 56 Kb/s phone connection requires how many minutes?

  39. Image Compression • Typical monitor has fewer than 100 ppi • 9x space saving over 300 ppi • Still requires more than 5.5 min to send

  40. Image Compression • Compression changes rep to use fewer bits • Example: faxes • Faxes are a sequences of 0’s and 1’s • Use run-length encoding

  41. Compression • Run-length encoding is “lossless” • Opposite is “lossy compression”

  42. Compression • MP-3 • Lossy scheme • Highs and lows lost • JPG (or JPEG) • Lossy scheme for images • Exploits limits of human perception • Luminance sensitivity • Chrominance insensitivity

  43. JPEG Compression • JPEG is capable of 10:1 compression w/o detectable loss of clarity

  44. JPEG Compression • Ratios higher than 10:1 • Smaller files • Possible artifacts (pixelation)

  45. MPEG Compression • MPEG used for video • Video is sequence of stills • Each image/frame is not seen for long

  46. MPEG Compression • JPEG used to compress frames • “Interframe coherency” is used • MPEG compression only transmits “deltas” b/w frames • Results in significant compression

  47. Optical Character Recognition • OCR • Converts images of characters to characters • Used by U.S.P.S. • Used in banking • Used in automatic license-plate recognition

More Related