18-11-2015
1
Digital Image Processing Chapter 8
COLOR IMAGE PROCESSING
Preview
Preview
Light
Light is fundamental for color vision
Unless there is a source of light, there is nothing to see!
What do we see?
We do not see objects, but the light that has been
reflected by or transmitted through the objects
Light and EM waves
Light is an electromagnetic wave
If its wavelength is comprised between 400 and 700 nm
(visible spectrum), the wave can be detected by the human
eye and is called monochromatic light
Physical properties of light
This distribution may indicate:
1) a dominant wavelength (or frequency) which is the color
of the light (hue),
2) brightness (luminance), intensity of the light (value),
3) purity (saturation), which describes the degree of
vividness.
18-11-2015
2
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Spectrum of White Light
1666 Sir Isaac Newton, 24 year old, discovered white light spectrum.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Electromagnetic Spectrum
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
• The color that human perceive in an
object = the light reflected from the
object
Illumination source scene
reflection eye
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Sensitivity of Cones in the Human Eye
6-7 millions 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 l’Eclairage
(The International Commission on Illumination)
Primary and Secondary Colors
Primary
color
Primary
color
Primary
color
Secondary
colors
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Primary and Secondary Colors (cont.)
Additive primary colors: RGB
use in the case of light sources
such as color monitors
Subtractive primary colors: CMY
use in the case of pigments in
printing devices
RGB add together to get white
White subtracted by CMY to get
Black
18-11-2015
3
Light and Color
The frequency ( or mix of frequencies ) of the light determines the color.
The amount of light(sheer quantity of photons ) is the intensity.
Three independent quantities are used to describe any particular color. :
hue, saturation, and lightness or brightness or intensity.
The hue is determined by the dominant wavelength.(the apparent color
of the light)
When we call an object
"red," we are referring to
its hue. Hue is
determined by the
dominant wavelength.
Light and Color
The saturation is determined by the excitation purity , and depends
on the amount of white light mixed with the hue. A pure hue is fully
saturated, i.e. no white light mixed in. Hue and saturation together
determine the chromaticity for a given color.
The saturation of
a color ranges
from neutral to
brilliant. The circle
on the right is a
more vivid red
than the circle on
the left although
both have the
same hue.
Light and Color
Finally, the intensity is determined by the actual amount of
light, with more light corresponding to more intense colors
( the total light across all frequencies).
Lightness or
brightness
refers to the
amount of
light the
color
reflects or
transmits.
Hue: dominant color corresponding to a dominant
wavelength of mixture light wave
Saturation: Relative purity or amount of white light mixed
with a hue (inversely proportional to amount of white
light added)
Brightness: Intensity
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.
Wood, Digital Image Processing, 2nd Edition.
CIE Chromaticity Diagram
Trichromatic coefficients:
ZYX
Xx
ZYX
Yy
ZYX
Zz
1 zyx
x
y
Points on the boundary are
fully saturated colors
18-11-2015
4
Color Gamut of Color Monitors and Printing Devices
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Gamut of Color Monitors and Printing Devices
Color Monitors
Printing devices
Color Fundamentals (con’t)
Tri-stimulus values: The amount of Red, Green and Blue needed to form any particular color
Denoted by: X, Y and Z
ZYX
Xx
ZYX
Yy
ZYX
Zz
1 zyx
Tri-chromatic coefficient:
Color Models
The purpose of a color model (also called color space or color system)
is to facilitate the specification of colors in some standard, generally
accept way.
RGB (red, green, blue) : monitor, video camera.
CMY(cyan, magenta, yellow),CMYK (CMY, black) model for color
printing.
and HSI model, which corresponds closely with the way humans
describe and interpret color.
RGB (red, green, blue) The RGB colour space is related to human vision through the
tristimulus theory of colour vision.
The RGB is an additive colour model. The primary colours red,
green and blue are combined to reproduce other colours.
In the RGB colour space, a colour is represented by a triplet (r,g,b)
r gives the intensity of the red component
g gives the intensity of the green component
b gives the intensity of the blue component
Here we assume that r,g,b are real numbers in the interval [0,1].
You will often see the values of r,g,b as integers in the interval
[0,255].
18-11-2015
5
RGB Color model
25
Active displays, such as computer monitors and television sets, emit
combinations of red, green and blue light. This is an additive color model
Source: www.mitsubishi.com
(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
The RGB Color Spaces
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
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
Red fixed at 127
• Most modern computer monitors can transmit “true color,” or 24-bit
color. This means each “channel” (R, G, or B) contains 8 bits per
channel that can transmit color.
• Eight bits means the channel can make eight combinations of on or off
of the color, per pixel, 256 colors total. You have three channels. How
many colors can be generated?
• 256 x 256 x 256=16,777,216 possible colors.
RGB Color Model (cont.)
• Eight-bit color also exists, 256 colors total.
• These are called “web-safe” colors, because they are sure to render
accurately on anyone’s monitor.
• Nowadays we don’t have to worry about that as much.
– (Below: 8-bit vs. 24-bit color.)
RGB Color Model (cont.)
18-11-2015
6
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Safe RGB Colors
Safe RGB colors: a subset of RGB colors.
There are 216 colors common in most operating systems.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
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.
• Additive color won’t work for printing because we can’t begin
with black.
• We must begin with a piece of paper, and that’s usually
white.
• White, as we know, is all colors. So we can’t add to all colors.
We must subtract.
• Furthermore, an offset printing press can’t generate the
enormous number of colors available on a computer screen.
• We need to run a piece of paper through the press for each
ink.
CMY Color model
• The press below has four heads, one for each ink in
the CMYK system.
CMY Color model
• Printed color, therefore, is based on the subtractive system.
• While the additive primaries (used to generate all colors )
are RGB, beginning with black…
• …the subtractive primaries are Cyan, Magenta, Yellow and
Black (CMYK), and begin with white.
• Cyan=blue-green. Magenta=red-blue. Yellow=red-green.
• Note the relationship between the additive and subtractive
primaries.
CMY Color model
18-11-2015
7
• You can actually project the additive colors to produce the
subtractive.
CMY Color model
B
G
R
Y
M
C
1
1
1
C = Cyan
M = Magenta
Y = Yellow
K = Black
CMY Color model
• Why?
Pigments absorb light
• Thinking:
the Color Filters
• Question:
Yellow + Cyan=?
CMY Color model CMY Color model
40
Passive displays, such as color inkjet printers, absorb light instead of
emitting it. Combinations of cyan, magenta and yellow inks are used. This
is a subtractive color model.
Source: www.hp.com
CMY
CMY cartridges for colour printers.
The CMY and CMYK Color Spaces
18-11-2015
8
The CMY and CMYK Color Models
B
G
R
Y
M
C
1
1
1
Cyan, Magenta and Yellow are the secondary colors
of light
Most devices that deposit colored pigments on
paper, such as color printers and copiers, require
CMY data input.
The conversion from RGB to CMY is given by the formula
Example 11.2: The red colour is written in RGB as (1,0,0). In CMY it is
written as
that is, magenta and yellow.
1
1
0
0
0
1
1
1
1
1
1
1
b
g
r
y
m
c
b
g
r
y
m
c
1
1
1
Example 11.3: The magenta is written in CMY as (0,1,0). In RGB it is
written as
giving,
that is, red and blue.
b
g
r
1
1
1
0
1
0
1
0
1
0
1
0
1
1
1
b
g
r
The image on the left was printed with only CMY inks
Black inks add contrast and depth to image on the image on
the right
CMYK Color model
• Subtractive primaries are based on ink colors of CMYK.
• Black is abbreviated “K” by tradition, perhaps because it is the “key” color.
• In color printing, you need black to make the other colors vibrant and
snappy.
• This is why the subtractive process is also called the four-color process,
producing color separations, or “seps.”
• Colors used are called the process colors.
CMYK Color model CMYK Color model
For printing and graphics art industry, CMY is not enough; a
fourth primary, K which stands for black, is added.
Conversions between RGB and CMYK are possible, although
they require some extra processing.
18-11-2015
9
Relationship Between RGB and HSI Color Models Relationship Between RGB and HSI Color Models
HSI color model
• Will you describe a color using its R, G, B components?
• Human describe a color by its hue, saturation, and
brightness
– Hue : color attribute
– Saturation : purity of color (white->0, primary color->1)
– Brightness : achromatic notion of intensity
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
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
HSI Color Model
53
H dominant
wavelength
S purity
% white
I Intensity
Source: http://www.cs.cornell.edu/courses/cs631/1999sp/ (Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Relationship Between RGB and HSI Color Models
RGB HSI
18-11-2015
10
Hue and Saturation on Color Planes
1. A dot is the plane is an arbitrary color
2. Hue is an angle from a red axis.
3. Saturation is a distance to the point.
HSI Color Model
• Hue is defined as an angle
– 0 degrees is RED
– 120 degrees is GREEN
– 240 degrees is BLUE
• Saturation is defined as the percentage of distance from
the center of the HSI triangle to the pyramid surface.
– Values range from 0 to 1.
• Intensity is denoted as the distance “up” the axis from
black.
– Values range from 0 to 1
56
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.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Example: HSI Components of RGB Cube
Hue Saturation Intensity
RGB Cube
Converting Colors from RGB to HSI
GB
GBH
if 360
if
2/12
1
))(()(
)()(2
1
cosBGBRGR
BRGR
BGRS
31
)(3
1BGRI
18-11-2015
11
Converting Colors from HSI to RGB
)1( SIB
)60cos(
cos1
H
HSIR
)(1 BRG
RG sector: 1200 H GB sector: 240120 H
)1( SIR
)60cos(
cos1
H
HSIG
)(1 GRB
)1( SIG
)60cos(
cos1
H
HSIB
)(1 BGR
BR sector: 360240 H
120 HH
240 HH
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Example: HSI Components of RGB Colors
Hue
Saturation Intensity
RGB
Image
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Example: Manipulating HSI Components
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.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Pseudocolor Image Processing
Why we need to assign colors to gray scale image?
Answer: Human can distinguish different colors better than different
shades of gray.
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.
Intensity Slicing or Density Slicing
TyxfC
TyxfCyxg
),( if
),( if ),(
2
1
Formula:
C1 = Color No. 1
C2 = Color No. 2
T
Intensity
Co
lor
C1
C2
T 0 L-1
A gray scale image viewed as a 3D surface.
18-11-2015
12
(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
kkk lyxflCyxg ),(for ),( 1
Ck = Color No. k
lk = Threshold level k
Intensity
Co
lor
C1
C2
0 L-1
l1 l2 l3 lk lk-1
C3
Ck-1
Ck
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Multi Level Intensity Slicing Example
kkk lyxflCyxg ),(for ),( 1
Ck = Color No. k
lk = Threshold level k
An X-ray image of the Picker
Thyroid Phantom. After density slicing into 8 colors
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Coding Example
A unique color is assigned to
each intensity value.
Gray-scale image of average
monthly rainfall.
Color coded image
Color
map
South America region
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Gray Level to Color Transformation
Assigning colors to gray levels based on specific mapping functions
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
18-11-2015
13
(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.
Pseudocolor Coding
Used in the case where there are many monochrome images such as multispectral
satellite images.
Color theory
Some general guidelines for choosing color:
• Differences will be emphasized. For example, yellow
surrounded by green will tend to appear more yellow;
green surrounded by yellow will tend to appear more
green. This is the rule of simultaneous contrast.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Pseudocolor Coding Example
Washington D.C. area
Visible blue
= 0.45-0.52 mm Max water penetration
Visible green
= 0.52-0.60 mm Measuring plant
Visible red
= 0.63-0.69 mm Plant discrimination
Near infrared
= 0.76-0.90 mm Biomass and shoreline mapping
1 2
3 4 Red =
Green =
Blue =
Color composite images
1 2 3
Red =
Green =
Blue =
1 2 4
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Pseudocolor Coding Example
Psuedocolor rendition
of Jupiter moon Io
A close-up
Yellow areas = older sulfur deposits.
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.
18-11-2015
14
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Example: Full-Color Image and Variouis Color Space Components
Color image
CMYK components
RGB components
HSI components
Color Transformation
Formulation:
),(),( yxfTyxg
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:
),,,( 21 nii rrrTs i= 1, 2, …, n
Where ri = color component of f(x,y)
si = color component of g(x,y)
Use to transform colors to colors.
For RGB images, n = 3
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Example: Color Transformation
),(),(
),(),(
),(),(
yxkryxs
yxkryxs
yxkryxs
BB
GG
RR
Formula for RGB:
),(),( yxkryxs II
Formula for CMY:
)1(),(),(
)1(),(),(
)1(),(),(
kyxkryxs
kyxkryxs
kyxkryxs
YY
MM
CC
Formula for HSI:
These 3 transformations give
the same results.
k = 0.7
I H,S
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
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 Color Slicing Transformation
otherwise
2if 5.0
1
i
njany
jj
i
r
War
s
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
if 5.01
2
0
2
i
n
j
jji
r
Rar s
Set to gray
Keep the original
color
Set to gray
Keep the original
color
i= 1, 2, …, n
18-11-2015
15
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Slicing Transformation Example
Original image
After color slicing
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
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.
Power law transformations
Contrast enhancement
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Balancing Correction Examples
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
j
j
k
j
jrkk
N
n
rprTs
0
0
)()(
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.
xy
xy
xy
xy
Syx
Syx
Syx
Syx
yxBK
yxGK
yxRK
yxK
yx
),(
),(
),(
),(
),(1
),(1
),(1
),(1
),( cc
Note: 2 methods are not equivalent.
18-11-2015
16
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Image Smoothing Example (cont.)
Color image Red
Green Blue
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Image Smoothing Example (cont.)
Hue Saturation Intensity
Color image
HSI Components
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Image Smoothing Example (cont.)
Smooth all RGB components Smooth only I component of HSI
(faster)
Color Image Smoothing Example (cont.)
Difference between
smoothed results from 2
methods in the previous
slide.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
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 (Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Image Sharpening Example (cont.)
Difference between
sharpened results from 2
methods in the previous
slide.
18-11-2015
17
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
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.
Color Segmentation in HSI Color Space
Hue
Saturation Intensity
Color image
1 2
3 4
(Images from Rafael C.
Gonzalez and Richard E.
Wood, Digital Image
Processing, 2nd Edition.
Color Segmentation in HSI Color Space (cont.)
Product of and
5 6
7 8
5 2 Binary thresholding of S component
with T = 10%
Histogram of 6 Segmentation of red color pixels
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
TyxD
TyxDyxg
T
T
)),,(( if 0
)),,(( if 1),(
cc
cc
cT = color to be segmented.
c(x,y) = RGB vector at pixel (x,y). D(u,v) = distance function (Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Example: Segmentation in RGB Vector Space
Color image
Results of segmentation in
RGB vector space with Threshold
value
Reference color cT to be segmented box thein pixel ofcolor average Tc
T = 1.25 times the SD of R,G,B values
In the box
18-11-2015
18
(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.
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:
2
1
2sin22cos)()(2
1)(
xyyyxxyyxx gggggF
yyxx
xy
gg
g2tan
2
1 1
222
x
B
x
G
x
Rgxx
222
y
B
y
G
y
Rg yy
y
B
x
B
y
G
x
G
y
R
x
Rgxy
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Obtained using
the formula
in the previous
slide
Sum of
gradients of
each color
component
Original
image
Difference
between
2 and 3
2
3
2 3
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
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 sh2=800 AWGN sh
2=800
AWGN sh2=800
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Noise in Color Images
Hue Saturation Intensity
18-11-2015
19
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Noise in Color Images
Hue
Saturation Intensity
Salt & pepper noise
in Green component
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Image Compression
JPEG2000 File
Original image
After lossy compression with ratio 230:1
Top Related