0% found this document useful (0 votes)
205 views34 pages

Chapter 6 Color Image Processing

The document discusses color image processing and various color models used in digital image processing, including RGB, CMY/CMYK, and HSI color models. It provides the following key points: 1) RGB, CMY, and HSI are the main color models discussed. RGB is additive while CMY is subtractive. HSI describes color in terms of hue, saturation, and intensity. 2) RGB represents colors as combinations of red, green, and blue values. CMY represents colors by subtracting cyan, magenta, and yellow from white. 3) The HSI color model describes color in an intuitive way for humans using hue, saturation, and intensity/brightness that is useful

Uploaded by

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

Chapter 6 Color Image Processing

The document discusses color image processing and various color models used in digital image processing, including RGB, CMY/CMYK, and HSI color models. It provides the following key points: 1) RGB, CMY, and HSI are the main color models discussed. RGB is additive while CMY is subtractive. HSI describes color in terms of hue, saturation, and intensity. 2) RGB represents colors as combinations of red, green, and blue values. CMY represents colors by subtracting cyan, magenta, and yellow from white. 3) The HSI color model describes color in an intuitive way for humans using hue, saturation, and intensity/brightness that is useful

Uploaded by

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

Digital Image Processing

Color Image Processing


Color Models
• The use of color in image processing is
motivated by two factors:

• Color is a powerful descriptor that often


simplifies object identification and extraction
from a scene.

• Human can discern thousands of color


shades and intensities, compared to only
two dozen shades of gray.
Color Models (cont…)

• The following are the color models used in


digital image processing.
I. RGB(Red, Blue, Green)
II. CMY and CMYK (Cyan, Magenta, Yellow)
III.HSI(Hue, Saturation, Intensity)
Additive vs. Subtractive Color Models
 Additive color models use light to  Subtractive color models use printing
display color inks
 involves light emitted directly from  Subtractive color starts with an object
a source that reflects light and uses colorants to
 mixes various amounts of red, subtract portions of the white light
green and blue light to produce illuminating an object to produce
other colors. other colors.
 Combining one of these additive  If an object reflects all the white light
primary colors with another back to the viewer, it appears white.
produces the additive secondary  If an object absorbs (subtracts) all the
colors cyan, magenta, yellow. light illuminating it, it appears black.
 Combining all three primary colors  graphic designers used the CMYK
produces white. model for printing
 Eg: RGB  Eg: CMYK,CMY
 RGB model for computer display
4
RGB (Red, Blue, Green) Color Model
RGB Color Model (cont…)
The model is based on a Cartesian coordinate
system
– RGB values are at 3 corners

– Cyan magenta and yellow are at three other corners

– Black is at the origin

– White is the corner furthest from the origin

– Different colors are points on or inside the cube


represented by RGB vectors
RGB Color Model (cont…)
RGB Color Model (cont…)
CMY and CMYK Color Model
• This color model is subtractive. It comprises of the three secondary
components of colors namely – cyan, magenta and yellow. The
secondary colors are also called the primary color pigments.
• When a surface coated with a cyan pigment is illuminated with white
light, no red light is reflected from the surface. That is, cyan subtracts
the red light from reflected white light, which itself is composed of red,
green and blue light.
• The relationship between the C  1  R 
RGB and CMY color models is  M   1  G 
given by:     
Y  1  B 
• This color model is used by hardcopy devices. The hard copy vendors use
a fourth component K for printing black color, because the black color
obtained by mixing the three color pigments C, M and Y is muddy or
sluggish.
CMY model (+Black = CMYK)
• CMY: secondary colors of light, or primary
colors of pigments
• Used to generate hardcopy output
• It is subtractive type
CMY model (+Black = CMYK)

 C  1  R  If intensity values of


M   1  G  Red, Green and Blue
     components ∈ [0,1]
 Y  1  B 

 C  255  R  If intensity values of


 M   255  G  Red, Green and Blue
      components ∈ [0,255]
 Y  255  B 
The HSI Color Model
• The RGB and CMY color models are ideally suited for
hardware implementations. However, these are not
well suited for describing colors in terms that are
practical for human interpretation.
• RGB is not a particularly intuitive way in which to
describe colors.
• Rather when humans view color object they describe
by its hue, saturation and brightness (intensity).
• RGB is great for color generation, but HSI is great for
color description.
The HSI Color Model (cont…)
The HSI model uses three measures to describe
colors:
– Hue: A color attribute that describes a pure color (pure
yellow, orange or red)
– Saturation: Gives a measure of how much a pure
color is diluted with white light
– Brightness (Intensity): Brightness is related to the value
of the intensity of light. Brightness is nearly impossible to
measure because it is so subjective. Instead we use
intensity. Intensity is the same achromatic notion that we
have seen in grey level images.
HSI, Intensity & RGB
•Intensity can be extracted from RGB images –
which is not surprising if we stop to think about
it.
HSI, Intensity & RGB (cont…)

• Remember the diagonal


on the RGB Color cube
that we saw previously
ran from black to white.

• Now consider if we
stand this cube on the
black vertex and
position the white vertex
directly above it.
HSI, Intensity & RGB (cont…)
• Now the intensity
component of any color
can be determined by
passing a plane
perpendicular to the
intensity axis and
containing the color point.
• The intersection of the
plane with the intensity
axis gives us the intensity
component of the color.
The HSI Color Model
• Consider if we look straight down at the RGB cube as
it was arranged previously.
• We would see a hexagonal
shape with each primary
color separated by 120°
and secondary colors
at 60°from the primaries.
• So the HSI model is
composed of a vertical
intensity axis and the locus of color points that lie on
planes perpendicular to that axis.
The HSI Color Model (cont…)
To the right we see a hexagonal
shape and an arbitrary Color
point
– The hue is determined by an
angle from a reference point,
usually red.
– The saturation is the distance from the origin to the
point
– The intensity is determined by how far up the
vertical intensity axis this hexagonal plane sits (not
apparent from this diagram)
The HSI Color Model (cont…)

The intensity is
determined by how
far up the vertical
intensity axis this
hexagonal plane
sits.

Because the only


important things are
the angle and the length
of the saturation vector this plane is also often
represented as a circle or a triangle.
HSI Model Examples
HSI Model Examples
HSI color model (cont.)

• RGB -> HSI model Colors on this triangle


Have the same hue

Intensity
line

saturation
Converting From RGB To HSI
This model, any color is represented by 3 parameters.

 The first parameters is the hue, and its value ranges from 0 to 360
degrees or can be normalized to 0-1. It can be described in terms of an
angle on the above circle. Each degree represent a distinct color.

 The second parameter is the saturation. It represents the amount of


color or, more exactly, its percentage or represents the vibrancy of the
color. Its value ranges from 0 to 1, where 0 represents no color, while 1
represents the full color. The lower the saturation value, the more gray
is present in the color, causing it to appear

 Finally, the third parameter is the value which is determined by the


maximum of R,G,B and hence has range 0-255 or normalized 0-1.
Converting From RGB To HSI
• Given a color as R, G, and B its H, S, and I values are
calculated as follows:
 if B  G
H 
360   if B  G
 1
 R  G    R  B  
where   cos 1  2
1 

 
 R  G   R  B G  B  2 
2

• The 𝑠𝑎𝑡𝑢𝑟𝑎𝑡𝑖𝑜𝑛 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡 is given by


3
S  1 min R,G,B
R  G  B
• The 𝑖𝑛𝑡𝑒𝑛𝑠𝑖𝑡𝑦 𝑐𝑜𝑚𝑝𝑜𝑛𝑒𝑛𝑡 is given by
I  13 R  G  B

Converting From RGB To HSI
1) It has been assumed that
the RGB values have been
normalized to the range
[0,1].
2) The angle θ is measured
w.r.t. the Red axis of the
HSI space, as shown.

3) Hue can be normalized between [0,1] by dividing all


values of H (in form of angles) by 3600. The other
two components (i.e. S and I) are already in the
range [0, 1].
Converting From RGB To HSI
Q) Compute the equivalent HSI values for the
pixels having RGB=(0.8,0.6,0.4)

Answer: 𝑯𝑺𝑰 = (𝟑𝟎𝟎 , 𝟎. 𝟔, 𝟎. 𝟑𝟒)


Converting From RGB To HSI
Compute the equivalent HSI values for the shaded pixels of given
RGB image 𝑰𝑴
A B C
Given RGB image IM
D E F

G H I

100 150 0 100 0 150 100 0 0


255 255 0 0 255 0 0 255 0
100 0 100 150 0 200 200 255 150

Red Component Green Component Blue Component


HSI & RGB

RGB color Cube

H, S, and I Components of RGB color Cube


Manipulating Images In The HSI Model

In order to manipulate an image under the HIS


model we:
– First convert it from RGB to HIS
– Perform our manipulations under HSI
– Finally convert the image back from HSI to RGB

RGB RGB
HSI Image
Image Image

Manipulations
RGB -> HSI

RGB
Hue
Image

Saturation Intensity
HSI -> RGB

Hue
Saturation

Intensity RGB
Image
The Lab Color Model
 Lab stands for Luminance (or lightness) and a and b (which
are chromatic components).
 The Luminance ranges from 0 to 100
 'a' component ranges from -128 to +127 (from green to red)
 the 'b' component ranges from -128 to +127 (from blue to
yellow).
 This model was designed to be device independent. In other
words by means of this model you can handle colors
regardless of specific devices (such as monitors, printers, or
computers).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy