Color
ImagePacessing
Spectrum of While Light
FIGURE 6.J Color spectrum seen by passing white light through aprism. (Courtesy of the
General Electric Co.. Lamp Business Division.)
1666 Sir Isaac Newton, 24 year old, discovered white light
spectrum.
(Images from Rafael C. Gonzales and Richard
E. Wood. Digital Image Processing, 2^ Edition.
Electromagnetic Spectrum
s 90 OOO
W
A
V
G
L G
H
G TH
INanemelerel
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) Luniinaiice = amount of energy received by an observer
(lumens) Brightness intensity
IO 00 500
B
Inc
green
8
G
been
Redîsh
orang
8
Sensltlvlfy of Cones In the Humen Eye
s
Blue
400 450
Red
650
6-7 millions cones
in a human eye
- 65%
sensitive to Red
light
- 33% sensitive
to Green light
- 2 % sensitive
to Blue light
CIE = Commission Internationale de
l'Eclairage
Primary colors:
Defined CIE in
1931
Red = 700 nm
Green =
546.1nm Blue =
435.8 nm
I. p
m homRafaC
e.Glonzalez
Primary and Secondary Colom
Primary
color
Secondary
colors
Primary
Primary and Secondary Colors (cont.)
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 subtiacted by CMY to set
Bl‹ick
Color Characterization
Hue:
Saturation:
Brightness:
Hue
Saturation
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
Chromaticity
amount of red (X), green (Y) and blue (Z) to form any
particular color is called tristiiiiiilu›.
RGB color model
Magento
(l. 0. 0)
Red
Blue
(' '’
’
Black !•*’
G
’
ay scale
• White
Yellow
(0, 1.
0}
Green
Purpose of color models: to facilitate the specification of colors
in some standard
RGB color models:
- based on cartesian
coordinate system
fImages from Rafael C. Gonzalez and Richard E.
Wood. Digital Image Processing, 2" Edition.
RGB Color Cu6e
(R 0] (G 0)
R 8bits
G 8bits
B 8bits
( fi 0)
Color depth 24
bits 16777216
colors
Hidden
faces of the
cube
flinuyes from Rafael C. Gonzalez und RichurJ E
V‹›nd. Digital finule Pr‹+messing, 2"' Edition.
ØÜØ ÜOlOf ñ#OÖ8l (COTłt.)
Red fixed at 127
Green
Bìue
RGB
fImages from Rafael C. Gonzalez and Richard E.
Wood. Digital Image Processing, 2" Edition.
Safe RGB colors: a subset of RGB
colors.
There are 216 colors common in most operating
systems.
FIGURE 6.JO
(a)The 216
safe RGB
colors
(b) All the
grays
in the 256-color
RGB system
(grays that ate
part of the safe
color group are
shown
underlined).
(Images from Rafael C. Gonzales arid Richard E.
Wood. Digital Image Processing, 2^ Edition.
Nzmbw Bystnzo
Hex 00 33 66 99 CC FF
Decimal 0 51 102 153 204 25S
KGB GuAe
TfiPLfi 6.1
V
alid values of
each RGB
component in
a
safe color.
The RGB Cube is divided into 6
intervals on each axis to achieve
the total 63 = 216 common colors.
However, fer 8 bit color
20 colors. Thexfom, the
zco›aiaing
40cotors am I•ft a os.
(Images from Rafael C. Gonzales azrd Richard E.
Wood. Digital Image Processing, 2 Edition.
HS/ Color Model
í=0.7
ñ
Magcnta
RŒ
Intensity is given by a position on the vertical axis.
RoIatIonahIp Between RGB and HSI Color â#odeIs
Blu
e
{Magent
a
ŸGreen
i
Black
RGB
Yellow
Red
HSI
(Images horn Rafael C. Gonzalez and Richard
E. Wood, Dit;ita1 Image Processing, 2^ Edition.
Yellow
/fS/ Color â odel (cont)
Intensity is given by a position on the vertical axis.
f - 0.S
Blue
Blach
Magenta
Red
HS/ Color Model
Intensity is given by a position on the vertical axis.
í=0.7
ñ
Magenta
RŒ
Hue
RGB Cube
Saturation Intensity
fImages from Rafael C. Gonzalez and Richard E.
Wood. Digital Image Processing, 2" Edition.
Oonrexlng Colors mom BGB to HSI
H
*560 Ãä
I
1
3
G)2
R QB)íG B)J
2
ConveNing Colors from HSI to
RGB
RG sectto: 0 al20 GB sector:120 f@I
040
BR sector: 240 lgPf lZB60
H EH 40
S oo$ H
cos(60’
H)
G /(1 S)
S cos If
cos(60°
H)
RGB
Image
(Images from Rafael C. Gonzales azrd Richard E.
Wood. Digital Image Processing, 2 Edition.
Saturation
Hue
Intensity
RGB
Image
(Images from Rafael C. Gonzales azrd Richard E.
Wood. Digital Image Processing, 2 Edition.
Hue Hue
Saturation Intensity Intensity
Satwation
RGB
Image
There are 2 types of color image
processes
1. Pneudocolor image prix:ess: Assigning colors to gray
values based on a specific criRrion. Gray scale images to be pivccsed
may be a single image or multiple inugcE such es multispecoal images
2. Full color image process: The process to manipulate
real color images such as color photographs.
Pseudosolor 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.
fImages from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2* Edition.
Intensity Slicing or Denslfy
Sficfng
Formula:
8(‹.y)
•
(Black) 0,
G rsy-level sxis
(White) L - I
Slicing plane
1
2
S f Ex› v)
i$ih
• f( y)
C Color No.
1
C Color No.
2
A gray scale image viewed as a 3D surface.
Intensity
L-1
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.
fImages from Rafael C. Gonzalez and Richard E.
Wood. Digital Image Processing, 2" Edition.
Multi Level Intensity Slicing
Intensity
C ——Color No. k
1 = Threshold level
k
L
—
I
Cl ——Color No. £
1 = Threshold level £
An X-ray image of the
Picker Thyroid Phantom.
After density slicing into 8
colors
fImages from Rafael C. Gonzalez and Richard E.
Wood. Digital Image Processing, 2" Edition.
Color Coding
Example
Color coded
image
A unique colOr is assigned to
each intensity value.
Ciray-scale image of average
monthly rainfall.
Colo
r
ma
p
SOuth America region
flmages from Rafael C. Gonzalez and Richard E.
Wood. Digiutl finule Processing, 2"' Edition.
Grey Level to Color Tranefornietlon
Assigning colors to gray levels based on specific mapping
functions
Green
transformation
Blue
transformation
(Images horn Rafael C. Gonzalez and Richard
E. Wood, Digital Image Processing, 2^ Edition.
An X-ray image
of a garment
bag
Transformations
An X-ray image of
a garment bag with
a simulated
explosive
Wood, Digital Image
Processing, 2* Bdifion
Color
coded
images
An X-ray image
of a garment
bag
Transformations
An X-ray image of
a garment bag with
a simulated
explosive
Wood, Digital Image
Processing, 2* Bdifion
Color
coded
images
Psaudosolor Coding
(Images horn Rafael C. Gonzalez and Richard
E. Wood, Digital Image Processing, 2^ Edition.
Used in the case where there are many monochrome images such as multispectral
satellite images.
Tfansfotmation Tp
TfanSfoimation F
g2(›. r)
Transformation T1
Psuedocolor rendition
of Jupiter moon Io
(Images horn Rafael C. Gonzalez and Richard
E. Wood, Digital Image Processing, 2^ Edition.
Yellow areas = older sulfur
deposits.
Red
areas
= material ejected
from active
volcanoes.
A close-
up
Psuedocolor rendition
of Jupiter moon Io
(Images horn Rafael C. Gonzalez and Richard
E. Wood, Digital Image Processing, 2^ Edition.
Yellow areas = older sulfur
deposits.
Red
areas
= material ejected
from active
volcanoes.
A close-
up
B»slce oFFull-Color Image Procaeelng
(Images horn Rafael C. Gonzalez and Richard
E. Wood, Digital Image Processing, 2^ Edition.
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.
Spatial mask
Gray-scale image
Spatial
mask
RGB color
image
Red
Color image
Magama
sarisañoa
Bla
i
CMYK
components
RGB
components
HSI
components
(Images from Rafael C. Gonzales arid Richard E.
Wood. Digital Image Processing, 2^ Edition.
Color Transformation
Use to transform color's to colors.
Formulation:
fax,y) ——input color image, g{x,y) ——output color imdge
T -— operation on fover a spatial neighborhood o1 (. ,i!)
When data at one pixel is used in the transformation, we
can express the transformation as:
s, IT, r,,
r2,..., r„) i
—— 1,
2, ..., n
Where r
d -- color component
ofj"(x„)
st —- color component of g
For RGB images, n 3
Exampla: Color TiansÆrmaRon
Formula for RGB:
Formula for
HSI:
Formula for CMY:
l
$k)
sM{x, y) KkrM{x, .y)
sF ‹x, y) JkrF lx, y) l
)
Thèse 3 œansformaûons give
the same results.
(Images horn Rafael C. Gonzalez and Richard
E. Wood, Digital Image Processing, 2^ Edition.
Color complement replaces each color with its opposite color in
the color circle of the Hue component. This opemtion is an&ogous to
image negative in a gray cale image.
Wood. Digital Image Processing, 2 Edition.
an Color
circle
(Images from Rafael C. Gonzales azrd Richard E.
complement
transformations
(a) Original
(b)Complem
ent
transformation
functions
(c)Compleraent
of(a) based on
ihe RGB
mapping
approximation of
ihe R€i B
complement using
HSI
transformations
Wood. Digital Image Processing, 2 Edition.
(Images from Rafael C. Gonzales aird Richard E.
Color Slicing Tr»nstormetion
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.
0.5
!›!
"r, olerwise
Set to gray
Keep the
original
COlor
i= 1, 2, ..., n
*‘r
, otherwise
Set to
gray
Keep the
original
color
i= 1, 2, ...,
is
Original
image
Añer color
slicing
fiKURfi
£J4
Color slicing transformations that detect (a) reds within an RGB cube of
width i¥ = 0.2549 centered at (0.6863, 0.1608, 0.1922), and (b) reds within an RGB
sphere of radius 0.1765 centered at the mine point.Pixels outside the cube and sphere
were replaced by color (US, 0.5, 0A).
(Images from Rafael C. Gonzales azrd Richard E.
Wood. Digital Image Processing, 2 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.
Contrast enhancement
Power law transformations
flinuyes from Rafael C. Gonzalez und RichurJ E
V‹›nd. Digital finule Pr‹+messing, 2"' 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.
- in
(Images from Rafael C. Gonzales and Richard
E. Wood. Digital Image Processing, 2^ Edition.
Hletogmm Equ»IIxaRon o0e Full-Colorlmage
(lmagee from Rafael C.
conzales aad Richard E.
food. Digital Image
Prc›ccssirig, 2^ Ediôon.
0
.
5
FIGUR£ 647
Hislogtam
equalization
(followed by
saturation
adjustment) in the
HSI color spaœ.
Hletogmm Equ»IIxaRon o0e Full-Colorlmage
(lmagee from Rafael C.
conzales aad Richard E.
food. Digital Image
Prc›ccssirig, 2^ Ediôon.
0
.
5
FIGUR£ 647
Hislogtam
equalization
(followed by
saturation
adjustment) in the
HSI color spaœ.
Color Image Smoothing
£ Methods:
1. Per-color-$ rlne method: for RGB, CMY color
models
Smooth each color plane using moving averaging
and the combine back to RGB
c(x, y) o
—1
K
2. Smooth only Intensity component of a HSI image while
leaving H and S unmodified.
Note: 2 methods we not equivalent.
Gotor lmnga &moothlng Example (cont.J
(Images from Rafael C. Gonzales and Richard
E. Wood. Digital Image Processing, 2^ Edition.
DiSerence between
smoothed results from
2 methods in the
previous slide.
Gotor lmnga &moothlng Example (cont.J
(Images from Rafael C. Gonzales and Richard
E. Wood. Digital Image Processing, 2^ Edition.
DiSerence between
smoothed results from
2 methods in the
previous slide.
Gotor lmnga &moothlng Example (cont.J
(Images from Rafael C. Gonzales and Richard
E. Wood. Digital Image Processing, 2^ Edition.
DiSerence between
smoothed results from
2 methods in the
previous slide.
Gotor lmnga &moothlng Example (cont.J
(Images from Rafael C. Gonzales and Richard
E. Wood. Digital Image Processing, 2^ Edition.
DiSerence 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 Imege Sharpening Example{con1/
DiSerence between
sharpened results from
2 methods in the
previous slide.
(Images from Rafael C. Gonzales and Richard
E. Wood. Digital Image Processing, 2^ Edition.
Color Segmenfation
£ 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.
flinuyes from Rafael C. Gonzalez und RichurJ E
V‹›nd. Digital finule Pr‹+messing, 2"' Edition.
Color
image
Hue
Saturation Intensity (tmages fmm Rafael C.
Gonzalez and Richard
E. Wood, Orbital Image
Color
image
(Images from Rafael C.
Gonzalez aad Richard E.
Wood. Digital Image
Processi
Segmented results of red
pixels
Color
image
(Images from Rafael C.
Gonzalez aad Richard E.
Wood. Digital Image
Processi
Segmented results of red
pixels
FIGUR£ 6.43
Three approaches
for enclosing data
regions for RCiB
vector
segmentation.
(Images from Rafael C. Gonzalez and Richard E.
Wood, Orbital Image Processing. 2^ Edition.
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
D[n,v) -- distance
function
c,= color to be segmented.
c(x,y) RGB vector at pixel
(x,y).
Example: Segmentation In RGB Vector Spaae
Color image
Reference color cj to be segmented
c, Wlvemgp cok›r of pixel in the
box
Results of segmentation in
RGB vector space with
Threshold value
F= 1.25 times the SD of R,G,B
values In the box(Images horn Rafael C. Gonzalez and Richard
E. Wood, Digital Image Processing, 2^ Edition.
R G
f
B
H
Gradient ofa 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.
Edges
We see
2 objects.
We see
4 objects.
fImages from Rafael C. Gonzalez and Richard E
Wood, Digital Image Processing, 2* 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:
F(K) e"
—
1
"2
L
—
tan
2
Red
Green
Blue
flmages from Rafael C. Gonzalez and Richard E.
Wood. Digiutl finule Processing, 2"' Edition.
Gredlant ote Color Im»go
Example
Gradients of each color
component
Red
Green
Blue
flmages from Rafael C. Gonzalez and Richard E.
Wood. Digiutl finule Processing, 2"' Edition.
Gredlant ote Color Im»go
Example
Gradients of each color
component
Salt & pe er
noise in Green
o nt
o
n
Rafael C. Gonzalez arid Richard
E. Wood, Digital Image Processing, 2^ Edition.
c d
F
I
O
U
R
G 6.50
(a)RGB
image with green
p ane
ț corruplcd
hy salt- and-
pepper nuise.
(b)Hue
component of
HSI imagv.
(c)Saturati
t›n
component.
(d) Intensity
ctimponent.
Salt & pe er
noise in Green
o nt
o
n
Rafael C. Gonzalez arid Richard
E. Wood, Digital Image Processing, 2^ Edition.
c d
F
I
O
U
R
G 6.50
(a)RGB
image with green
p ane
ț corruplcd
hy salt- and-
pepper nuise.
(b)Hue
component of
HSI imagv.
(c)Saturati
t›n
component.
(d) Intensity
ctimponent.
Salt & pe er
noise in Green
o nt
o
n
Rafael C. Gonzalez arid Richard
E. Wood, Digital Image Processing, 2^ Edition.
c d
F
I
O
U
R
G 6.50
(a)RGB
image with green
p ane
ț corruplcd
hy salt- and-
pepper nuise.
(b)Hue
component of
HSI imagv.
(c)Saturati
t›n
component.
(d) Intensity
ctimponent.
Color Image Compression
Wood, Digital Image Processing, 2^
Original image
After lossy compression with ratio 230:
JPEG2000
File
(Images horn Rafael C. Gonzalez and Richard
E.

color image processing and color spaces.pptx

  • 1.
  • 2.
    Spectrum of WhileLight FIGURE 6.J Color spectrum seen by passing white light through aprism. (Courtesy of the General Electric Co.. Lamp Business Division.) 1666 Sir Isaac Newton, 24 year old, discovered white light spectrum. (Images from Rafael C. Gonzales and Richard E. Wood. Digital Image Processing, 2^ Edition.
  • 3.
    Electromagnetic Spectrum s 90OOO W A V G L G H G TH INanemelerel 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) Luniinaiice = amount of energy received by an observer (lumens) Brightness intensity IO 00 500
  • 4.
    B Inc green 8 G been Redîsh orang 8 Sensltlvlfy of ConesIn the Humen Eye s Blue 400 450 Red 650 6-7 millions cones in a human eye - 65% sensitive to Red light - 33% sensitive to Green light - 2 % sensitive to Blue light CIE = Commission Internationale de l'Eclairage Primary colors: Defined CIE in 1931 Red = 700 nm Green = 546.1nm Blue = 435.8 nm I. p m homRafaC e.Glonzalez
  • 5.
    Primary and SecondaryColom Primary color Secondary colors Primary
  • 6.
    Primary and SecondaryColors (cont.) 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 subtiacted by CMY to set Bl‹ick
  • 7.
    Color Characterization Hue: Saturation: Brightness: Hue Saturation dominant colorcorresponding 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 Chromaticity amount of red (X), green (Y) and blue (Z) to form any particular color is called tristiiiiiilu›.
  • 8.
    RGB color model Magento (l.0. 0) Red Blue (' '’ ’ Black !•*’ G ’ ay scale • White Yellow (0, 1. 0} Green Purpose of color models: to facilitate the specification of colors in some standard RGB color models: - based on cartesian coordinate system fImages from Rafael C. Gonzalez and Richard E. Wood. Digital Image Processing, 2" Edition.
  • 9.
    RGB Color Cu6e (R0] (G 0) R 8bits G 8bits B 8bits ( fi 0) Color depth 24 bits 16777216 colors Hidden faces of the cube flinuyes from Rafael C. Gonzalez und RichurJ E V‹›nd. Digital finule Pr‹+messing, 2"' Edition.
  • 10.
    ØÜØ ÜOlOf ñ#OÖ8l(COTłt.) Red fixed at 127 Green Bìue RGB fImages from Rafael C. Gonzalez and Richard E. Wood. Digital Image Processing, 2" Edition.
  • 11.
    Safe RGB colors:a subset of RGB colors. There are 216 colors common in most operating systems. FIGURE 6.JO (a)The 216 safe RGB colors (b) All the grays in the 256-color RGB system (grays that ate part of the safe color group are shown underlined). (Images from Rafael C. Gonzales arid Richard E. Wood. Digital Image Processing, 2^ Edition.
  • 12.
    Nzmbw Bystnzo Hex 0033 66 99 CC FF Decimal 0 51 102 153 204 25S KGB GuAe TfiPLfi 6.1 V alid values of each RGB component in a safe color. The RGB Cube is divided into 6 intervals on each axis to achieve the total 63 = 216 common colors. However, fer 8 bit color 20 colors. Thexfom, the zco›aiaing 40cotors am I•ft a os. (Images from Rafael C. Gonzales azrd Richard E. Wood. Digital Image Processing, 2 Edition.
  • 14.
    HS/ Color Model í=0.7 ñ Magcnta RŒ Intensityis given by a position on the vertical axis.
  • 15.
    RoIatIonahIp Between RGBand HSI Color â#odeIs Blu e {Magent a ŸGreen i Black RGB Yellow Red HSI (Images horn Rafael C. Gonzalez and Richard E. Wood, Dit;ita1 Image Processing, 2^ Edition. Yellow
  • 17.
    /fS/ Color âodel (cont) Intensity is given by a position on the vertical axis. f - 0.S Blue Blach Magenta Red
  • 18.
    HS/ Color Model Intensityis given by a position on the vertical axis. í=0.7 ñ Magenta RŒ
  • 19.
    Hue RGB Cube Saturation Intensity fImagesfrom Rafael C. Gonzalez and Richard E. Wood. Digital Image Processing, 2" Edition.
  • 20.
    Oonrexlng Colors momBGB to HSI H *560 Ãä I 1 3 G)2 R QB)íG B)J 2
  • 21.
    ConveNing Colors fromHSI to RGB RG sectto: 0 al20 GB sector:120 f@I 040 BR sector: 240 lgPf lZB60 H EH 40 S oo$ H cos(60’ H) G /(1 S) S cos If cos(60° H)
  • 22.
    RGB Image (Images from RafaelC. Gonzales azrd Richard E. Wood. Digital Image Processing, 2 Edition. Saturation Hue Intensity
  • 23.
    RGB Image (Images from RafaelC. Gonzales azrd Richard E. Wood. Digital Image Processing, 2 Edition. Hue Hue Saturation Intensity Intensity Satwation RGB Image
  • 24.
    There are 2types of color image processes 1. Pneudocolor image prix:ess: Assigning colors to gray values based on a specific criRrion. Gray scale images to be pivccsed may be a single image or multiple inugcE such es multispecoal images 2. Full color image process: The process to manipulate real color images such as color photographs.
  • 25.
    Pseudosolor Image Processing Pseudocolor = 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. fImages from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2* Edition.
  • 26.
    Intensity Slicing orDenslfy Sficfng Formula: 8(‹.y) • (Black) 0, G rsy-level sxis (White) L - I Slicing plane 1 2 S f Ex› v) i$ih • f( y) C Color No. 1 C Color No. 2 A gray scale image viewed as a 3D surface. Intensity L-1
  • 27.
    An X-ray imageof a weld with cracks After assigning a yellow color to pixels with value 255 and a blue color to all other pixels. fImages from Rafael C. Gonzalez and Richard E. Wood. Digital Image Processing, 2" Edition.
  • 28.
    Multi Level IntensitySlicing Intensity C ——Color No. k 1 = Threshold level k L — I
  • 29.
    Cl ——Color No.£ 1 = Threshold level £ An X-ray image of the Picker Thyroid Phantom. After density slicing into 8 colors fImages from Rafael C. Gonzalez and Richard E. Wood. Digital Image Processing, 2" Edition.
  • 30.
    Color Coding Example Color coded image Aunique colOr is assigned to each intensity value. Ciray-scale image of average monthly rainfall. Colo r ma p SOuth America region flmages from Rafael C. Gonzalez and Richard E. Wood. Digiutl finule Processing, 2"' Edition.
  • 31.
    Grey Level toColor Tranefornietlon Assigning colors to gray levels based on specific mapping functions Green transformation Blue transformation (Images horn Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2^ Edition.
  • 32.
    An X-ray image ofa garment bag Transformations An X-ray image of a garment bag with a simulated explosive Wood, Digital Image Processing, 2* Bdifion Color coded images
  • 33.
    An X-ray image ofa garment bag Transformations An X-ray image of a garment bag with a simulated explosive Wood, Digital Image Processing, 2* Bdifion Color coded images
  • 34.
    Psaudosolor Coding (Images hornRafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2^ Edition. Used in the case where there are many monochrome images such as multispectral satellite images. Tfansfotmation Tp TfanSfoimation F g2(›. r) Transformation T1
  • 35.
    Psuedocolor rendition of Jupitermoon Io (Images horn Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2^ Edition. Yellow areas = older sulfur deposits. Red areas = material ejected from active volcanoes. A close- up
  • 36.
    Psuedocolor rendition of Jupitermoon Io (Images horn Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2^ Edition. Yellow areas = older sulfur deposits. Red areas = material ejected from active volcanoes. A close- up
  • 37.
    B»slce oFFull-Color ImageProcaeelng (Images horn Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2^ Edition. 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. Spatial mask Gray-scale image Spatial mask RGB color image
  • 38.
    Red Color image Magama sarisañoa Bla i CMYK components RGB components HSI components (Images fromRafael C. Gonzales arid Richard E. Wood. Digital Image Processing, 2^ Edition.
  • 39.
    Color Transformation Use totransform color's to colors. Formulation: fax,y) ——input color image, g{x,y) ——output color imdge T -— operation on fover a spatial neighborhood o1 (. ,i!) When data at one pixel is used in the transformation, we can express the transformation as: s, IT, r,, r2,..., r„) i —— 1, 2, ..., n Where r d -- color component ofj"(x„) st —- color component of g For RGB images, n 3
  • 40.
    Exampla: Color TiansÆrmaRon Formulafor RGB: Formula for HSI: Formula for CMY: l $k) sM{x, y) KkrM{x, .y) sF ‹x, y) JkrF lx, y) l ) Thèse 3 œansformaûons give the same results. (Images horn Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2^ Edition.
  • 41.
    Color complement replaceseach color with its opposite color in the color circle of the Hue component. This opemtion is an&ogous to image negative in a gray cale image. Wood. Digital Image Processing, 2 Edition. an Color circle (Images from Rafael C. Gonzales azrd Richard E.
  • 42.
    complement transformations (a) Original (b)Complem ent transformation functions (c)Compleraent of(a) basedon ihe RGB mapping approximation of ihe R€i B complement using HSI transformations Wood. Digital Image Processing, 2 Edition. (Images from Rafael C. Gonzales aird Richard E.
  • 43.
    Color Slicing Tr»nstormetion Wecan 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. 0.5 !›! "r, olerwise Set to gray Keep the original COlor i= 1, 2, ..., n *‘r , otherwise Set to gray Keep the original color i= 1, 2, ..., is
  • 44.
    Original image Añer color slicing fiKURfi £J4 Color slicingtransformations that detect (a) reds within an RGB cube of width i¥ = 0.2549 centered at (0.6863, 0.1608, 0.1922), and (b) reds within an RGB sphere of radius 0.1765 centered at the mine point.Pixels outside the cube and sphere were replaced by color (US, 0.5, 0A). (Images from Rafael C. Gonzales azrd Richard E. Wood. Digital Image Processing, 2 Edition.
  • 45.
    Tonal Correction Examples Inthese 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 flinuyes from Rafael C. Gonzalez und RichurJ E V‹›nd. Digital finule Pr‹+messing, 2"' Edition.
  • 46.
    Color imbalance: primarycolor 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. - in (Images from Rafael C. Gonzales and Richard E. Wood. Digital Image Processing, 2^ Edition.
  • 47.
    Hletogmm Equ»IIxaRon o0eFull-Colorlmage (lmagee from Rafael C. conzales aad Richard E. food. Digital Image Prc›ccssirig, 2^ Ediôon. 0 . 5 FIGUR£ 647 Hislogtam equalization (followed by saturation adjustment) in the HSI color spaœ.
  • 48.
    Hletogmm Equ»IIxaRon o0eFull-Colorlmage (lmagee from Rafael C. conzales aad Richard E. food. Digital Image Prc›ccssirig, 2^ Ediôon. 0 . 5 FIGUR£ 647 Hislogtam equalization (followed by saturation adjustment) in the HSI color spaœ.
  • 49.
    Color Image Smoothing £Methods: 1. Per-color-$ rlne method: for RGB, CMY color models Smooth each color plane using moving averaging and the combine back to RGB c(x, y) o —1 K 2. Smooth only Intensity component of a HSI image while leaving H and S unmodified. Note: 2 methods we not equivalent.
  • 50.
    Gotor lmnga &moothlngExample (cont.J (Images from Rafael C. Gonzales and Richard E. Wood. Digital Image Processing, 2^ Edition. DiSerence between smoothed results from 2 methods in the previous slide.
  • 51.
    Gotor lmnga &moothlngExample (cont.J (Images from Rafael C. Gonzales and Richard E. Wood. Digital Image Processing, 2^ Edition. DiSerence between smoothed results from 2 methods in the previous slide.
  • 52.
    Gotor lmnga &moothlngExample (cont.J (Images from Rafael C. Gonzales and Richard E. Wood. Digital Image Processing, 2^ Edition. DiSerence between smoothed results from 2 methods in the previous slide.
  • 53.
    Gotor lmnga &moothlngExample (cont.J (Images from Rafael C. Gonzales and Richard E. Wood. Digital Image Processing, 2^ Edition. DiSerence between smoothed results from 2 methods in the previous slide.
  • 54.
    Color Image Sharpening Wecan 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
  • 55.
    Color Imege SharpeningExample{con1/ DiSerence between sharpened results from 2 methods in the previous slide. (Images from Rafael C. Gonzales and Richard E. Wood. Digital Image Processing, 2^ Edition.
  • 56.
    Color Segmenfation £ 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. flinuyes from Rafael C. Gonzalez und RichurJ E V‹›nd. Digital finule Pr‹+messing, 2"' Edition.
  • 57.
    Color image Hue Saturation Intensity (tmagesfmm Rafael C. Gonzalez and Richard E. Wood, Orbital Image
  • 58.
    Color image (Images from RafaelC. Gonzalez aad Richard E. Wood. Digital Image Processi Segmented results of red pixels
  • 59.
    Color image (Images from RafaelC. Gonzalez aad Richard E. Wood. Digital Image Processi Segmented results of red pixels
  • 60.
    FIGUR£ 6.43 Three approaches forenclosing data regions for RCiB vector segmentation. (Images from Rafael C. Gonzalez and Richard E. Wood, Orbital Image Processing. 2^ Edition. 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 D[n,v) -- distance function c,= color to be segmented. c(x,y) RGB vector at pixel (x,y).
  • 61.
    Example: Segmentation InRGB Vector Spaae Color image Reference color cj to be segmented c, Wlvemgp cok›r of pixel in the box Results of segmentation in RGB vector space with Threshold value F= 1.25 times the SD of R,G,B values In the box(Images horn Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2^ Edition.
  • 62.
    R G f B H Gradient ofaColor 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. Edges We see 2 objects. We see 4 objects. fImages from Rafael C. Gonzalez and Richard E Wood, Digital Image Processing, 2* Edition.
  • 63.
    Gradient of aColor 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: F(K) e" — 1 "2 L — tan 2
  • 64.
    Red Green Blue flmages from RafaelC. Gonzalez and Richard E. Wood. Digiutl finule Processing, 2"' Edition. Gredlant ote Color Im»go Example Gradients of each color component
  • 65.
    Red Green Blue flmages from RafaelC. Gonzalez and Richard E. Wood. Digiutl finule Processing, 2"' Edition. Gredlant ote Color Im»go Example Gradients of each color component
  • 66.
    Salt & peer noise in Green o nt o n Rafael C. Gonzalez arid Richard E. Wood, Digital Image Processing, 2^ Edition. c d F I O U R G 6.50 (a)RGB image with green p ane ț corruplcd hy salt- and- pepper nuise. (b)Hue component of HSI imagv. (c)Saturati t›n component. (d) Intensity ctimponent.
  • 67.
    Salt & peer noise in Green o nt o n Rafael C. Gonzalez arid Richard E. Wood, Digital Image Processing, 2^ Edition. c d F I O U R G 6.50 (a)RGB image with green p ane ț corruplcd hy salt- and- pepper nuise. (b)Hue component of HSI imagv. (c)Saturati t›n component. (d) Intensity ctimponent.
  • 68.
    Salt & peer noise in Green o nt o n Rafael C. Gonzalez arid Richard E. Wood, Digital Image Processing, 2^ Edition. c d F I O U R G 6.50 (a)RGB image with green p ane ț corruplcd hy salt- and- pepper nuise. (b)Hue component of HSI imagv. (c)Saturati t›n component. (d) Intensity ctimponent.
  • 69.
    Color Image Compression Wood,Digital Image Processing, 2^ Original image After lossy compression with ratio 230: JPEG2000 File (Images horn Rafael C. Gonzalez and Richard E.