Docsity

Digitizing Images and Sounds, Lecture notes of Microwave Engineering and Acoustics

Partial preview of the text

Download Digitizing Images and Sounds and more Lecture notes Microwave Engineering and Acoustics in PDF only on Docsity!

15110 Principles of Computing,Carnegie Mellon University

1

Overview

• Human sensory systems and

digital representations

• Digitizing images

• Digitizing sounds

• Video

15110 Principles of Computing,

Human limitations

  • Range
    • only certain pitches and loudnesses can be heard
    • only certain kinds of light are visible, and there must be enough / not too much light
  • Discrimination
    • pitches, loudnesses, colors, intensities can’t be distinguished unless they are different enough
  • Coding
    • nervous systems “encode” experience, e.g. rods and cones in the eye

15110 Principles of Computing,

IMAGES

digitizing

15110 Principles of Computing,

“Raw” bit-mapped images

• Array of pixels

  • one pixel = three numbers (RGB)

• What other information do we need to display

the image?

  • look at TIFF file
  • image is just a bunch of numbers
  • we need to know how wide/high it is to make

sense of it

15110 Principles of Computing,

Common Standards

• Vector: SVG, EPS, AI, CDR.

  • Special-purpose: commonly used for high-quality

illustrations, graphics, etc.

• Raster: JPEG (compression), GIF (compression,

transparency), PNG (web portability), TIFF

(printing, huge), BMP (huge)

  • Commonly used for photos and pretty much

everything

15110 Principles of Computing,

Pixels

  • A bit-mapped image is stored in a computer as a

sequence of pixels , picture elements.

15110 Principles of Computing,

  • The resolution of an image is the number of pixels used to represent the image (e.g. 1024 X 768).
  • Each pixel represents the average color in that region.
  • The more pixels per area, the higher the resolution, and the more accurate the image will appear.

Resolution

15110 Principles of Computing,

Grayscale Images

  • Grayscale images contain pixels that are various shades of gray, from black (maximum gray) to white (minimum gray).
  • If there are 256 levels of gray for pixels, we can represent each pixel using 8 bits. 11111111 = white … (shades of gray) 00000000 = black

15110 Principles of Computing,

256-color images (8-bit color)

  • Each pixel is

represented

with a 8-bit

value that is

an index

into a palette of

256 colors.

15110 Principles of Computing,

RGB-color images (24-bit color)

  • Colors are represented as mixtures of red (R), green (G), and blue (B).
  • Each pixel is represented using three 8-bit values, one for each color component.
  • This representation allows for 2^24 = 16,777, different colors.
  • This representation is also called “true color”.
  • Explore with DigitalColor Meter

15110 Principles of Computing,

(image from Wikipedia)

RGB example

15110 Principles of Computing,

RED GREEN BLUE

dec: 51 236 130 bi n: 00110011 11101100 10000010 hex: 3 3 E C 8 2

Compressing Raster Data

• Run-length encoding (lossless, limited)

• Color maps (GIF, good for graphics with solid

areas of color)

• JPEG (lossy - a suite of techniques exploiting

human visual perception)

15110 Principles of Computing,

RLE compression

  • Run-Length Encoding is a lossless compression

technique used in early image files.

  • Instead of storing the 8-bit value for every pixel,

we store an 8-bit

value along with

how many of these

occur in a row (run).

  • This saves a lot when

there are large runs

of the same color.

15110 Principles of Computing,

(Colors: 0=Black, 255=White)

Color, Run, Color, Run, ...