0% found this document useful (0 votes)
22 views72 pages

Session 6

The document provides an introduction to color image processing, covering fundamental concepts such as the human visual system, color models (RGB, CMYK, HSI), and techniques like pseudocolor image processing and color management. It explains how colors are perceived and represented, as well as methods for color transformation and slicing. Additionally, it discusses color difference equations and their applications in image processing.

Uploaded by

kimiarfaie76
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views72 pages

Session 6

The document provides an introduction to color image processing, covering fundamental concepts such as the human visual system, color models (RGB, CMYK, HSI), and techniques like pseudocolor image processing and color management. It explains how colors are perceived and represented, as well as methods for color transformation and slicing. Additionally, it discusses color difference equations and their applications in image processing.

Uploaded by

kimiarfaie76
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

Introduction to Color Image Processing

IDIG4321

Seyed Ali Amirshahi

Norwegian University of Science and Technology, Gjøvik, Norway

[email protected]

Norwegian University of Science and Technology Introduction to Color Image Processing


1 / 22

Chapter 14: Color image
processing

Norwegian University of Science and Technology Introduction to Color Image Processing


2 / 22

Chapter 14: Color image processing

Fundamentals

Norwegian University of Science and Technology Introduction to Color Image Processing


3 / 22

Chapter 14: Color image processing

Fundamentals

Norwegian University of Science and Technology Introduction to Color Image Processing


3 / 22

Chapter 14: Color image processing

Human visual system


There are around 6-7 million cones in the human eye.
The cones can be divided into three main sensing categories that correspond to red, green, and
blue.
2% of the cones correspond to blue, 33% to green, and 65% to red.
The blue cones are the most sensitive cones among the three.

Norwegian University of Science and Technology Introduction to Color Image Processing


4 / 22

Chapter 14: Color image processing

Human visual system

Norwegian University of Science and Technology Introduction to Color Image Processing


4 / 22

Chapter 14: Color image processing

How we see color

colors are normally characterized by the following three properties:


Brightness: The achromatic notion of intensity. It normally ranges from [0, 255]

Hue: The dominant wavelength in the light waves mixture that is perceived by the observer

Saturation: The purity or the amount of white light mixed with the hue.

Norwegian University of Science and Technology Introduction to Color Image Processing


5 / 22

Chapter 14: Color image processing

RGB color model

Norwegian University of Science and Technology Introduction to Color Image Processing


6 / 22

Chapter 14: Color image processing

RGB color model

In total, a 24-bit RGB image will have 16,777,216 ((28 )3 )

Norwegian University of Science and Technology Introduction to Color Image Processing


6 / 22

Chapter 14: Color image processing

RGB color model

Norwegian University of Science and Technology Introduction to Color Image Processing


6 / 22

Chapter 14: Color image processing

RGB color model


Color which can be reproduced faithfully, reasonably independent of the hardware used are
referred to as safe RGB color.

Norwegian University of Science and Technology Introduction to Color Image Processing


6 / 22

Chapter 14: Color image processing

RGB color model

Norwegian University of Science and Technology Introduction to Color Image Processing


6 / 22

Chapter 14: Color image processing

CMYK color space

In theory black can be reproduced by the same amount of cyan, magenta, and yellow.
In real life the black does not really look black.
To solve this issue in printing a black is added to the CMY color space resulting in the CMYK
color space.
     
C 1 R
M  = 1 − G 
Y 1 B

Norwegian University of Science and Technology Introduction to Color Image Processing


7 / 22

Chapter 14: Color image processing

CMYK color space

CMY vs CMYK

Image downloaded from https://en.wikipedia.org/wiki/CMYK_color_model

Norwegian University of Science and Technology Introduction to Color Image Processing


7 / 22

Chapter 14: Color image processing

HSI color model

Hue: The dominant wavelength in the light waves mixture that is perceived by the observer
Saturation: The purity or the amount of white light mixed with the hue.
Intensity: Similar to brightness it represents the achromatic notion of intensity.

Norwegian University of Science and Technology Introduction to Color Image Processing


8 / 22

Chapter 14: Color image processing

HSI color model

Norwegian University of Science and Technology Introduction to Color Image Processing


8 / 22

Chapter 14: Color image processing

HSI color model

Norwegian University of Science and Technology Introduction to Color Image Processing


8 / 22

Chapter 14: Color image processing

Relationship between RGB and HSI

Hue:
(
θ if B ≤ G
H=
360 − θ if B > G

1
n o
2 [(R−G )+(R−B)]
θ = cos−1 [(R−G )2 +(R−B)(G −B)]1/2

Saturation:
3
S =1− (R+G +B) min(RGB)

Intensity:

I = 13 (R + G + B)

Norwegian University of Science and Technology Introduction to Color Image Processing


9 / 22

Chapter 14: Color image processing

Relationship between RGB and HSI

◦ ◦
RG sector (0 ≤ H ≤ 120 ):
h i
S cos H
R =I 1+ cos(60◦ −H)

B = I (1 − S)

G = 3I − (R + B)

Norwegian University of Science and Technology Introduction to Color Image Processing


9 / 22

Chapter 14: Color image processing

Relationship between RGB and HSI

◦ ◦
RG sector (120 ≤ H ≤ 240 ):

H = H − 120

R = I (1 − S)

h i
S cos H
G =I 1+ cos(60◦ −H)

B = 3I − (R + G )

Norwegian University of Science and Technology Introduction to Color Image Processing


9 / 22

Chapter 14: Color image processing

Relationship between RGB and HSI

◦ ◦
RG sector (140 ≤ H ≤ 360 ):

H = H − 240

G = I (1 − S)

h i
S cos H
B =I 1+ cos(60◦ −H)

R = 3I − (R + G )

Norwegian University of Science and Technology Introduction to Color Image Processing


9 / 22

Chapter 14: Color image processing

Relationship between RGB and HSI

Norwegian University of Science and Technology Introduction to Color Image Processing


9 / 22

Chapter 14: Color image processing

Relationship between RGB and HSI

Norwegian University of Science and Technology Introduction to Color Image Processing


9 / 22

Chapter 14: Color image processing

Pseudocolor image processing

The process of assigning colors to gray values based on a specified criterion.


Intensity slicing:

f (x, y ) = ck if f (x, y )ϵVk

Norwegian University of Science and Technology Introduction to Color Image Processing


10 / 22

Chapter 14: Color image processing

Pseudocolor image processing


The process of assigning colors to gray values based on a specified criterion.
Intensity slicing:

f (x, y ) = ck if f (x, y )ϵVk

Norwegian University of Science and Technology Introduction to Color Image Processing


10 / 22

Chapter 14: Color image processing

Pseudocolor image processing

The process of assigning colors to gray values based on a specified criterion.


Intensity slicing:

f (x, y ) = ck if f (x, y )ϵVk

Norwegian University of Science and Technology Introduction to Color Image Processing


10 / 22

Chapter 14: Color image processing

Pseudocolor image processing

The process of assigning colors to gray values based on a specified criterion.


Intensity slicing:

Norwegian University of Science and Technology Introduction to Color Image Processing


10 / 22

Chapter 14: Color image processing

Pseudocolor image processing

Norwegian University of Science and Technology Introduction to Color Image Processing


10 / 22

Chapter 14: Color image processing

Pseudocolor image processing

Norwegian University of Science and Technology Introduction to Color Image Processing


10 / 22

Chapter 14: Color image processing

Pseudocolor image processing

The process of assigning colors to gray values based on a specified criterion.


Intensity to color transformation:

Norwegian University of Science and Technology Introduction to Color Image Processing


10 / 22

Chapter 14: Color image processing

Pseudocolor image processing

Norwegian University of Science and Technology Introduction to Color Image Processing


10 / 22

Chapter 14: Color image processing

Pseudocolor image processing

The process of assigning colors to gray values based on a specified criterion.


Intensity to color transformation:

Norwegian University of Science and Technology Introduction to Color Image Processing


10 / 22

Chapter 14: Color image processing

Pseudocolor image processing

Norwegian University of Science and Technology Introduction to Color Image Processing


10 / 22

Chapter 14: Color image processing

Basic color image processing

   
cR R
Assume that c = cG  = G  represents a vector in the RGB color space.
cB B
For a given image C at pixel coordinate (x, y ) we have:
   
CR (x, y ) R(x, y )
C(x, y ) = CG (x, y ) = G (x, y )
CB (x, y ) B(x, y )

Norwegian University of Science and Technology Introduction to Color Image Processing


11 / 22

Chapter 14: Color image processing

Basic color image processing

Norwegian University of Science and Technology Introduction to Color Image Processing


11 / 22

Chapter 14: Color image processing

Color transformation

Similar to the case of greyscale images local and global transforms can also be applied to the
color images.

g (x, y ) = T [f (x, y )]

si = Ti (r1 , r2 , · · · , rn ), i = 1, 2, · · · , n

Norwegian University of Science and Technology Introduction to Color Image Processing


12 / 22

Chapter 14: Color image processing

Color transformation

Norwegian University of Science and Technology Introduction to Color Image Processing


12 / 22

Chapter 14: Color image processing

Color transformation
g (x, y ) = kf (x, y )
RGB: si , i = 1, 2, 3.
CMY: si = kri + (1 − k), i = 1, 2, 3.
HSI: s3 = kr3

Norwegian University of Science and Technology Introduction to Color Image Processing


12 / 22

Chapter 14: Color image processing

Color transformation

Norwegian University of Science and Technology Introduction to Color Image Processing


12 / 22

Chapter 14: Color image processing

Color slicing

Similar to the case of greyscale images slicing in color images highlights a specific range of colors
in an image.
If the specified colors are enclosed by a cube of width W and centered at a protypical color with
components (a1 , a2 , · · · , an ), the set of transformations is:
(
0.5 if [| rj − aj |> W /2]any 1≤j≤n
si =
ri otherwise

Norwegian University of Science and Technology Introduction to Color Image Processing


13 / 22

Chapter 14: Color image processing

Color slicing

Similar to the case of greyscale images slicing in color images highlights a specific range of colors
in an image.
If the specified colors are enclosed by a sphere with a radius of R0 and centered at a protypical
color the set of transformations is:
 n
(rj − aj )2 > R02
0.5 P
if
si = j=1
ri otherwise

Norwegian University of Science and Technology Introduction to Color Image Processing


13 / 22

Chapter 14: Color image processing

Color slicing

Norwegian University of Science and Technology Introduction to Color Image Processing


13 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Color management

Norwegian University of Science and Technology Introduction to Color Image Processing


14 / 22

Chapter 14: Color image processing

Camera calibration

Norwegian University of Science and Technology Introduction to Color Image Processing


15 / 22

Chapter 14: Color image processing

Camera calibration

Norwegian University of Science and Technology Introduction to Color Image Processing


15 / 22

Chapter 14: Color image processing

Color difference equations

The difference or distance between two colors are called the color difference equation.
Color difference equations are normally represented by ∆E .
p
For example: ∆E = (R1 − R2 )2 + (G1 − G2 )2 + (B1 − B2 )2

In 1976 ∆Eab was
p introduced which is based on using the CIELAB color

space:∆E76 = (L∗1 − L∗2 )2 + (a1∗ − a2∗ )2 + (b1∗ − b2∗ )2

A ∆E76 ≈ 2.3 corresponds to Just Noticeable Differences (JND).

Norwegian University of Science and Technology Introduction to Color Image Processing


16 / 22

Chapter 14: Color image processing

Color difference equations

Using spectroradiometer and color difference equations for display calibration.

Norwegian University of Science and Technology Introduction to Color Image Processing


16 / 22

Chapter 14: Color image processing

Histogram processing

Norwegian University of Science and Technology Introduction to Color Image Processing


17 / 22

Chapter 14: Color image processing

Histogram processing

Color Image Smoothing: Assum Sx,y represents the neighborhood centered at (x, y ) in the
RGB color space. The average of the RGB component vector in the neighborhood is then:
1 P 
K R(s, t)
 (s,t)ϵSxy 
 1 P G (s, t)
¯ y) = 1
P
C(x, K C(s, t) = K
 (s,t)ϵSxy


(s,t)ϵSxy 1 P 
K B(s, t)
(s,t)ϵSxy

Norwegian University of Science and Technology Introduction to Color Image Processing


17 / 22

Chapter 14: Color image processing

Histogram processing

Norwegian University of Science and Technology Introduction to Color Image Processing


17 / 22

Chapter 14: Color image processing

Histogram processing

Norwegian University of Science and Technology Introduction to Color Image Processing


17 / 22

Chapter 14: Color image processing

Histogram processing

Norwegian University of Science and Technology Introduction to Color Image Processing


17 / 22

Chapter 14: Color image processing

Histogram processing

Norwegian University of Science and Technology Introduction to Color Image Processing


17 / 22

Chapter 14: Color image processing

Color image segmentation

Norwegian University of Science and Technology Introduction to Color Image Processing


18 / 22

Chapter 14: Color image processing

Color edge detection

Norwegian University of Science and Technology Introduction to Color Image Processing


19 / 22

Chapter 14: Color image processing

Color edge detection


Assume r , g , and b be unit vectors along the R, G , and B axis of the RGB color space.
∂R ∂G ∂B
u= ∂x r + ∂x g + ∂x b

∂R ∂G ∂B
v= ∂y r + ∂y g + ∂y b

∂R 2 ∂G 2 ∂B 2
gxx = u T u = ∂x + ∂x + ∂x

2 2 2
∂R ∂G ∂B
gyy = v T v = ∂y + ∂y + ∂y

∂R ∂R ∂G ∂G ∂B ∂B
gxy = u T u = ∂x ∂y + ∂x ∂y + ∂x ∂y
h i
2gxy
θ= 1
2 tan−1 gxx −gyy

F (θ) = 12 [(gxx + gyy ) + (gxx − gyy ) cos(2θ) + 2gxy sin(2θ)]


Norwegian University of Science and Technology Introduction to Color Image Processing
19 / 22

Chapter 14: Color image processing

Color edge detection

Norwegian University of Science and Technology Introduction to Color Image Processing


19 / 22

Chapter 14: Color image processing

Color edge detection

Norwegian University of Science and Technology Introduction to Color Image Processing


19 / 22

Chapter 14: Color image processing

Color edge detection

Norwegian University of Science and Technology Introduction to Color Image Processing


19 / 22

Final points

Norwegian University of Science and Technology Introduction to Color Image Processing


20 / 22

Final points

Final notes

We will have a small quiz next session


Next lecture will be Thursday the 12th of October
Right now it is scheduled for 16:15 K113
We can have it at 14:15 in A154 if you are available

Norwegian University of Science and Technology Introduction to Color Image Processing


21 / 22

Final points

Acknowledgment

Some of the slides, figures and images are inspired and/or used from slides created by:
Professor Azeddine Beghdadi, University of Paris 13.
Dr. Onur G. Guleryuz, Google Daydream R&D team
Professor Gordon Wetzstein, Stanford University
Dr. Frank (Qingzhong) Liu, New Mexico Tech
Dr. Farah Torkamaniazar, Shahid Beheshti University

Norwegian University of Science and Technology Introduction to Color Image Processing


22 / 22

You might also like