27
Image Representation

Image Representation

Embed Size (px)

DESCRIPTION

Image Representation. Digital Image Sources. Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray, CT) The Internet . Images - 2D array of values = pixels. Pixel = “Picture Element” - PowerPoint PPT Presentation

Citation preview

Page 1: Image Representation

Image Representation

Page 2: Image Representation

• Digital Cameras

• Scanned Film & Photographs

• Digitized TV Signals

• Computer Graphics

• Radar & Sonar

• Medical Imaging Devices (X-Ray, CT)

• The Internet

Digital Image Sources

Page 3: Image Representation

• Pixel = “Picture Element”

• Image [x,y] = pixel value (number)

Images - 2D array of values = pixels

Page 4: Image Representation

• Pixel – an element of the 2-D image array

• Pixel Value = brightness• - black = 0 • - gray = 128• - white = 255• - many shades over the 0-255 range

0 1 2 3 4 5 6 701234567

Pixels and Pixel Values

Page 5: Image Representation

Images are digitized using a two step process:

1. sampling the continuous tone image

2. quantizing pixels

Digitizing Images

Page 6: Image Representation

Sampling

Page 7: Image Representation

pixel’s samples are averaged

Quantization

Page 8: Image Representation

Quantization Example

Page 9: Image Representation

Image Resolution

68 x 104 136 x 208 272 x 416 less detail more detail less storage more storage

Page 10: Image Representation

Digital Cameras

• Low-Res 640x480 (TV grade)

• Medium-Res 1536x1024

• Hi-Res 2048x1536

• Very Hi-Res 2560x1920

Page 11: Image Representation

Dynamic Range

256 levels

• The number of quantized pixel values:

16 levels 4 levels 2 levels

Page 12: Image Representation

• Binary Images (pixel values = 0,1)

• Grayscale Images (pixel values = 0-255)

• Color Images– Each pixel has three color components

• For example, (red, green, blue) or RGB

– Each color component is 0-255

Images - 2D array of values

Page 13: Image Representation

3 Images Overlayed

Color Images

Red

Green

Blue

Page 14: Image Representation

• What is a histogram?

• Simple numeric example

• Histogram1 3 213

121

4

2 1 2

1 2 3 1 2 3 4 41 2 3 1 2 3 4 4

Histograms: What’s in the image?

Page 15: Image Representation

• Histogram for each color

Color Image Histograms

Page 16: Image Representation

RGB Additive Color ModelREDRED

bright values => high amounts of that color

dark values => low amounts of that color

GREENGREEN BLUEBLUE

Page 17: Image Representation

BLACKBLACK

CYANCYAN MAGENTAMAGENTA

YELLOWYELLOW

CMYK Subtractive Color Model

Bright => use less of

that ink color

Dark => use lots of

that ink color

Page 18: Image Representation

HSB: how artists perceive color properties

HSB Visual Color Model

Page 19: Image Representation

HSB: how artists perceive color properties

HSB Visual Color Model

Select Hue

00oo

HueHue

360360oo

Page 20: Image Representation

HSB: how artists perceive color properties

HSB Visual Color Model

SaturationSaturation

Select Hue

00oo

HueHue

360360oo

- then click in box for saturation, brightness

Page 21: Image Representation

HSB: how artists perceive color properties

HSB Visual Color Model

Bri

ghtn

ess

Bri

ghtn

ess

SaturationSaturation

Select Hue

00oo

HueHue

360360oo

- then click in box for saturation, brightness

Page 22: Image Representation

Storing Digital Images

• Digital images are converted to files for storage and transfer

• The file type is a special format for ordering and storing the bytes that make up the image

• File types or formats are not necessarily compatible

• You must often match the file type with the application

Page 23: Image Representation

Storing Digital Images

• GIF (Graphic Interchange Format)– indexed color (up to 256 colors)– compressed– used in Web applications

• JPEG (Joint Photographic Experts Group)– lossy compression with variable controls– also used in Web applications

Page 24: Image Representation

Storing Digital Images

• PNG (Portable Network Graphics)– designed for online viewing (e.g., Web)– patent-free replacement for GIF– lossless compression

• BMP– MS Windows image format

Page 25: Image Representation

How Many Bytes to Store an Image?

• Suppose we a have an image that is 500x500 pixels in size

• That’s a total of 250,000 pixels

• Binary image (1 bit/pixel) = 31,250 bytes

• Grayscale image (8 bits/pixel) = 250,000 bytes

• Color image (24 bits/pixel) = 750,000 bytes

Page 26: Image Representation

Indexed Color• “Indexed Color” can be used to reduce the

size of a color image file

0 1 0 1 2 1 0 1 0

0 1 2

255 255 255 255 0 255 255 255 255

0 255 0 255 255 255 0 255 0

0 0 0 0 255 0 0 0 0

= 27 bytes

= 18 bytes

Page 27: Image Representation

Indexed Color Images

• are derived from full color images

• are smaller or more compact in storage

• are composed of pixels selected from a limited palette of colors or shades