Vous êtes sur la page 1sur 8

ECE 442 Lecture 2

Overview

Last time
Course logistics and overview
Introduction

Introduction to Multimedia Signal


Processing Color Systems

Today
Color system

Vicky Zhao
Electrical & Computer Engineering
University of Alberta, Edmonton
Acknowledgement: Prof. Min Wu and Prof. K. J. Ray Liu at UMD, Prof. Wade Trappe at Rutgers,
Prof. Y. Wang at Polytech and Prof. Xin Li at WVU for sharing the slides. Many
of the slides are borrowed from theirs.

ECE 442 Introduction to Multimedia Signal Processing

Image Formation Model

Color of Light

Illuminating source reflective surface human eyes

The colors that we perceive in an object are determined by the light


reflected from the object.

Perceived color depends on spectral content (wavelength composition)


spectral color: a light with very narrow bandwidth
Most light sources produce contributions over many wavelengths
A light with equal energy in all visible bands appears white

from [Li & Drew]

ECE 442 Introduction to Multimedia Signal Processing

ECE 442 Introduction to Multimedia Signal Processing

from [Gonzalez]

ECE 442 Introduction to Multimedia Signal Processing

Spectrum Power Density (SPD)

Reflective Surface

SPD: the relative power in each wavelength interval


The symbol for wavelength is . This curve is called E().

Surfaces reflect different amounts of light at different wavelengths,


and dark surfaces reflect less energy than light ones.

Spectrum of typical outdoor light on a sunny day:

The surface spectral reflectance function S() of (1) orange sneakers


and (2) faded blue jeans

The color signal:


C()=E()S()

from [Li & Drew]

ECE 442 Introduction to Multimedia Signal Processing

from [Li & Drew]

ECE 442 Introduction to Multimedia Signal Processing

Human Vision Human Eye Structure

Eye vs. Camera

The iris extracts or expands to control


the amount of light entering the eye.

Shape of the lens determines the focal


length of the eye.

From http://www.macula.org/anatomy/retinaframe.html

from PolyTech EL612

from [Gonzalez]
ECE 442 Introduction to Multimedia Signal Processing

When properly focused, light of the object


is imaged on the retina.
Discrete light receptors over the
surface of the retina
7

Camera components

Eye components

Lens

Lens, cornea

Shutter

Iris, pupil

Film

Retina

Cable to transfer images

Optic nerve send the info to the brain

ECE 442 Introduction to Multimedia Signal Processing

UMCP ENEE631 Slides (created by M.Wu 2001/2004)

Two Types of Photoreceptors at Retina

Rods

Color Perception

Long and thin


Large quantity (~ 100 million)
Provide scotopic vision (i.e., dim light vision or at low illumination)
Only extract luminance information and provide a general overall picture
Color objects often appear as colorless in dim light

Cones in human eyes are responsible for color vision


Can be divided into three principal sensing categories

R:G:B 40:20:1, in total ~ 6 million cones.

Spectral sensitivity functions: q () = (qR(), qG(), qB())T

Cones

Short and thick, densely packed in fovea (center of retina)


Much fewer (~ 6.5 million) and more sensitive to light than rods
Provide photopic vision (i.e., bright light vision or at high illumination)
Help resolve fine details as each cone is connected to its own nerve end
Responsible for color vision
our interest
(well-lighted display)

from [Gonzalez]

Mesopic vision

provided at intermediate illumination by both rod and cones


9

ECE 442 Introduction to Multimedia Signal Processing

10

ECE 442 Introduction to Multimedia Signal Processing

Recall: Image Formation Model

red

R = E() S() qR() d


G = E() S() qG() d
B = E() S() qB() d
from [Li & Drew]
ECE 442 Introduction to Multimedia Signal Processing

11

Green
ECE 442 Introduction to Multimedia Signal Processing

Blue
from Y. Wang EL612 Polytech
12

UMCP ENEE631 Slides (created by M.Wu 2001/2004)

Tri-receptor theory of color vision (Thomas Young, 1802):


Three types of cones in human retina whose absorption responses {qi()}
have peaks around 450nm (blue), 550nm (green), 620nm (yellow-green)
Color sensation depends on the spectral response {1(C), 2(C), 3(C) }
(tristimulus values) rather than the complete light spectrum C()

Trichromatic theory of color mixture: most colors can be reproduced by


mixing an appropriate set of three primary colors (Maxwell, 1855)

C()

q1() C() d

1(C)

q2() C() d

2(C)

q3() C() d

3(C)

color light

Identically
perceived colors
if i (C1) = i (C2)
for i=1,2,3

UMCP ENEE408G/631 Slides (created by M.Wu & R.Liu 2002/2004)

Example: Seeing Yellow Without Yellow

Representation by Three Primary Colors

570nm

mix green and red light to obtain perception of yellow, without


shining a single yellow photon
Seeing Yellow figure is from B.Liu ELE330 S01 lecture notes @ Princeton;
R/G/B cone response is from slides at Gonzalez/ Woods DIP book website

13

Detector
G

Real World Scene

Color
Interpolation

CFA pattern

Other in-camera
processing

Color Filter Array


(CFA) Pattern
Final Output Image

Green Component

Perceptual Attributes of Color


UMCP ENEE408G Slides (created by M.Wu & R.Liu 2002)

Value of Brightness (perceived


luminance) energy
Chrominance
wavelength composition
Hue

ECE 442 Introduction to Multimedia Signal Processing

15

specify color tone (redness, greenness, etc.)


depend on peak wavelength

Saturation

A. Swaminathan, ICASSP 2006

14

ECE 442 Introduction to Multimedia Signal Processing

Image Capture Process in Digital Cameras


Optical Filter

630nm

From M. Wu
ECE 442 Introduction to Multimedia Signal Processing

520nm

describe how pure the color is


depend on the spread (bandwidth) of light
spectrum
reflect how much white light is added
Pink: mix of red and white
Lavender: violet and white

RGB HSV Conversion ~ nonlinear


ECE 442 Introduction to Multimedia Signal Processing

HSV circular cone is from online


documentation of Matlab image
processing toolbox
http://www.mathworks.com/access
/helpdesk/help/toolbox/images/col
or10.shtml
16

RGB Primaries and Color Representation

Color model (color space or color systems)


To facilitate the specification of colors in standard ways

Specify the tristimulus values associated with the three primary colors
for hardware implementations
RGB (digital camera, TV, monitor, etc)
CMY (printer)

Specify the luminance and chrominance for human interpretation


HSV (Hue, saturation, value)
YIQ (used in NTSC color TV)
YUV (used in PAL color TV)

UMCP ENEE408G Slides (created by M.Wu & R.Liu 2002)

Color Representation Models

Primary colors for illuminating sources


Use red, green, blue light to represent a large number of visible colors
The contribution from each primary is normalized to [0, 1]

Color monitor works by exciting red, green, blue phosphors using


separate electronic guns
Viewing effect: R, G and B are added together

YCbCr (used in digital color TV)

ECE 442 Introduction to Multimedia Signal Processing

Color-cube figures: left figure is from B.Liu ELE330 S01


lecture notes @ Princeton, right figure is from slides at
Gonzalez/ Woods DIP book website
17

ECE 442 Introduction to Multimedia Signal Processing

UMCP ENEE408G/631 Slides (created by M.Wu & R.Liu 2002/2004)

Color Coordinate for Printing

Undercolor Removal -- CMYK System

Primary colors for pigment (colorant)


Defined as one that subtracts/absorbs a primary
color of light & reflects the other two
Ink subtract color from white

18

C, M and Y are supposed to mix to black, though more often they mix
to a muddy brown.

Truly black black ink is cheaper than mixing colored inks

Undercolor removal to produce sharper printer colors:

CMY Cyan, Magenta, Yellow


Complementary to RGB
Proper mix of them produces black

Calculate the part of the 3-color mix that would be black


Remove it from the color proportions
Add it back as real black

K = min(C , M , Y )
C' C
M ' = M K

Y ' Y
from [Gonzalez]
ECE 442 Introduction to Multimedia Signal Processing

19

ECE 442 Introduction to Multimedia Signal Processing

20

HSV Color Model

HSV color model is widely used in computer graphics

Converting a RGB color cube to HSV color model

Color Circle (Color Wheel)

from [Gonzalez]

ECE 442 Introduction to Multimedia Signal Processing

from [Gonzalez]
21

YUV Color Coordinate

Facilitate sending color video via 6MHz mono TV channel

YUV for PAL

22

ECE 442 Introduction to Multimedia Signal Processing

Example

Y ~ luminance, U=(B-Y) and V=(R-Y) ~ chrominance


In the actual implementation,

U and V are scaled for easier implementation


U or V is limited to the range [-0.5, 0.5]*max(Y)
U=(B-Y)*0.492111 and V=(R-Y)*0.877283

0.587
0.114 RN
Y 0.299
U = 0.147 0.289 0.436 G

N
V 0.615 0.515 0.100 BN
from [Li & Drew]

YUV decomposition of color image. Top: the original color image;


Bottom: left: Y; middle: U, and right: V
ECE 442 Introduction to Multimedia Signal Processing

23

ECE 442 Introduction to Multimedia Signal Processing

24

YIQ Color Coordinate

I and Q on the Color Circle

YIQ for NTSC (National Television Systems Committee)

Use receiver primary system (R, G, B) as TV receivers standard


Transmission system use (Y, I, Q) color coordinate

Q: green-purple

Y ~ luminance, I & Q ~ chrominance


I & Q are transmitted through orthogonal carriers at the same freq.

Rotated version of YUV


More efficient in capturing the most-to-least hierarchy of human vision

Humans are more sensitive to orange-blue than purple-green

0.114 RN
Y 0.299 0.587
I = 0.596 0.275 0.321 G

N
Q 0.212 0.523 0.311 BN
ECE 442 Introduction to Multimedia Signal Processing

I: orange-cyan

from Y. Wang EL612 Polytech


25

ECE 442 Introduction to Multimedia Signal Processing

Example

26

YCbCr Color Model

YCbCr color model


Used in JPEG and MPEG compression standards
Used in ITU-R BT.601, the int. standard for component digital video

Y, Cb and Cr are scaled and shifted versions of the analog Y, U &V.


Scaling and shifting make the components in the range [0,255]
0 RN,GN,BN 1;0R,G,B255;16Y 235;16Cb,Cr240

0.504
0.098 R 16
128.553 24.966 RN 16 0.257
Y 65.48
C = 37.797 74.203
G + 128 = 0.148 0.291 0.439 G + 128
112
b

N
Cr 112
93.786 18.214 BN 128 0.439 0.368 0.071 B 128

Fig.4.19: I and Q components of color image.


from [Li & Drew]

ECE 442 Introduction to Multimedia Signal Processing

27

0
1.596 Y 16
R 1.164
G = 1.164 0.391 0.813 C 128

b
0 Cr 128
B 1.164 2.018

ECE 442 Introduction to Multimedia Signal Processing

28

Examples

Summary

This time
Color systems

RGB

Next time
Image representation, dithering and halftoning

HSV

Reading assignments:
Section 4.1.1-4.1.5, 4.2, 4.3

YCbCr

ECE 442 Introduction to Multimedia Signal Processing

29

ECE 442 Introduction to Multimedia Signal Processing

30

Vous aimerez peut-être aussi