0% found this document useful (0 votes)
13 views38 pages

Part 7

The document outlines the fundamentals of color image processing, including color models, transformations, and techniques for image segmentation and compression. It discusses the properties of colored light, the RGB and CMYK color models, and methods for converting between color formats. Additionally, it covers pseudocolor image processing and provides references for further reading on digital image processing.

Uploaded by

Praveen K S
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)
13 views38 pages

Part 7

The document outlines the fundamentals of color image processing, including color models, transformations, and techniques for image segmentation and compression. It discusses the properties of colored light, the RGB and CMYK color models, and methods for converting between color formats. Additionally, it covers pseudocolor image processing and provides references for further reading on digital image processing.

Uploaded by

Praveen K S
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/ 38

CPE409 Image Processing

Part 7
Color Image Processing

Assist. Prof. Dr. Caner ÖZCAN

It is only after years of preparation that the young artist should touch
color—not color used descriptively, that is, but as a means of
personal expression. ~Henri Matisse
Outline

6. Color Image Processing


► Color Fundamentals
► Color Models
► Pseudocolor Image Processing
► Basics of Full-Color Image Processing
► Color Transformations
► Smoothing and Sharpening
► Image Segmentation Based on Color
► Noise in Color Images
► Color Image Compression
2
Renk Temelleri

► White light

Newton 1665

3
Slide credit: B. Freeman, A. Torralba, K. Grauman
Color Fundamentals

4
Color Fundamentals

5
Renk Temelleri
Three basic parameters are used to express the
property of colored light:
1. Radiance: It is the total amount of energy
emitted from the light source and is measured in
Watt (W).
2. Luminance: It is the total amount of energy that
the observer perceives from the light source and
is measured in Lumen (lm).
3. Brightness: It is a subjective descriptive
parameter that is practically impossible to
measure. It indicates colorlessness of intensity.
6
Color Fundamentals

► Cone cells are responsible for color vision in the


eye.

► 6 to 7 million cones in the human eye can be


divided into three principal sensing categories,
corresponding roughly to red, green, and blue.

65%: red 33%: green 2%: blue (blue cones are


the most sensitive)
7
Color Fundamentals

8
9
Color Fundamentals
► The characteristics generally used to distinguish
one color from another are brightness, hue, and
saturation

brightness: the achromatic notion of intensity.

hue: dominant wavelength in a mixture of light waves,


represents dominant color as perceived by an observer.

saturation: relative purity or the amount of white light


mixed with its hue.
10
Color Fundamentals

► Tristimulus
Red, green, and blue are denoted X, Y, and Z,
respectively. A color is defined by its trichromatic
coefficients, defined as
X
x=
X +Y + Z
Y
y=
X +Y + Z
Z
z=
X +Y + Z
11
CIE Chromaticity Diagram

It shows color
composition as
a function of x
(red) and y
(green)

12
RGB Color Model

13
RGB Color Model

Pixel depth

The total number of colors


in a 24-bit RGB image is
(28)3 = 16,777,216

14
The CMY and CMYK Color Models

 C  1  R 
 M  = 1 − G 
    
 Y  1  B 
Equal amounts of the pigment primaries, cyan, magenta, and yellow
should produce black. In practice, combining these colors for
printing produces a muddy-looking black.

To produce true black, the predominant color in printing, the fourth


color, black, is added, giving rise to the CMYK color model.

15
CMY vs. CMYK

16
http://en.wikipedia.org/wiki/CMYK
HIS Color Model

brightness: the achromatic notion of intensity.

hue: dominant wavelength in a mixture of light waves,


represents dominant color as perceived by an observer.

saturation: relative purity or the amount of white light


mixed with its hue.

17
HIS Color Model

18
Converting Colors from RGB to HSI

► Given an image in RGB color format, the H


component of each RGB pixel is obtained using the
equation
 if B  G
H =
 360 −  if B>G

 1 
−1 
 ( R − G ) + ( R − B )  
 = cos  2
1/2 
 ( R − G ) + ( R − B )(G − B )  
2

  

19
Converting Colors from RGB to HSI

► Given an image in RGB color format, the saturation


component is given by

3
S = 1−  min( R, G, B)
( R + G + B)

Note: All color values


are normalized to
the range [0-1].
20
Converting Colors from RGB to HSI

► Given an image in RGB color format, the intensity


component is given by
3
S = 1−  min( R, G, B)
( R + G + B)

Note: All color values


are normalized to
the range [0-1].
21
Converting Colors from RGB to HSI

• For an image in RGB color format, the


intensity component is given as:
1
I = ( R + G + B)
3

Python code:
hsvImage = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)

Note: All color values are


normalized to the [0-1] range.

22
Converting Colors from HSI to RGB

► RG sector (0  H  120 )

B = I (1 − S )
 S cos H 
R = I 1 + 
 cos(60 − H ) 
and
G = 3I − ( R + B )
Note: All color values
are normalized to
the range [0-1].
23
Converting Colors from HSI to RGB

► RG sector (120  H  240 )

H = H − 120
R = I (1 − S )
 S cos H 
G = I 1 + 
 cos(60 − H ) 
and
B = 3I − ( R + G ) Note: All color values
are normalized to
the range [0-1].
24
Converting Colors from HSI to RGB

► RG sector (240  H  360 )

H = H − 240
G = I (1 − S )
 S cos H 
B = I 1 + 
 cos(60 − H ) 
and Note: All color values
are normalized to
R = 3I − (G + B ) the range [0-1].

Python Code:
rgbImage = cv2.cvtColor(image, cv2.COLOR_HSV2RGB) 25
26
27
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

28
29
30
31
32
33
34
Pseudocolor by combining
several of the sensor images
from the Galileo spacecraft,
some of which are in spectral
regions not visible to the eye.

Bright red depicts materials


newly ejected from an active
volcano on Io, and the
surrounding yellow materials
are older sulfur deposits.

35
Basics of Full-Color Image Processing

Let c represent an arbitrary vector in RGB color space:


 cR   R 
c =  cG  = G 
 cB   B 
At coordinates (x, y ),
 cR ( x, y )   R ( x, y ) 
c( x, y ) = cG ( x, y )  = G ( x, y ) 
 cB ( x, y )   B ( x, y ) 

36
Basics of Full-Color Image Processing

37
References

► Sayısal Görüntü İşleme, Palme Publishing, Third Press


Trans. (Orj: R.C. Gonzalez and R.E. Woods: "Digital
Image Processing", Prentice Hall, 3rd edition, 2008).
► “Digital Image Processing Using Matlab”, Gonzalez &
Richard E. Woods, Steven L. Eddins, Gatesmark
Publishing, 2009
► Lecture Notes, CS589-04 Digital Image Processing,
Frank (Qingzhong) Liu, http://www.cs.nmt.edu/~ip
► Lecture Notes, BIL717-Image Processing, Erkut Erdem
► Lecture Notes, EBM537-Image Processing, F.Karabiber
► https://docs.opencv.org/
► Bekir Aksoy, Python ile İmgeden Veriye Görüntü
İşleme ve Uygulamaları, Nobel Akademik Yayıncılık
38

You might also like