Color image processing
NADAR SARASWATHI COLLEGE OF ART &SCIENCE
THENI,TAMILNADU.
M.SURYA(II MSC(CS&IT)),
P.VINITHA (II MSC(CS&IT)),
V.SARMILA (II MSC(CS&IT)),
S.SURYAKALA(II MSC(CS&IT)),
M.SHANMUGAPRIYA(II MSC(CS&IT)),
Color image processing
Color If light is achromatic (void of color), its only
attribute is its intensity. The term gray level refers to a scalar
measure of intensity that ranges from black, to grays, and
finally to white.
A very powerful descriptor that simplifies object
identification and extraction from a scene. Cones are the
sensors in the eye responsible for color vision.
A body that reflects light that is balanced in all visible
wavelengths appears white to the observer.
Introduction
Color image processing is divided into two major
area:
*Full color
*Pseudo color.
Full-color:
The image in question typically are acquired
with a full color sensor, such as a color TV camera or
color scanner.
Pseudo color:
The problem is one of assigning a color to a
particular monochrome intensity or range of intensities.
Color Fundamentals
The process followed by the human brain in
perceiving and interpreting color is a Physiopsychological
phenomenon that is not yet fully understood, the physical
nature of color can be expressed on a formal basis supported
by experiment and theoretical results.
In 1666, Sir Isaac Newton discovered that when a
beam of sunlight passes through a glass prism, the emerging
beam of light us not white but consist in stead of a
continuous spectrum of colors ranging from violet a one end
to red at the other.
Visible light is composed of a relatively narrow
brand of frequencies in the electromagnetic spectrum.
If the light is achromatic (void of color), its
only attribute is its intensity, or amount.
Achromatic light is what viewers see on a
black and white television set.
Chromatic light spans the electromagnetic
spectrum from approximately 400 to 700 nm.
Three basic quantities are used to describe the quality of
a chromatic light source: radiance, luminance, and
brightness.
Radiance is the total amount of energy that
flow from the light source, and it is usually measured in
watts (W).
Luminance, measured in lumens (lm), gives
a measure of the amount of energy an observer perceives
from a light source.
Brightness is a subjective descriptor that is
practically impossible to measure. It embodies the
achromatic notion of intensity and is one of the key factors
in describing color sensation.
6 to 7 million cones in the human eye can
divided into three principal sensing categories,
corresponding roughly to red, green, and blue.
Approximately 65% of all cones are
sensitive to red light, 33% are sensitive to green light,
and only about 2% are sensitive to blue (but that blue
cones are the most sensitive).
Due to these absorption characteristics of the
human eyes, colors are seen as variable combinations of
the so-called primary colors red (R), green (G), and
blue(B).
The primary colors can be added to produce the
secondary colors of light megenda(red plus
blue),cyan(green plus blue),and yellow(red plus
green).
The characteristics generally used to distinguish one
color from another are brightness, hue, and saturation.
Hue is an attribute associated with the
dominant wavelength in a mixture of light waves.
Hue represent dominant color as perceived by
an observer.
Saturation refers to the relatives purity or the
amount of white light mixed with a hue. The pure spectrum
color are fully saturation.
Hue and saturation taken together are called
chromaticity, and therefore, a color may be characterized
by its brightness and chromaticity.
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 accepted way. A
color model is a specification of a coordination system
and a subspace within that system where each color is
represented by a single point.
Most color models in use today are oriented
either toward hardware or toward applications where color
manipulation is a goal.
 In terms of digital image processing, the hardware
oriented models most commonly used in practice are
the RGB(red, green, blue) model for color monitors
and a broad class of color video cameras.
 The CMY ( cyan, magenta, yellow) and CMYK
(cyan, magenta, yellow, black) models for color printing
and the HSI (hue, saturation, intensity) model.
 Which corresponds closely with the way humans
describe and interpret color.
 The HSI models also has the advantage that it
decouples the color and gray- scale information in an
image making it suitable for many of the gray –scale
techniques developed in the book.
 There are numerous color models in use today due
to the fact that color science is a broad field that
encompasses many areas of application.
RGB COLOR MODEL
 The RGB model, each color appears in its primary
spectral components is red,green,blue.
 This model is based on a Cartesian coordinate system.
 RGB is primary values are at three corners ; secondary
colors cyan ,magenta and yellow are at three corners.
 Black is origin; and white is at the corner farthest from the
origin.
 The gray scale extends from black and white along the line
joining these two point.
 R,G,and B are assumed to be in the range[1,0].
A color image can be acquired by using three filling
sensitive to red,green,blue respectively.
 The hex numbers 0,1,2,…….,9,A,B,C,D,E,F correspond
to decimal numbers 0,1,2,…,9,10,11,12,13,14,15.
 Recall that (0)16 =(0000)2 and (F)16=(1111)2.
 The square in the top left array has value FFFFCC
(white),the second square to its right has value
FFFFCC,the third square has FFFF99.
 Second row has value FFCCFF,FFCCCC,FFCC99 and so
on.
•The hex codes for all the possible gray colors in a 256-color
RGBsystem.
•Some of these values are outside of the safe color set but are
represented properly by most display system.
•The gray from the color group (KKKKKK)16,for
K=0,3,6,9,C,F.
The CMY and CMYK color models
 Cyan , magenta and yellow are the secondary
color of light or alternatively , the primary colors of
pigments.
 Most devices that deposit colored pigments on
paper, such as color printer and copiers, require CMY
data input or perform an RGB to CMY converting
internally.
This conversion is performed using the simple
operation
- =
The assumption is that all color values have been
normalized the range [0,1].
C
M
Y
1
1
1
R
G
B
The RGB safe color cube
 That light reflected from surface coated with pure
cyan does not contain red ( C= 1 – R )
 Pure magenta does not reflect green, and pure
yellow does not reflect blue.
 RGB values can be obtained easily from a set of
CMY values by subtracting the individual CMY values
from 1.
 The inverse operation from CMY to RGB generally
is of little practical interest.
HSI Color Model
 The HSI (hue, saturation, intensity) color model,
decouples the intensity component from the
color-carrying information(hue and saturation) in
a color image.
 The HSI model is an ideal tool for developing
image processing algorithms based on color
descriptions that are natural and intuitive to
humans.
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
Intensity: 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
Relationship between the RGB and
HSI color models
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
In a similar way we can extract the hue from the RGB
color cube
Consider a plane defined by the three points cyan, black
and white
All points contained in this plane must have the same hue
(cyan) as black and white cannot contribute hue information
to a color
Hue and Saturation in 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
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 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
The angle from the red axis gives the hue, and the
length of the vector is the saturation.
 The intensity of all colors in any of these planes is
given by the position of the plane on the vertical
intensity axis.
HSI Model Example
Converting from RGB to HSI
Given a color as R, G, and B its H, S, and I values are
calculated as follows:






GBif
GBif
H
360 
     
      









 
2
1
2
2
1
1
cos
BGBRGR
BRGR

 
  BGR
BGR
S ,,min
3
1

 I  1
3
R G B 
Converting from HSI to RGB
Given a color as H, S, and I it’s R, G, and B values are
calculated as follows:
RG sector (0 <= H < 120°)
 







H
HS
IR
60cos
cos
1

G  3I  R  B 

B  I 1 S 
 GB sector (120° <= H < 240°)
R  I 1S 
 
  








60cos
120cos
1
H
HS
IG  GRIB 3
 BR sector (240° <= H <= 360°)
 BGIR  3

G  I 1 S 
 
  








180cos
240cos
1
H
HS
IB
HSI & RGB
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 HSI
 Perform our manipulations under HSI
 Finally convert the image back from HSI to RGB
RGB
Image
HSI Image HSI Image
Manipulatio
ns
RGB -> HSI -> RGB
RGB Image Hue
Saturation Intensity
Color image processing

Color image processing

  • 1.
    Color image processing NADARSARASWATHI COLLEGE OF ART &SCIENCE THENI,TAMILNADU. M.SURYA(II MSC(CS&IT)), P.VINITHA (II MSC(CS&IT)), V.SARMILA (II MSC(CS&IT)), S.SURYAKALA(II MSC(CS&IT)), M.SHANMUGAPRIYA(II MSC(CS&IT)),
  • 2.
    Color image processing ColorIf light is achromatic (void of color), its only attribute is its intensity. The term gray level refers to a scalar measure of intensity that ranges from black, to grays, and finally to white. A very powerful descriptor that simplifies object identification and extraction from a scene. Cones are the sensors in the eye responsible for color vision. A body that reflects light that is balanced in all visible wavelengths appears white to the observer.
  • 3.
    Introduction Color image processingis divided into two major area: *Full color *Pseudo color. Full-color: The image in question typically are acquired with a full color sensor, such as a color TV camera or color scanner. Pseudo color: The problem is one of assigning a color to a particular monochrome intensity or range of intensities.
  • 4.
    Color Fundamentals The processfollowed by the human brain in perceiving and interpreting color is a Physiopsychological phenomenon that is not yet fully understood, the physical nature of color can be expressed on a formal basis supported by experiment and theoretical results. In 1666, Sir Isaac Newton discovered that when a beam of sunlight passes through a glass prism, the emerging beam of light us not white but consist in stead of a continuous spectrum of colors ranging from violet a one end to red at the other.
  • 5.
    Visible light iscomposed of a relatively narrow brand of frequencies in the electromagnetic spectrum. If the light is achromatic (void of color), its only attribute is its intensity, or amount. Achromatic light is what viewers see on a black and white television set. Chromatic light spans the electromagnetic spectrum from approximately 400 to 700 nm.
  • 6.
    Three basic quantitiesare used to describe the quality of a chromatic light source: radiance, luminance, and brightness. Radiance is the total amount of energy that flow from the light source, and it is usually measured in watts (W). Luminance, measured in lumens (lm), gives a measure of the amount of energy an observer perceives from a light source. Brightness is a subjective descriptor that is practically impossible to measure. It embodies the achromatic notion of intensity and is one of the key factors in describing color sensation.
  • 7.
    6 to 7million cones in the human eye can divided into three principal sensing categories, corresponding roughly to red, green, and blue. Approximately 65% of all cones are sensitive to red light, 33% are sensitive to green light, and only about 2% are sensitive to blue (but that blue cones are the most sensitive). Due to these absorption characteristics of the human eyes, colors are seen as variable combinations of the so-called primary colors red (R), green (G), and blue(B).
  • 8.
    The primary colorscan be added to produce the secondary colors of light megenda(red plus blue),cyan(green plus blue),and yellow(red plus green).
  • 9.
    The characteristics generallyused to distinguish one color from another are brightness, hue, and saturation. Hue is an attribute associated with the dominant wavelength in a mixture of light waves. Hue represent dominant color as perceived by an observer. Saturation refers to the relatives purity or the amount of white light mixed with a hue. The pure spectrum color are fully saturation.
  • 10.
    Hue and saturationtaken together are called chromaticity, and therefore, a color may be characterized by its brightness and chromaticity.
  • 11.
    COLOR MODELS The purposeof a color model also called “color space or color system” is to facilitate the specification of colors in some standard, generally accepted way. A color model is a specification of a coordination system and a subspace within that system where each color is represented by a single point. Most color models in use today are oriented either toward hardware or toward applications where color manipulation is a goal.
  • 12.
     In termsof digital image processing, the hardware oriented models most commonly used in practice are the RGB(red, green, blue) model for color monitors and a broad class of color video cameras.  The CMY ( cyan, magenta, yellow) and CMYK (cyan, magenta, yellow, black) models for color printing and the HSI (hue, saturation, intensity) model.  Which corresponds closely with the way humans describe and interpret color.
  • 13.
     The HSImodels also has the advantage that it decouples the color and gray- scale information in an image making it suitable for many of the gray –scale techniques developed in the book.  There are numerous color models in use today due to the fact that color science is a broad field that encompasses many areas of application.
  • 14.
    RGB COLOR MODEL The RGB model, each color appears in its primary spectral components is red,green,blue.  This model is based on a Cartesian coordinate system.
  • 15.
     RGB isprimary values are at three corners ; secondary colors cyan ,magenta and yellow are at three corners.  Black is origin; and white is at the corner farthest from the origin.  The gray scale extends from black and white along the line joining these two point.  R,G,and B are assumed to be in the range[1,0].
  • 16.
    A color imagecan be acquired by using three filling sensitive to red,green,blue respectively.
  • 17.
     The hexnumbers 0,1,2,…….,9,A,B,C,D,E,F correspond to decimal numbers 0,1,2,…,9,10,11,12,13,14,15.  Recall that (0)16 =(0000)2 and (F)16=(1111)2.
  • 18.
     The squarein the top left array has value FFFFCC (white),the second square to its right has value FFFFCC,the third square has FFFF99.  Second row has value FFCCFF,FFCCCC,FFCC99 and so on.
  • 19.
    •The hex codesfor all the possible gray colors in a 256-color RGBsystem. •Some of these values are outside of the safe color set but are represented properly by most display system. •The gray from the color group (KKKKKK)16,for K=0,3,6,9,C,F.
  • 20.
    The CMY andCMYK color models  Cyan , magenta and yellow are the secondary color of light or alternatively , the primary colors of pigments.  Most devices that deposit colored pigments on paper, such as color printer and copiers, require CMY data input or perform an RGB to CMY converting internally.
  • 21.
    This conversion isperformed using the simple operation - = The assumption is that all color values have been normalized the range [0,1]. C M Y 1 1 1 R G B
  • 22.
    The RGB safecolor cube
  • 23.
     That lightreflected from surface coated with pure cyan does not contain red ( C= 1 – R )  Pure magenta does not reflect green, and pure yellow does not reflect blue.  RGB values can be obtained easily from a set of CMY values by subtracting the individual CMY values from 1.  The inverse operation from CMY to RGB generally is of little practical interest.
  • 24.
    HSI Color Model The HSI (hue, saturation, intensity) color model, decouples the intensity component from the color-carrying information(hue and saturation) in a color image.  The HSI model is an ideal tool for developing image processing algorithms based on color descriptions that are natural and intuitive to humans.
  • 25.
    The HSI modeluses 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 Intensity: 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
  • 26.
    Relationship between theRGB and HSI color models 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
  • 27.
    In a similarway we can extract the hue from the RGB color cube Consider a plane defined by the three points cyan, black and white All points contained in this plane must have the same hue (cyan) as black and white cannot contribute hue information to a color
  • 28.
    Hue and Saturationin 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
  • 29.
    To the rightwe 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
  • 30.
     The onlyimportant things are the angle and the length of the saturation vector this plane is also often represented as a circle or a triangle The angle from the red axis gives the hue, and the length of the vector is the saturation.  The intensity of all colors in any of these planes is given by the position of the plane on the vertical intensity axis.
  • 31.
  • 32.
    Converting from RGBto HSI Given a color as R, G, and B its H, S, and I values are calculated as follows:       GBif GBif H 360                          2 1 2 2 1 1 cos BGBRGR BRGR      BGR BGR S ,,min 3 1   I  1 3 R G B 
  • 33.
    Converting from HSIto RGB Given a color as H, S, and I it’s R, G, and B values are calculated as follows: RG sector (0 <= H < 120°)          H HS IR 60cos cos 1  G  3I  R  B   B  I 1 S   GB sector (120° <= H < 240°) R  I 1S               60cos 120cos 1 H HS IG  GRIB 3
  • 34.
     BR sector(240° <= H <= 360°)  BGIR  3  G  I 1 S               180cos 240cos 1 H HS IB
  • 35.
    HSI & RGB H,S, and I Components of RGB Color Cube
  • 36.
    Manipulating Images InThe HSI Model In order to manipulate an image under the HIS model we:  First convert it from RGB to HSI  Perform our manipulations under HSI  Finally convert the image back from HSI to RGB RGB Image HSI Image HSI Image Manipulatio ns
  • 37.
    RGB -> HSI-> RGB RGB Image Hue Saturation Intensity