SlideShare a Scribd company logo
1 of 72
Color Image Processing
Spectrum of White Light
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
1666 Sir Isaac Newton, 24 year old, discovered white light spectrum.
Electromagnetic Spectrum
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Visible light wavelength: from around 400 to 700 nm
1.For an achromatic (monochrome) light source,
there is only 1 attribute to describe the quality: intensity
2.For a chromatic light source, there are 3 attributes to describe the
quality:
Radiance = total amount of energy flow from a light source (Watts)
Luminance = amount of energy received by an observer (lumens)
Brightness = intensity
Sensitivity of Cones in the Human Eye
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
7millions cones in a human
eye
- 65% sensitive to Red light
- 33% sensitive to Green light
- 2 % sensitive to Blue light
Primary colors:
Defined CIE in 1931
Red = 700 nm
Green = 546.1nm
Blue = 435.8 nm
CIE = Commission
Internationale de
Primary and Secondary Colors
Primary
color
Primary
color
Primary
color
Secondary
colors
Primary and Secondary Colors (cont.)
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Additive primary colors: RGB
use in the case of light sources
such as color monitors
RGB add together to get white
Subtractive primary colors: CMY
use in the case of pigments in
printing devices
White subtracted by CMY to get
Black
Hue: dominant color corresponding to a dominant
wavelength of mixture light wave
Relative purity or amount of white light mixed
with a hue (inversely proportional to amount of white
light added) Intensity
Saturation:
Brightness:
Color Characterization
Hue
Saturation
Chromaticity
amount of red (X), green (Y) and blue (Z) to form any particular
color is called tristimulus.
(Images from Rafael C. Gonzalez and Richard E.
CIE Chromaticity Diagram
Trichromatic coefficients:
X
X  Y  Z
x 
Y
X  Y  Z
y 
Z
X  Y  Z
Wood, Digital Image Processing, 2nd Edition.
z 
x  y  z 1
x
y
Points on the boundary are
fully saturated colors
Color Gamut of Color Monitors and Printing Devices
Color Monitors
Printing devices
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
RGB Color Model
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Purpose of color models: to facilitate the specification of colors in
some standard
RGB color models:
- based on cartesian coordinate system
RGB Color Cube
R = 8 bits
G = 8 bits
B = 8 bits
Color depth 24 bits
= 16777216 colors
Hidden faces
of the cube
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
RGB Color Model (cont.)
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Red fixed at 127
Safe RGB Colors
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Safe RGB colors: a subset of RGB colors.
There are 216 colors common in most operating systems.
RGB Safe-color Cube
The RGB Cube is divided into 6
intervals on each axis to achieve the
total 63 = 216 common colors.
However, for 8 bit color
representation, there are the total
256 colors. Therefore, the remaining
40 colors are left to OS.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
CMY and CMYK Color Models
Y 
     
1 B
 C  1 R
M   1 G
C = Cyan
M = Magenta
Y = Yellow
K = Black
HSI Color Model
RGB, CMY models are not good for human interpreting
HSI Color model:
Hue: Dominant color
Saturation: Relative purity (inversely
proportional to amount of white light added)
Intensity: Brightness
Color carrying
information
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Relationship Between RGB and HSI Color Models
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
RGB HSI
Hue and Saturation on Color Planes
1. A dot is the plane is an arbitrarycolor
2. Hue is an angle from a red axis.
3. Saturation is a distance to the point.
HSI Color Model (cont.)
Intensity is given by a position on the vertical axis.
HSI Color Model
Intensity is given by a position on the vertical axis.
Example: HSI Components of RGB Cube
Hue Saturation Intensity
(Images from Rafael C. Gonzalez and
Richard E. Wood, Digital Image
RGB Cube
Converting Colors from RGB to HSI
H  
if B G
if B G
360






 

1/2
2
(R G)  (R  B)(G  B)
1
(R  G)  (R  B)
 cos12 
3
R  G 
B
S 1
3
I 
1
(R  G  B)
Converting Colors from HSI to RGB
B  I(1 S)


cos(60  H)
S cosH 
R  I


1


G 1 (R  B)
RG sector: 0  H 120 GB sector:120 H  240
R  I(1 S)


S cosH 
cos(60  H)
G  I


1


B 1 (R  G)
G  I(1 S)



S cosH
cos(60  H
)
B  I


1


R 1 (G  B)
BR sector:240 H  360
H  H 120
H  H  240
Example: HSI Components of RGB Colors
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Hue
Saturation Intensity
RGB
Image
Example: Manipulating HSI Components
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Hue
Saturation Intensity
RGB
Image Hue Saturation
Intensity RGB
Image
Color Image Processing
There are 2 types of color image processes
1.Pseudocolor image process: Assigning colors to gray
values based on a specific criterion. Gray scale images to be processed
may be a single image or multiple images such as multispectral images
2.Full color image process: The process to manipulate real color
images such as color photographs.
Pseudocolor Image Processing
Pseudo color = false color : In some case there is no “color” concept
for a gray scale image but we can assign “false” colors to an image.
Why we need to assign colors to gray scale image?
Answer: Human can distinguish different colors better than different
shades of gray.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Intensity Slicing or Density Slicing

C if f (x, y)  T
if f (x, y)  T
g(x, y)
C2
1
Formula:
C1 = Color No.1
C2 = Color No.2
T
Color
C1
C2
T
Intensity
0 L-1
A gray scale image viewed as a 3D surface.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Intensity Slicing Example
An X-ray image of a weld with cracks
After assigning a yellow color to pixels with
value 255 and a blue color to all other pixels.
Multi Level Intensity Slicing
g(x, y)  Ck for lk1  f (x, y)  lk
Ck = Color No.k
lk = Threshold levelk
Color
C2
C
1
0 l1 L-1
l2 l3
Intensity
lk
lk-1
Ck
Ck-1
C3
Multi Level Intensity Slicing Example
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
g(x, y)  Ck for lk1  f (x, y)  lk
Ck = Color No.k
lk = Threshold levelk
An X-ray image of the Picker
Thyroid Phantom.
After density slicing into 8 colors
Color Coding Example
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
A unique color is assigned to
each intensity value.
Gray-scale image of average
monthly rainfall.
Color coded image
Color
map
South Americaregion
Gray Level to Color Transformation
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Assigning colors to gray levels based on specific mappingfunctions
Red component
Green component
Blue component
Gray scale image
(Images from Rafael C.
Gonzalez and Richard
E. Wood, Digital Image
Processing, 2nd Edition.
Gray Level to Color Transformation Example
An X-ray image of a
garment bag with a
simulated explosive
device
An X-ray image
of a garment bag
Color
coded
images
Transformations
(Images from Rafael C.
Gonzalez and Richard
E. Wood, Digital Image
Processing, 2nd Edition.
Gray Level to Color Transformation Example
An X-ray image of a
garment bag with a
simulated explosive
device
An X-ray image
of a garment bag
Color
coded
images
Transformations
(Images from Rafael C. Gonzalez and Richard E.
Pseudocolor Coding
Wood, Digital Image Processing, 2nd Edition.
Used in the case where there are many monochrome images such as multispectral
satellite images.
Washington D.C. area
(Images from Rafael C. Gonzalez and Richard E.
Pseudocolor Coding Example
Visible blue
= 0.45-0.52 m
Max water penetration
1
Visible red
= 0.63-0.69 m
Near infrared
= 0.76-0.90 m
Plant discrimination Biomass and shoreline mapping
Visible green
= 0.52-0.60 m
Measuring plant
2
3 4 Red =
Green =
Blue =
Color composite images
1
2
3
Red =
Green =
Blue =
1
2
4
Wood, Digital Image Processing, 2nd Edition.
Pseudocolor Coding Example
Psuedocolor rendition
of Jupiter moon Io
Yellow areas = older sulfur deposits.
Aclose-up
Red areas = material ejected from
active volcanoes.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Basics of Full-Color Image Processing
2 Methods:
1.Per-color-component processing: process each component separately.
2.Vector processing: treat each pixel as a vector to be processed.
Example of per-color-component processing: smoothing an image By
smoothing each RGB component separately.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Example: Full-Color Image and Variouis Color Space Components
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color image
CMYK components
RGB components
HSI components
Color Transformation
Use to transform colors to colors.
Formulation:
g( x, y)  T  f ( x, y)
f(x,y) = input color image, g(x,y) = output color image
T = operation on f over a spatial neighborhood of (x,y)
When only data at one pixel is used in the transformation, we
can express the transformation as:
si  Ti (r1,r2, ,rn) i= 1, 2, …, n
Where ri = color component of f(x,y)
si = color component of g(x,y)
For RGB images, n = 3
Example: Color Transformation
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
sR (x, y)  krR(x, y)
sG (x, y)  krG(x, y)
sB (x, y)  krB(x, y)
Formula for RGB:
sI (x, y)  krI (x, y)
Formula for CMY:
sC (x, y)  krC(x, y)  (1 k)
sM (x, y)  krM (x, y)  (1 k)
sY (x, y)  krY (x, y)  (1 k)
Formula for HSI:
These 3 transformations give
the same results.
k = 0.7
I H,S
Color Complements
Color complement replaces each color with its opposite color in the
color circle of the Hue component. This operation is analogous to
image negative in a gray scale image.
Color circle
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Complement Transformation Example
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Slicing Transformation



otherwise
any 1 jn
i


ri
 W 
s  0.5 if  rj  aj 
2 
We can perform “slicing” in color space: if the color of each pixel
is far from a desired color more than threshold distance, we set that
color to some specific color such as gray, otherwise we keep the
original color unchanged.
i= 1, 2, …, n
or


otherwise
2
j1
i


ri
if   2

n
rj aj R0
s  0.5
Set to gray
Keep the original
color
Set to gray
Keep the original
color
i= 1, 2, …, n
Color Slicing Transformation Example
Original image
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
After color slicing
Tonal Correction Examples
In these examples, only
brightness and contrast are
adjusted while keeping color
unchanged.
This can be done by using
the same transformation for
all RGB components.
Contrast enhancement
Power law transformations
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Balancing Correction Examples
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color imbalance: primary color components in white area
are not balance. We can measure these components by
using a color spectrometer.
Color balancing can be performed by adjusting color
components separately as seen in this slide.
Histogram Equalization of a Full-Color Image
Histogram equalization of a color image can be performed by
adjusting color intensity uniformly while leaving color unchanged.
The HSI model is suitable for histogram equalization where only
Intensity (I) component is equalized.
 
k
k
nj
sk  T(rk )   pr (rj )
j0
j0 N
where r and s are intensity components of input and output color image.
(Images from Rafael C.
Gonzalez and Richard E.
Wood, Digital Image
Processing, 2nd Edition.
Histogram Equalization of a Full-Color Image
Original image
After histogram
equalization
After increasing
saturation component
Color Image Smoothing
2 Methods:
1.Per-color-plane method: for RGB, CMY color models
Smooth each color plane using moving averaging and the
combine back to RGB
2. Smooth only Intensity component of a HSI image while leaving
H and S unmodified.
Note: 2 methods are not equivalent.





 


xy
K

K
K
 K (x, y)S
(x,y)Sxy
(x,y)Sxy
(x,y)Sxy
B(x, y)
 1

G(x, y)



R( x, y)
 1
c(x, y) 
 1
c( x, y) 
1
Color Image Smoothing Example (cont.)
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color image Red
Green Blue
Color Image Smoothing Example (cont.)
Hue Saturation Intensity
Color image
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
HSI Components
Color Image Smoothing Example (cont.)
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Smooth all RGB components Smooth only I component of HSI
(faster)
Color Image Smoothing Example (cont.)
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Difference between
smoothed results from 2
methods in the previous
slide.
Color Image Sharpening
We can do in the same manner as color image smoothing:
1. Per-color-plane method for RGB,CMY images
2. Sharpening only I component of a HSI image
Sharpening all RGB components Sharpening only I component of HSI
Color Image Sharpening Example (cont.)
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Difference between
sharpened results from 2
methods in the previous
slide.
Color Segmentation
2 Methods:
1.Segmented in HSI color space:
A thresholding function based on color information in H and S
Components. We rarely use I component for color image
segmentation.
2.Segmentation in RGB vector space:
A thresholding function based on distance in a color vector space.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Segmentation in HSI Color Space
Color image Hue
1 2
3
Saturation
4
Intensity (Images from Rafael C.
Gonzalez and Richard E.
Wood, Digital Image
Processing, 2nd Edition.
Color Segmentation in HSI Color Space (cont.)
5 6
Product of 2 and 5
Binary thresholding of S component
with T = 10%
7
Histogram of
8
Segmentation of red color pixels
6
Red pixels
(Images from Rafael C.
Gonzalez and Richard E.
Wood, Digital Image
Processing, 2nd Edition.
Color Segmentation in HSI Color Space (cont.)
Color image Segmented results of red pixels
(Images from Rafael C.
Gonzalez and Richard E.
Wood, Digital Image
Processing, 2nd Edition.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Segmentation in RGB Vector Space
1. Each point with (R,G,B) coordinate in the vector space represents
one color.
2. Segmentation is based on distance thresholding in a vector space

0
g(x, y) 
1 if D(c(x, y),cT )  T
if D(c(x, y),cT )  T
cT = color to be segmented.
c(x,y) = RGB vector at pixel (x,y).
D(u,v) = distance function
Example: Segmentation in RGB Vector Space
Results of segmentation in
RGB vector space with Threshold
value
Color image
Reference color cT to besegmented
cT  average color of pixel in the box
T = 1.25 times the SD of R,G,B values
In the box
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Gradient of a Color Image
Since gradient is define only for a scalar image, there is no concept
of gradient for a color image. We can’t compute gradient of each
color component and combine the results to get the gradient of a
color image.
Red Green Blue
Edges
We see
4 objects.
We see
2 objects.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Gradient of a Color Image (cont.)
One way to compute the maximum rate of change of a color image
which is close to the meaning of gradient is to use the following
formula: Gradient computed in RGB color space:
1
2




2 yy xy
xx yy xx  g ) cos2  2g sin2
 g ) (g
F()  1
(g 



 yy
xx
2gxy
2

g  g
 
1
tan1 
R
2
G
2
B
2

x

x
gxx 
x
R
2
G
2
B
2

y

y
gyy 
y
gxy

R R

G G

B B
x y x y x y
Obtained using
the formula
in the previous
slide
Sum of
gradients of
each color
component
Original
image
2
3
Difference
between
22 and 33
Gradient of a Color Image Example
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Gradients of each color component
Red Green Blue
Gradient of a Color Image Example
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Noise in Color Images
Noise can corrupt each color component independently.
(Images from Rafael C.
Gonzalez and Richard E.
Wood, Digital Image
Processing, 2nd Edition.
Noise is less
noticeable
in a color
image
AWGN  =800
2
AWGN  =800
2
AWGN  =800
2
Noise in Color Images
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Hue Saturation Intensity
Noise in Color Images
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Hue
Saturation Intensity
Salt & pepper noise
in Green component
Color Image Compression
JPEG2000 File
Original image
After lossy compression with ratio 230:1 (Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Thank you

More Related Content

Similar to Important features of color image processing

Chapter 3. Intensity Transformations and Spatial Filtering.pdf
Chapter 3. Intensity Transformations and Spatial Filtering.pdfChapter 3. Intensity Transformations and Spatial Filtering.pdf
Chapter 3. Intensity Transformations and Spatial Filtering.pdf
DngThanh44
 

Similar to Important features of color image processing (20)

Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
10 color image processing
10 color image processing10 color image processing
10 color image processing
 
image-pro.ppt
image-pro.pptimage-pro.ppt
image-pro.ppt
 
Image processing report
Image processing reportImage processing report
Image processing report
 
Id3115321536
Id3115321536Id3115321536
Id3115321536
 
It 603
It 603It 603
It 603
 
It 603
It 603It 603
It 603
 
The Impact of Color Space and Intensity Normalization to Face Detection Perfo...
The Impact of Color Space and Intensity Normalization to Face Detection Perfo...The Impact of Color Space and Intensity Normalization to Face Detection Perfo...
The Impact of Color Space and Intensity Normalization to Face Detection Perfo...
 
Chapter01 Lecture 1.ppt
Chapter01 Lecture 1.pptChapter01 Lecture 1.ppt
Chapter01 Lecture 1.ppt
 
Chapter01 lecture 1
Chapter01 lecture 1Chapter01 lecture 1
Chapter01 lecture 1
 
Image processing tatorial
Image processing tatorialImage processing tatorial
Image processing tatorial
 
Basics of image processing & analysis
Basics of image processing & analysisBasics of image processing & analysis
Basics of image processing & analysis
 
DIP.ppt
DIP.pptDIP.ppt
DIP.ppt
 
Color image processing
Color image processingColor image processing
Color image processing
 
Lect 02 second portion
Lect 02  second portionLect 02  second portion
Lect 02 second portion
 
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
 
Color models
Color modelsColor models
Color models
 
Chapter 3. Intensity Transformations and Spatial Filtering.pdf
Chapter 3. Intensity Transformations and Spatial Filtering.pdfChapter 3. Intensity Transformations and Spatial Filtering.pdf
Chapter 3. Intensity Transformations and Spatial Filtering.pdf
 
Ppt ---image processing
Ppt ---image processingPpt ---image processing
Ppt ---image processing
 
quantization and sampling presentation ppt
quantization and sampling presentation pptquantization and sampling presentation ppt
quantization and sampling presentation ppt
 

Recently uploaded

Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Recently uploaded (20)

A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 

Important features of color image processing

  • 2. Spectrum of White Light (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. 1666 Sir Isaac Newton, 24 year old, discovered white light spectrum.
  • 3. Electromagnetic Spectrum (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Visible light wavelength: from around 400 to 700 nm 1.For an achromatic (monochrome) light source, there is only 1 attribute to describe the quality: intensity 2.For a chromatic light source, there are 3 attributes to describe the quality: Radiance = total amount of energy flow from a light source (Watts) Luminance = amount of energy received by an observer (lumens) Brightness = intensity
  • 4. Sensitivity of Cones in the Human Eye (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. 7millions cones in a human eye - 65% sensitive to Red light - 33% sensitive to Green light - 2 % sensitive to Blue light Primary colors: Defined CIE in 1931 Red = 700 nm Green = 546.1nm Blue = 435.8 nm CIE = Commission Internationale de
  • 5. Primary and Secondary Colors Primary color Primary color Primary color Secondary colors
  • 6. Primary and Secondary Colors (cont.) (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Additive primary colors: RGB use in the case of light sources such as color monitors RGB add together to get white Subtractive primary colors: CMY use in the case of pigments in printing devices White subtracted by CMY to get Black
  • 7. Hue: dominant color corresponding to a dominant wavelength of mixture light wave Relative purity or amount of white light mixed with a hue (inversely proportional to amount of white light added) Intensity Saturation: Brightness: Color Characterization Hue Saturation Chromaticity amount of red (X), green (Y) and blue (Z) to form any particular color is called tristimulus.
  • 8. (Images from Rafael C. Gonzalez and Richard E. CIE Chromaticity Diagram Trichromatic coefficients: X X  Y  Z x  Y X  Y  Z y  Z X  Y  Z Wood, Digital Image Processing, 2nd Edition. z  x  y  z 1 x y Points on the boundary are fully saturated colors
  • 9. Color Gamut of Color Monitors and Printing Devices Color Monitors Printing devices (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 10. RGB Color Model (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Purpose of color models: to facilitate the specification of colors in some standard RGB color models: - based on cartesian coordinate system
  • 11. RGB Color Cube R = 8 bits G = 8 bits B = 8 bits Color depth 24 bits = 16777216 colors Hidden faces of the cube (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 12. RGB Color Model (cont.) (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Red fixed at 127
  • 13. Safe RGB Colors (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Safe RGB colors: a subset of RGB colors. There are 216 colors common in most operating systems.
  • 14. RGB Safe-color Cube The RGB Cube is divided into 6 intervals on each axis to achieve the total 63 = 216 common colors. However, for 8 bit color representation, there are the total 256 colors. Therefore, the remaining 40 colors are left to OS. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 15. CMY and CMYK Color Models Y        1 B  C  1 R M   1 G C = Cyan M = Magenta Y = Yellow K = Black
  • 16. HSI Color Model RGB, CMY models are not good for human interpreting HSI Color model: Hue: Dominant color Saturation: Relative purity (inversely proportional to amount of white light added) Intensity: Brightness Color carrying information (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 17. Relationship Between RGB and HSI Color Models (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. RGB HSI
  • 18. Hue and Saturation on Color Planes 1. A dot is the plane is an arbitrarycolor 2. Hue is an angle from a red axis. 3. Saturation is a distance to the point.
  • 19. HSI Color Model (cont.) Intensity is given by a position on the vertical axis.
  • 20. HSI Color Model Intensity is given by a position on the vertical axis.
  • 21. Example: HSI Components of RGB Cube Hue Saturation Intensity (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image RGB Cube
  • 22. Converting Colors from RGB to HSI H   if B G if B G 360          1/2 2 (R G)  (R  B)(G  B) 1 (R  G)  (R  B)  cos12  3 R  G  B S 1 3 I  1 (R  G  B)
  • 23. Converting Colors from HSI to RGB B  I(1 S)   cos(60  H) S cosH  R  I   1   G 1 (R  B) RG sector: 0  H 120 GB sector:120 H  240 R  I(1 S)   S cosH  cos(60  H) G  I   1   B 1 (R  G) G  I(1 S)    S cosH cos(60  H ) B  I   1   R 1 (G  B) BR sector:240 H  360 H  H 120 H  H  240
  • 24. Example: HSI Components of RGB Colors (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Hue Saturation Intensity RGB Image
  • 25. Example: Manipulating HSI Components (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Hue Saturation Intensity RGB Image Hue Saturation Intensity RGB Image
  • 26. Color Image Processing There are 2 types of color image processes 1.Pseudocolor image process: Assigning colors to gray values based on a specific criterion. Gray scale images to be processed may be a single image or multiple images such as multispectral images 2.Full color image process: The process to manipulate real color images such as color photographs.
  • 27. Pseudocolor Image Processing Pseudo color = false color : In some case there is no “color” concept for a gray scale image but we can assign “false” colors to an image. Why we need to assign colors to gray scale image? Answer: Human can distinguish different colors better than different shades of gray. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 28. Intensity Slicing or Density Slicing  C if f (x, y)  T if f (x, y)  T g(x, y) C2 1 Formula: C1 = Color No.1 C2 = Color No.2 T Color C1 C2 T Intensity 0 L-1 A gray scale image viewed as a 3D surface.
  • 29. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Intensity Slicing Example An X-ray image of a weld with cracks After assigning a yellow color to pixels with value 255 and a blue color to all other pixels.
  • 30. Multi Level Intensity Slicing g(x, y)  Ck for lk1  f (x, y)  lk Ck = Color No.k lk = Threshold levelk Color C2 C 1 0 l1 L-1 l2 l3 Intensity lk lk-1 Ck Ck-1 C3
  • 31. Multi Level Intensity Slicing Example (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. g(x, y)  Ck for lk1  f (x, y)  lk Ck = Color No.k lk = Threshold levelk An X-ray image of the Picker Thyroid Phantom. After density slicing into 8 colors
  • 32. Color Coding Example (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. A unique color is assigned to each intensity value. Gray-scale image of average monthly rainfall. Color coded image Color map South Americaregion
  • 33. Gray Level to Color Transformation (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Assigning colors to gray levels based on specific mappingfunctions Red component Green component Blue component Gray scale image
  • 34. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Gray Level to Color Transformation Example An X-ray image of a garment bag with a simulated explosive device An X-ray image of a garment bag Color coded images Transformations
  • 35. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Gray Level to Color Transformation Example An X-ray image of a garment bag with a simulated explosive device An X-ray image of a garment bag Color coded images Transformations
  • 36. (Images from Rafael C. Gonzalez and Richard E. Pseudocolor Coding Wood, Digital Image Processing, 2nd Edition. Used in the case where there are many monochrome images such as multispectral satellite images.
  • 37. Washington D.C. area (Images from Rafael C. Gonzalez and Richard E. Pseudocolor Coding Example Visible blue = 0.45-0.52 m Max water penetration 1 Visible red = 0.63-0.69 m Near infrared = 0.76-0.90 m Plant discrimination Biomass and shoreline mapping Visible green = 0.52-0.60 m Measuring plant 2 3 4 Red = Green = Blue = Color composite images 1 2 3 Red = Green = Blue = 1 2 4 Wood, Digital Image Processing, 2nd Edition.
  • 38. Pseudocolor Coding Example Psuedocolor rendition of Jupiter moon Io Yellow areas = older sulfur deposits. Aclose-up Red areas = material ejected from active volcanoes. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 39. Basics of Full-Color Image Processing 2 Methods: 1.Per-color-component processing: process each component separately. 2.Vector processing: treat each pixel as a vector to be processed. Example of per-color-component processing: smoothing an image By smoothing each RGB component separately. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 40. Example: Full-Color Image and Variouis Color Space Components (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Color image CMYK components RGB components HSI components
  • 41. Color Transformation Use to transform colors to colors. Formulation: g( x, y)  T  f ( x, y) f(x,y) = input color image, g(x,y) = output color image T = operation on f over a spatial neighborhood of (x,y) When only data at one pixel is used in the transformation, we can express the transformation as: si  Ti (r1,r2, ,rn) i= 1, 2, …, n Where ri = color component of f(x,y) si = color component of g(x,y) For RGB images, n = 3
  • 42. Example: Color Transformation (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. sR (x, y)  krR(x, y) sG (x, y)  krG(x, y) sB (x, y)  krB(x, y) Formula for RGB: sI (x, y)  krI (x, y) Formula for CMY: sC (x, y)  krC(x, y)  (1 k) sM (x, y)  krM (x, y)  (1 k) sY (x, y)  krY (x, y)  (1 k) Formula for HSI: These 3 transformations give the same results. k = 0.7 I H,S
  • 43. Color Complements Color complement replaces each color with its opposite color in the color circle of the Hue component. This operation is analogous to image negative in a gray scale image. Color circle (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 44. Color Complement Transformation Example (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 45. Color Slicing Transformation    otherwise any 1 jn i   ri  W  s  0.5 if  rj  aj  2  We can perform “slicing” in color space: if the color of each pixel is far from a desired color more than threshold distance, we set that color to some specific color such as gray, otherwise we keep the original color unchanged. i= 1, 2, …, n or   otherwise 2 j1 i   ri if   2  n rj aj R0 s  0.5 Set to gray Keep the original color Set to gray Keep the original color i= 1, 2, …, n
  • 46. Color Slicing Transformation Example Original image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. After color slicing
  • 47. Tonal Correction Examples In these examples, only brightness and contrast are adjusted while keeping color unchanged. This can be done by using the same transformation for all RGB components. Contrast enhancement Power law transformations (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 48. Color Balancing Correction Examples (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Color imbalance: primary color components in white area are not balance. We can measure these components by using a color spectrometer. Color balancing can be performed by adjusting color components separately as seen in this slide.
  • 49. Histogram Equalization of a Full-Color Image Histogram equalization of a color image can be performed by adjusting color intensity uniformly while leaving color unchanged. The HSI model is suitable for histogram equalization where only Intensity (I) component is equalized.   k k nj sk  T(rk )   pr (rj ) j0 j0 N where r and s are intensity components of input and output color image.
  • 50. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Histogram Equalization of a Full-Color Image Original image After histogram equalization After increasing saturation component
  • 51. Color Image Smoothing 2 Methods: 1.Per-color-plane method: for RGB, CMY color models Smooth each color plane using moving averaging and the combine back to RGB 2. Smooth only Intensity component of a HSI image while leaving H and S unmodified. Note: 2 methods are not equivalent.          xy K  K K  K (x, y)S (x,y)Sxy (x,y)Sxy (x,y)Sxy B(x, y)  1  G(x, y)    R( x, y)  1 c(x, y)   1 c( x, y)  1
  • 52. Color Image Smoothing Example (cont.) (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Color image Red Green Blue
  • 53. Color Image Smoothing Example (cont.) Hue Saturation Intensity Color image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. HSI Components
  • 54. Color Image Smoothing Example (cont.) (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Smooth all RGB components Smooth only I component of HSI (faster)
  • 55. Color Image Smoothing Example (cont.) (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Difference between smoothed results from 2 methods in the previous slide.
  • 56. Color Image Sharpening We can do in the same manner as color image smoothing: 1. Per-color-plane method for RGB,CMY images 2. Sharpening only I component of a HSI image Sharpening all RGB components Sharpening only I component of HSI
  • 57. Color Image Sharpening Example (cont.) (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Difference between sharpened results from 2 methods in the previous slide.
  • 58. Color Segmentation 2 Methods: 1.Segmented in HSI color space: A thresholding function based on color information in H and S Components. We rarely use I component for color image segmentation. 2.Segmentation in RGB vector space: A thresholding function based on distance in a color vector space. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 59. Color Segmentation in HSI Color Space Color image Hue 1 2 3 Saturation 4 Intensity (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 60. Color Segmentation in HSI Color Space (cont.) 5 6 Product of 2 and 5 Binary thresholding of S component with T = 10% 7 Histogram of 8 Segmentation of red color pixels 6 Red pixels (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 61. Color Segmentation in HSI Color Space (cont.) Color image Segmented results of red pixels (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 62. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Color Segmentation in RGB Vector Space 1. Each point with (R,G,B) coordinate in the vector space represents one color. 2. Segmentation is based on distance thresholding in a vector space  0 g(x, y)  1 if D(c(x, y),cT )  T if D(c(x, y),cT )  T cT = color to be segmented. c(x,y) = RGB vector at pixel (x,y). D(u,v) = distance function
  • 63. Example: Segmentation in RGB Vector Space Results of segmentation in RGB vector space with Threshold value Color image Reference color cT to besegmented cT  average color of pixel in the box T = 1.25 times the SD of R,G,B values In the box (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 64. Gradient of a Color Image Since gradient is define only for a scalar image, there is no concept of gradient for a color image. We can’t compute gradient of each color component and combine the results to get the gradient of a color image. Red Green Blue Edges We see 4 objects. We see 2 objects. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 65. Gradient of a Color Image (cont.) One way to compute the maximum rate of change of a color image which is close to the meaning of gradient is to use the following formula: Gradient computed in RGB color space: 1 2     2 yy xy xx yy xx  g ) cos2  2g sin2  g ) (g F()  1 (g      yy xx 2gxy 2  g  g   1 tan1  R 2 G 2 B 2  x  x gxx  x R 2 G 2 B 2  y  y gyy  y gxy  R R  G G  B B x y x y x y
  • 66. Obtained using the formula in the previous slide Sum of gradients of each color component Original image 2 3 Difference between 22 and 33 Gradient of a Color Image Example (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 67. Gradients of each color component Red Green Blue Gradient of a Color Image Example (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.
  • 68. Noise in Color Images Noise can corrupt each color component independently. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Noise is less noticeable in a color image AWGN  =800 2 AWGN  =800 2 AWGN  =800 2
  • 69. Noise in Color Images (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Hue Saturation Intensity
  • 70. Noise in Color Images (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Hue Saturation Intensity Salt & pepper noise in Green component
  • 71. Color Image Compression JPEG2000 File Original image After lossy compression with ratio 230:1 (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.