0% found this document useful (0 votes)
12 views68 pages

Module 4 Part 2

The document covers color fundamentals in image processing, including color models, pseudo-color image processing, and the physical and physiological aspects of color perception. It discusses the significance of color in object identification and the mechanisms of human color perception, detailing the RGB and CMY color models. Additionally, it explains the characteristics of color such as brightness, hue, saturation, and introduces the HSI model for color representation.

Uploaded by

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

Module 4 Part 2

The document covers color fundamentals in image processing, including color models, pseudo-color image processing, and the physical and physiological aspects of color perception. It discusses the significance of color in object identification and the mechanisms of human color perception, detailing the RGB and CMY color models. Additionally, it explains the characteristics of color such as brightness, hue, saturation, and introduces the HSI model for color representation.

Uploaded by

Babygowda Gowda
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module - 4

Dept. of Electronics and Communication


R. N. S. Institute of Technology
Dr Suresh D, Professor, RNSIT
• Colour Fundamentals.

• Colour Models.

• Pseudo colour Image Processing.

 Sections: 6.1 to 6.3


 RBT Level: L1, L2, L3

Dr Suresh D, Professor, RNSIT


 Why use color in image processing?

◦ Color is a powerful descriptor


 Object identification and extraction
 eg. Face detection using skin colors

◦ Humans can discern thousands of color


shades and intensities, compared to about
only two dozen shades of grays

Dr Suresh D, Professor, RNSIT


 Two category of color image processing
◦ Full color processing
 Images are acquired from full-color
sensor or equipments
◦ Pseudo-color processing
 In the past decade, color sensors and
processing hardware were not available
 Colors are assigned to a range of
monochrome intensities

Dr Suresh D, Professor, RNSIT


 Physical phenomenon
◦ Physical nature of color is known

 Physiopsychological phenomenon
◦ How human brain perceive and interpret color

Dr Suresh D, Professor, RNSIT


• In 1666 Sir Isaac Newton discovered that when a
beam of sunlight passes through a glass prism, the
emerging beam is split into a spectrum of colors
ranging from violet at one end to red at the other.
• Figure 6.1 shows the color spectrum is divided into six
broad regions: Violet, Blue, Green, Yellow, Orange,
and Red.

Dr Suresh D, Professor, RNSIT


• Chromatic light span the electromagnetic
spectrum (EM) from 400 to 700 nm.

Dr Suresh D, Professor, RNSIT


 The color that human perceive in an object =
the light reflected from the object

scene
Illumination source

reflection
eye
Dr Suresh D, Professor, RNSIT
The colors that humans and most animals
perceive in an object are determined by the
nature of the light reflected from the object

For example, green


objects reflect light
with wave lengths
primarily in the range
of 500 – 570 nm while
absorbing most of the
Colours
Absorbed

energy at other
wavelengths

Dr Suresh D, Professor, RNSIT


 When the light is achromatic (void of color), its only attribute is
its intensity, or amount. (observed in black and white television
set.
 Three basic quantities are used to describe the quality of a
chromatic light source.

1) Radiance: total amount of energy that flow from the light


source, measured in watts (W)
2) Luminance: amount of energy an observer perceives from a
light source, measured in lumens (lm)
i. Far infrared light: high radiance, but 0 luminance
3) Brightness: subjective descriptor that is hard to measure,
similar to the achromatic notion of intensity.

Dr Suresh D, Professor, RNSIT


 6~7M Cones are the sensors in the eye. Cones are
highly sensitive to colors.
 3 principal sensing categories in eyes
◦ Approximately 65% all cones are sensitive to red
light, 33% cones are sensitive to green light, and
2% cones are sensitive to blue light

Absorption curves for the different cones have been


determined experimentally
These do not match the CIE(International commission
illumination) on standards for red (700nm), green
(546.1nm) and blue (435.8nm) light.
This standard was set before the detailed experimental
curves shown in figure became available in 1965.

Dr Suresh D, Professor, RNSIT


Dr Suresh D, Professor, RNSIT
❑ In 1931, CIE(International Commission on
Illumination) defines specific wavelength values
to the primary colors
◦ B = 435.8 nm, G = 546.1 nm, R = 700 nm
◦ However, we know that no single color may
be called red, green, or blue.

❑The primary colors can be added to produce


secondary colors of light.
 Secondary colors: G+B=Cyan, R+G=Yellow,
R+B=Magenta

Dr Suresh D, Professor, RNSIT


Primary and Secondary colors of light and pigments

Dr Suresh D, Professor, RNSIT


Additive nature of Light colors
❑ Color Television is an example of the additive nature of
Light colors.
❑ The interior of CRT ( cathode ray tube ) color TV screens
is composed of large array of triangular dot patterns
electron sensitive-phosphor. When exited, each dot in a
triad produces light in one of the primary colors.
❑ The intensity of the red emitting phosphor dots is
modulated by an electron gun inside the tube, which
generates pulses corresponding to red energy seen by the
TV camera. Similarly green and blue phosphor dots in
each are modulated.
❑ In TV receiver, three primary colors from each phosphor
triad are added together and received by the color
sensitive cones in the eye as full color image.

Dr Suresh D, Professor, RNSIT


 Color TV

Color image can be acquired by using three filters sensitive


to red, green and blue respectively.

Dr Suresh D, Professor, RNSIT


 The characteristics generally used to distinguish one
color from another are brightness, hue and saturation.
 Brightness is a notation for intensity and practically
can not be measured.
 Hue represents dominant color as perceived by an
observer. Hue is an attribute associated with the
dominant wavelength in a mixture of light waves.
 Saturation refers to the relative purity or amount of
white light mixed with a hue.
o The pure spectrum colors are fully saturated.
o Colors, pink ( red and white ) and lavender ( violet and
white ) are less saturated.

Dr Suresh D, Professor, RNSIT


 Hue and saturation taken together are called
chromaticity, and color may be characterized
by its brightness and chromaticity.

 The amounts of red, green, and blue needed


to form any particular color are called the
tristimulus values and are denoted by X, Y,
and Z respectively.

Dr Suresh D, Professor, RNSIT


 A color is then specified by its trichromatic
coefficients (Normalized tristimulus values)
defined as
X Y Z
x= y= z=
X +Y + Z X +Y + Z X +Y + Z

 It is noted from these equations that


x + y + z = 1.

Dr Suresh D, Professor, RNSIT


• Another approach for specifying colors is CIE
Chromaticity diagram.
• {CIE(International Commission on Illumination)}
• Chromaticity diagram shows color composition as a
function of x(red) and y(green).
• For any value of x and y, the corresponding value of
z(blue) is obtained from equation x+y+z=1 by noting
that z=1-(x+y).
• The point marked green in figure has approximately 62%
green and 25% red content. From the above equation
the composition of blue is approximately 13%.

Dr Suresh D, Professor, RNSIT


Figure:
Chromaticity
diagram

Dr Suresh D, Professor, RNSIT


❑ The position of the various spectrum colors from
violet at 380nm to red at 780nm. are indicated
around the boundary of the tongue shaped
chromaticity diagram. These are the pure colors
shown in figure.

❑ The triangle in figure in the next slide shows a typical


range of colors is called color gamut produced by
RGB monitors

❑ The strange shape is the gamut achieved by high


quality color printers.

❑ The boundary of the color gamut is irregular because


color printing is a combination of additive and
subtractive color mixing.
Dr Suresh D, Professor, RNSIT
By additivity of colors:
Any color inside the
triangle can be produced
by combinations of the
three initial colors

RGB gamut of
monitors
Color gamut of
printers

Dr Suresh D, Professor, RNSIT


Gamuts which can be displayed using
three typical display devices

(a) CRT monitor (b) Color film (c) Color printer

Dr Suresh D, Professor, RNSIT


 Color model, color space, color system
❑Specify colors in a standard way
❑A Specification of coordinate system and subspace
within that system where each color is represented by a
single point.
❑Applications of color models are in
• Hardware – Color monitors and printers.
• Color manipulation - Color graphics or animation.
• RGB model – Color monitors and Color video cameras.
• CMY and CMYK – Color printing.
• HSI model – Suitable for describing colors in terms that
are practical for human interpretation. Separate the
intensity from color information.

Dr Suresh D, Professor, RNSIT


Dr Suresh D, Professor, RNSIT
In the RGB model each color appears in its
primary spectral components of red, green
and blue

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

Dr Suresh D, Professor, RNSIT


• Pixel depth: the number of bits used to represent
each pixel in RGB space
• Full-color image: 24-bit RGB color image
• (R, G, B) = (8 bits, 8 bits, 8 bits)
• A 24-bit image is often referred to as a full-colour
image as it allows = 16,777,216 colours

Dr Suresh D, Professor, RNSIT


• Many systems in use today are limited to 256 colors
• Subset of colors is enough for some application. This
subset of colors is called set of Safe RGB colors (safe
Web colors, safe browser colors)
• Forty of 256 colors are used by various operating
systems, leaving only 216 colors that are common to
most systems.

RGB triplets of these values give (6)3 = 216 possible values.

Dr Suresh D, Professor, RNSIT


 Each of the 216 safe colors is formed from three RGB
values, but each value can only be as shown in Table.

 Since it takes three numbers to form an RGB color,


each safe color is formed from three of the two digit
hex numbers in Table 6.1.

 Ex.; The purest red is FF0000, the values of 000000


and FFFFFF represent black and white respectively.
 The square in the top left array has value FFFFFF
(white), the second square to its right has value
FFFFCC, the third square has value FFFF99, and so
on for first row.

Dr Suresh D, Professor, RNSIT


Dr Suresh D, Professor, RNSIT
Full color cube Safe color cube

Dr Suresh D, Professor, RNSIT


• CMY: secondary colors of light, or primary colors of
pigments
• Used to generate hardcopy output (Ex.: Color printers)
• Creating colors in the RGB and CMY models and
changing from one model to other is a straight forward
process.

 C  1  R 
 M  = 1 − G 
    
 Y  1  B 

Dr Suresh D, Professor, RNSIT


 The RGB, CMY, and other similar color models
are not well suited for describing colors in
terms that are practical for human
interpretation.

Dr Suresh D, Professor, RNSIT


◦ Hue: A color attribute that describes a pure colour (pure
yellow, orange or red)

◦ Saturation: It gives a measure of the degree to which a


pure color is diluted by white light.

◦ Intensity: 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. The intensity of a
gray level is most useful descriptor of the image and the
quantity of which is measurable.

Dr Suresh D, Professor, RNSIT


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

Dr Suresh D, Professor, RNSIT


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

Dr Suresh D, Professor, RNSIT


 RGB -> HSI model Colors on this triangle
Have the same hue

Intensity
line
saturation

Dr Suresh D, Professor, RNSIT


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.
Dr Suresh D, Professor, RNSIT
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 (Angle of 0o and it is
0 hue and hue increases counter
Clockwise from there.
▪ The saturation is the distance from the origin
(vertical axis) to the point
▪ The intensity is determined by how far up the
vertical intensity axis this hexagonal plane sits
(not apparent from this diagram

Dr Suresh D, Professor, RNSIT


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.

Dr Suresh D, Professor, RNSIT


HSI model
Intensity is given by a position on the vertical axis. This
model is based on color triangles and also on circles.

Dr Suresh D, Professor, RNSIT


Given a color as R, G, and B its H, S, and I values
are calculated as follows:

  
if B  G  1
(R − G) + (R − B) 
H =  = cos 
−1 2

 360−  if B  G  (R − G)2 + (R − B)(G − B) 
1
2

 

 
3
S = 1− min (R,G,B ) I = 3(
1
R + G + B)
(R + G + B)

Exercise: (R, G, B) = (0.683, 0.1608, 0.1922). Convert
this into HIS model.

Dr Suresh D, Professor, RNSIT
Given a color as H, S, and I in the interval [0, 1], it’s R,
G, and B values are calculated as follows:
◦ RG sector (0 <= H < 120°)

 S cos H  G = 3I − (R + B) B = I (1− S)
R = I 1 + 
 cos (60 − H ) 
◦ GB sector (120° <= H < 240°)
 
H = H -120
 S cos H 
R = I(1− S) G = I 1 +  B = 3I − (R + G)
 cos(60 − H ) 
Dr Suresh D, Professor, RNSIT
◦ BR sector (240° <= H <= 360°)
H = H - 240
G = I (1− S )
 S cos H 
B = I 1 + 
 cos (60 − H ) 

R = 3I − (G + B)


Dr Suresh D, Professor, RNSIT
Dr Suresh D, Professor, RNSIT
1. Write the formulae used for converting RGB to HIS.
Using these formula find the value of HSI for the given
RGB = (0.683, 0.1608, 0.1922)

2. Write the formulae used for converting HSI to RGB.


Using these formula find the value of RGB for the
given HSI= (211, 0.45, 0.51)

Dr Suresh D, Professor, RNSIT


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

Dr Suresh D, Professor, RNSIT


RGB Colour Cube

H, S, and I Components of RGB Color Cube

Dr Suresh D, Professor, RNSIT


R,G,B Hue

saturation intensity

Dr Suresh D, Professor, RNSIT


• Pseudo-color (false color) image processing consists of
assigning colors to gray values based on a specified
criterion. It is also called as False color image
processing.
• It is for human visualization and interpretation of gray-
scale events.

• Types
i) Intensity slicing
ii) Gray level to color transformations

Dr Suresh D, Professor, RNSIT


 3-D view of intensity image

Color 1

Color 2

Image plane

Dr Suresh D, Professor, RNSIT


 The Gray Scale [0,L-1] is divided into L levels;
where l0 represents Black (f(x,y)=0) and lL-1
represents white (f(x,y)=L-1)

 Suppose that P planes perpendicular to the


intensity axis are defined at levels l1,l2…..,lp

 Then assuming that 0<P<L-1 the P planes partition


the gray scale into P+1 intervals, V1,V2…….Vp+1

Dr Suresh D, Professor, RNSIT


 Gray level to color assignments are made
according to the relation:

f(x,y)= ck if f(x,y)€vk

 Where ck is the color associated with the kth


intensity interval vk defined by the partition
planes at l=k-1 and l=k

Dr Suresh D, Professor, RNSIT


 Alternative representation of intensity slicing
 As mapping function shown in figure, any input intensity level
is assigned one of two colors, depending on whether it is above
or below the value of Ii.
 Piecewise linear functions of the intensity levels are used are
used to generate colors.

Dr Suresh D, Professor, RNSIT


 More slicing plane, more colors

Dr Suresh D, Professor, RNSIT


Radiation test pattern 8 color regions
* See the gradual gray-level changes
Dr Suresh D, Professor, RNSIT
X-ray image

Dr Suresh D, Professor, RNSIT


Dr Suresh D, Professor, RNSIT
 This method gives wider range of pseudo-color
enhancement.
 This approach is to perform three independent
transformations on the intensity of any pixel.
 The three results are then fed separately in to the red,
green and blue channels of color television monitor.
 This method produces a composite image whose color
content is modulated by the nature of the
transformation functions.
 These are transformations on the intensity values of an
image and are not functions of position.

Dr Suresh D, Professor, RNSIT


▪ Assigning colors to gray levels based on specific
mapping function.

Dr Suresh D, Professor, RNSIT


▪ Figure in the next slide shows the transformation
functions used.
▪ These sinusoidal functions contain regions of relatively
constant value around the peaks as well as regions that
change rapidly near the valleys.
▪ Changing the phase and frequency of each sinusoid can
emphasize ( in color ) ranges in the gray scale.
▪ If all three transformations have the same phase and
frequency, the output image will be monochrome.
▪ A small change in the phase between three
transformations produces little change in pixels whose
intensities correspond to peaks in the sinusoids.
Dr Suresh D, Professor, RNSIT
Fig.: Pseudocolor enhancement
By using the gray level to color
transformations

Dr Suresh D, Professor, RNSIT


▪ This method is used to combine several monochrome
images into a single color composite as shown in
figure.

▪ This approach is used in multi-spectral image


processing, where different sensor produce
individual monochrome images, each in different
spectral band.

▪ Applications are in color balancing, combining


images, and selecting three images for display.

Dr Suresh D, Professor, RNSIT


 Pseudo- color coding approach used when several
monochrome images are available.

Dr Suresh D, Professor, RNSIT


Dr Suresh D, Professor, RNSIT
Dr Suresh D, Professor, RNSIT
Thank you

Dr Suresh D, Professor, RNSIT

You might also like