You are on page 1of 33

Image Processing Dr.

Volker Krger

Chapter 2
Digital Color Images

Image Processing
What is Color

Lecture Sistemi intelligenti naturali ed articiali (SINA) from 15. Oct. 2010

Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

Dr. Volker Krger Dept. of Robotics, Brain and Cognitive Sciences Italian Inst. of Technology
2.1

Program for today

Image Processing Dr. Volker Krger

1 What is Color

Colors and the Human Visual System (HVS) Additive / Subtractive Color
What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

2 What are Color Space

RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

Pseudo Color

4 Concluding Remarks

2.2

What is Color

Image Processing Dr. Volker Krger

What is Color
Colors and the Human Visual System (HVS)

What is Color?

Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.3

What is Color

Image Processing Dr. Volker Krger

The colors that humans perceive are determined by the

nature of the light reected from an object! Green objects reect green light!

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

Achromatic: Only intensities (amount of light). Achromatic

information ranges from black to white

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color

Example: Gray levels as seen on black/white TV screens.


Chromatic: Lightwaves; Visual range: 400nm-700nm

Concluding Remarks

2.4

Red, Green,Blue
R,G,B are called Primary Colors R,G,B are used in cameras R,G,B were chosen due to the structue of the human eye

Image Processing Dr. Volker Krger

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.5

Receptivity of the Eye Cells

Image Processing Dr. Volker Krger

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.6

Red, Green,Blue=White? Really???


So why dont we get white, when we use paint?

Image Processing Dr. Volker Krger

Subtractive Color!! Additive Color!!

But why does it work for the TV?

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.7

Additive / Subtractive Color

Image Processing Dr. Volker Krger

Additive Color: Sum of light of different wave lengths. That

light reaches our eye directly.

Example
TV, Video Projectors, LCD Monitors

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Subtractive Color: White Color is emitted by the sun and is

only partially reected from an object!

Example
Red paint lters all light except red! Yellow paint absorbs blue, but reects red and grean

Pseudo Color Concluding Remarks

2.8

What are Color Spaces

Image Processing Dr. Volker Krger

What is Color
Colors and the Human Visual System (HVS)

What are Color Spaces?

Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.9

RGB Color Space


the classical Computer Color space Similar to the human visual system 3 different colors: Red, Green, Blue. If R,G,B have the same energy we perceive a shade of

Image Processing Dr. Volker Krger

white (gray, black).

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.10

RGB Color Space A single pixel consists of three components: [0, 255]. Each pixel is a vector.

Image Processing Dr. Volker Krger

What is Color

Pixel-vector in the computer memory

Final pixel color in the image

Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Caution

Pseudo Color Concluding Remarks

Sometimes pixels are not stored as vectors but in Image Bands. First, the complete red-component is stored, then the complete green, then blue.

2.11

Example RGB

Image Processing Dr. Volker Krger

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space

Original Image

RGB Color Space

Red Band

HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

Green Band

Blue Band
2.12

Convert Color to Grayscale Images

Image Processing Dr. Volker Krger

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space

RGB to Gray Conversion

RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

I=

R+G+B 3

Pseudo Color Concluding Remarks

1 3

2.13

Color and Intensity are mixed in RGB

Image Processing Dr. Volker Krger

Same Color,

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.14

Color and Intensity are mixed in RGB

Image Processing Dr. Volker Krger

Same Color,

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

different intensities

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.14

Color and Intensity are mixed in RGB

Image Processing Dr. Volker Krger

Same Color,

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

different intensities Chromaticiy Plane

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.14

Color and Intensity are mixed in RGB

Image Processing Dr. Volker Krger

Same Color,

different intensities Chromaticiy Plane r +g+b =1

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.14

Color and Intensity are mixed in RGB

Image Processing Dr. Volker Krger

Same Color,

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

different intensities Chromaticiy Plane r +g+b =1

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.14

Color and Intensity are mixed in RGB

Image Processing Dr. Volker Krger

Same Color,

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

different intensities Chromaticiy Plane r +g+b =1

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

RGB to Chromaticity concersion

r=

R G B g= b= R+G+B R+G+B R+G+B

2.14

Another way of separating color and intensity: HSI H =Hue, S =Saturation, I =intensity
intensity I : H and S may characterize a color: Chromatics

Image Processing Dr. Volker Krger

Hue associated with the dominant wavelength in the mixture of


What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

light waves, as perceived by an observer.

is the color attribute that describes a pure color Saturation relative purity

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

amount of white light in the color mixed with hue Example

Pure colors are fully saturated. Not saturated is, e.g., pink (red+white).

2.15

HSI Color Space

Image Processing Dr. Volker Krger

Perhaps the most intuitive color representation

Used in Computer Graphics and Computer Vision


What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.16

HSI Color Space A single pixel consists of three components: [0, 255]. Each pixel is a vector.

Image Processing Dr. Volker Krger

What is Color

Pixel-vector in the computer memory

Final pixel color in the image

Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Caution

Pseudo Color Concluding Remarks

Sometimes pixels are not stored as vectors but in Image Bands. First, the complete red-component is stored, then the complete green, then blue.

2.17

Example HSI

Image Processing Dr. Volker Krger

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space

Original Image

Hue

RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

Saturation

Intensity
2.18

YUV Color Space

Image Processing Dr. Volker Krger

YUV: used in commercial color TV broadcasting and video

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

signals

backwards compatible to the old B/W TV.

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

We need a format that decouples grayscale and color: HSI Poor-mans HSI because it is much easier to compute

from RGB than HSI

Pseudo Color Concluding Remarks

2.19

YUV Color Space A single pixel consists of three components: [0, 255]. Each pixel is a vector.

Image Processing Dr. Volker Krger

What is Color

Pixel-vector in the computer memory

Final pixel color in the image

Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Caution

Pseudo Color Concluding Remarks

Sometimes pixels are not stored as vectors but in Image Bands. First, the complete red-component is stored, then the complete green, then blue.

2.20

Example YUV

Image Processing Dr. Volker Krger

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space

Original Image

Y-band

RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

U-Band

V-Band
2.21

So Why Different Color Spaces


RGB Color space

Image Processing Dr. Volker Krger

works like Human Visual System (HVS) difcult to decouble color from intensity
HSI Color space
What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

a more physically motivated description of color decoubles color, intensity and saturity difcult to compute
YUV Color space

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

Simple to compute similar to HSI motivated by broadcasting technology saves memory through biological arguments hardly used in Computer Vision and Computer Graphics
2.22

What is Pseude Color

Image Processing Dr. Volker Krger

What is Color
Colors and the Human Visual System (HVS)

What is Pseudo Color?

Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.23

Full Color / Pseudo Color


Full Color Images: Acquired by a (TV/DV) camera, digital

Image Processing Dr. Volker Krger

camer or scanner

Pseudo Color Images: Assigned a shade of color to a

monochrome intensity or range of intensities

What is Color
Colors and the Human Visual System (HVS)

Example

Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.24

Full Color / Pseudo Color

Image Processing Dr. Volker Krger

Example

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.25

Full Color / Pseudo Color


Example

Image Processing Dr. Volker Krger

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.26

What to remember

Image Processing Dr. Volker Krger

Achromatic vs. Chromatic

How come that with RGB we can represent all (all?!?)

colors?

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

Subtractive Color vs. Additive Color

Pseudo color: represent grayscales as colors

Color Spaces RGB: Used in cameras and the HVS Normalized RGB: Decouples intensity and color: Used in Computer Vision HSI: Decouples intensity, hue and saturity: Used in CG and Computer Vision YUV: Used in commercial color TV

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.27

Exercises
Questions about the lecture? What was good about the lecture and what oculd have How many different 512 512 grayscale (8bit) images How many different colors exist for 24bit pixel? How many different 512 512 color (24bit) images exist? Questions Why can we use RGB to generate almost all pixel colors? What is the difference between Achromatic and Chromatic? What is the difference between Subtractive Color and Additive Color? Describe the four different color spaces (RGB, rg, HSI, YUV) What are their characteristics and where are they used? What is a pseudo color image? How can a Pseudo color image be generated from a gray value image?

Image Processing Dr. Volker Krger

been better? exist?

What is Color
Colors and the Human Visual System (HVS) Additive / Subtractive Color

What are Color Space


RGB Color Space HIS Color Space YUV Color Space Why Different Color Spaces?

Pseudo Color Concluding Remarks

2.28

You might also like