0% found this document useful (0 votes)
120 views66 pages

Chapter 6 Color Image Processing

This document discusses color image processing. It begins with an overview of color theory, including the electromagnetic spectrum, visible light wavelengths, color perception in the human eye, and color models like RGB, CMY, and HSI. It then describes two types of color image processing: pseudocolor processing, which assigns colors to grayscale images; and full color processing, which manipulates real color images. Specific pseudocolor techniques like intensity slicing and multi-level intensity slicing are explained through examples.
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)
120 views66 pages

Chapter 6 Color Image Processing

This document discusses color image processing. It begins with an overview of color theory, including the electromagnetic spectrum, visible light wavelengths, color perception in the human eye, and color models like RGB, CMY, and HSI. It then describes two types of color image processing: pseudocolor processing, which assigns colors to grayscale images; and full color processing, which manipulates real color images. Specific pseudocolor techniques like intensity slicing and multi-level intensity slicing are explained through examples.
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/ 66

DIGITAL IMAGE PROCESSING

Chapter 6: Color Image Processing

Submitted to
Dr. Basant Kumar
(Associate Professor)
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

MOTILAL NEHRU NATIONAL INSTITUTE OF TECHNOLOGY

ALLAHABAD-211004, INDIA
Presented By:

Group 1:
Shubham Pasari (20165007)
Somnath Shukla (20162068)
Udayraj Vashishtha (20165036)
Umesh Meena (20165112)
Group 2: Group 3:
Sarthak Pathak (20165024) Achal Kumar (20165121)
Shiladitya Gangopadhyay (20165027) Aman Goel (20165094)
Shubham Tripathi (20165074) Kavish Gupta (20165113)
Shubham Yadav (20166030) Aman Rajput (20165039)
Spectrum of White Light

Fig 1.1 Color Spectrum seen by passing white light through a prism

1666 Sir Isaac Newton, 24 year old, discovered white light


spectrum
Electromagnetic Spectrum

Fig 1.2 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
Color of Light
•Perceived color depends on spectral content (wavelength composition)
e.g. 700 nm ~ red.

Fig 1.3 Spectrum of light

•A light with equal energy in all visible bands appears white.


Two Types of Photoreceptors at Retina

•Rods
–Long and thin
–Large quantity (~ 100 million)
–Provide scotopic vision (i.e., dim light vision or at low
illumination)
–Only extract luminance information and provide a general overall
picture
• Cones
–Short and thick, densely packed in fovea (center of retina)
–Much fewer (~ 6.5 million) and less sensitive to light than rods
–Provide photopic vision (i.e., bright light vision or at high illumination)
–Help resolve fine details as each cone is connected to its own nerve end
–Responsible for color vision

 Mesopic vision

--provided at intermediate illumination by both rods and cones


Sensitivity of Cones in the Human Eye
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.1 nm
Fig 1.4 Sensivity Curve Blue = 435.8nm
Primary and Secondary Colors
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


used in the case of pigments in
printing devices

White subtracted by CMY to get


Fig 1.5 Set of RGB and CMY colors Black
Seeing Yellow without Yellow

Mix green and red light to


obtain perception of yellow,
without shining a single yellow
Fig 1.6 Absorption of light in the human eye as a function photon.
of wavelength
Color Characterization
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

Hue Chromaticity
Saturation

Amount of red (X), green (Y) and blue (Z) to form any particular color is called tristimulus.
Perceptual Attributes of Color
 Value of Brightness i.e. perceived luminance.
 Chrominance
• Hue
o specify color tone (redness, greenness, etc.)
o depend on peak wavelength

• Saturation
o describe how pure the color is
o depend on the spread (bandwidth) of light spectrum
o reflect how much white light is added
RGB Color Model
Purpose of color models: to facilitate
the specification of colors in some
standard.

RGB color models:


Based on cartesian coordinate system.

Fig 1.7 RGB Color Model


RGB Color Cube
Color depth 24 bits
R = 8 bits
= 16777216 colors
G = 8 bits
B = 8 bits

Hidden faces
of the cube
Safe RGB Colors
Safe RGB colors: a subset of
RGB colors.
There are 216 colors common in
most operating systems.

Fig 1.8 The 216 safe RGB Colors


and All the grays in the 256 RGB
system
RGB Safe-color Cube
The RGB Cube is divided
Table 1.1 Valid into 6 intervals on each axis
values of each RGB
3
component in a safe to achieve the total 6 =
color.
216 common colors.
However, for 8 bit color
representation, there are the
total 256 colors. Therefore,
the remaining 40 colors are
left to OS.
CIE Chromaticity Diagram

Trichromatic coefficients:

x
Fig 1.9 Chromaticity Diagram Points on the boundary are fully saturated colors.
C= Cyan
CMY and CMYK Color Models M = Magenta Y = Yellow
K = Black
•Primary colors for pigment
–Defined as one that subtracts/absorbs a primary color
of light & reflects the other two
•CMY – Cyan, Magenta, Yellow
–Complementary to RGB
–Proper mix of them produces black
HSI Color Model
RGB, CMY models are not good for human interpreting
HSI Color model:
Hue: Dominant color
Color
carrying
Saturation: Relative purity (inversely proportional to amount of information
white light added)

Intensity: Brightness
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

Fig 1.10 Hue and Saturation on Color Planes


HSI Color Model (contd.)

Intensity is given by a position on the vertical axis.


HSI Color Model (contd.)
Converting Colors from RGB to HSI
Converting Colors from HSI to RGB
Example: HSI Components of RGB Colors

RGB
HUE
IMAGE

SATURATION INTENSITY

Fig 1.11 RGB Image and the components of the


corresponding HIS 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.
Pseudocolor 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. We need to assign colors to gray scale
image, because humans can distinguish different colors better than different shades of
gray.
Intensity Slicing or Density Slicing
Formula:

C1 = Color No. 1
C2 = Color No. 2

A gray scale image viewed as a 3D surface


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
Ck = Color No. k
lk = Threshold level k
Multi Level Intensity Slicing Example

An X-ray image of the Picker After density slicing into 8 colors


Thyroid Phantom.
Color Coding Example

Color coded image South America region


Gray Level To Color Transformation
Assigning colors to gray levels based on specific mapping functions
Gray Level to Color Transformation Example
Gray Level to Color Transformation Example
Pseudo Color Coding
Used in the case where there are many monochrome images such as multispectral
satellite images.
Pseudo Color Coding Example
Pseudo Color Coding Example
Visible blue Visible green
λ= 0.45-0.52 μm λ= 0.52-0.60 μm
Max water Measuring plant Color composite images
penetration

Better visualization 🡪Show quite


clearly the difference between
biomass (red) and human-made
features.
Visible red Near infrared
λ= 0.63-0.69 μm λ= 0.76-0.90 μm
Plant discrimination Biomass and shoreline mapping
Pseudo Color Coding Example

Psuedocolor rendition
of Jupiter’s moon Io

Yellow areas = older sulfur deposits.


Red areas = material ejected from
active volcanoes.

A close-up
Basics of Full Color Image Processing
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 (shown below)
Example: Full Color Image and Various Color Space
Components
Color image

CMYK components

RGB components

HSI components
Color Transformation
Used to transform colors to colors.
Formula:

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:

i=1,2,…,n

where ri = color component of f(x,y)


si = color component of g(x,y)
For RGB images, n = 3
Example: Color Transformation

Formula for RGB:

Formula for HSI:


k = 0.7

Formula for HSI:

These 3 transformations give the same results.


Color Components

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 Transformation Example
Color Slicing Transformation
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.
Color Slicing Transformation Example

After color slicing

Original image
Tonal Correction Examples
Color Balancing Correction Examples
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.

where r and s are intensity components of input and output color image.
Histogram Equalization of a Full Color Image
Color Image Smoothing

Let Sxy denote the set of coordinates defining a neighborhood centered at (x, y) in an RGB
color image. The average of the RGB component vectors in this neighborhood is

It follows from eq(6.4.2) and the properties of vector addition that


We recognize the components of this vector as the scalar images that would be obtained by
independently smoothing each plane of the RGB image using conventional gray-scale
neighborhood processing.

Thus, we conclude that smoothing by neighborhood averaging can be carried out on a per-
color-plane basis.
Fig 6.39(a) through (c) show the HSI components of the image. Fig 6.40(a) shows smoothed, full-color RGB image.
Color Image Sharpening

From vector analysis, we know that the Laplacian of a vector is defined as a vector whose
components are equal to the Laplacian of the individual scalar components of the input
vector. In the RGB color system, the Laplacian of vector c in Eq.(6.4-2) is

which tells us that we can compute the Laplacian of a full-color image by computing the
Laplacian of each component image separately.
Figure 6.41(b) shows a similarly sharpened image based on the HSI components in Fig.6.39. This result was
generated by combining the Laplacian of the intensity component with the unchanged hue and saturation
components.
There are 2 methods for color segmentation:
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.
If we want to segment a image based on color we naturally think first of the HSI color
space because color is conveniently represented in hue image.

2. Segmented in RGB vector space:


A thresholding function based on distance in a color vector space.
Example of Color Segmentation in HSI color space (From colored image to segmentation of
red pixels):
Color segmentation in RGB vector space:
● Each point with (R,G,B) coordinate in the vector space represents one color.
● There are 3 approaches for enclosing data regions in RGB vector space these are
1)Spherical 2) Circular 3) Cubic region
● Segmentation is based on distance thresholding in a vector space.
Example of color segmentation in RGB vector space:
Color Edge Detection
We are interested in the issue of computing edges on an individual-image basis versus
computing edges directly in color vector space.
Edge detection by gradient operators 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 .

Fig:(a)–(c) R,G, and B component


images and (d) resulting RGB color
image. (e)–(g) R,G, and B
component images and (h) resulting
RGB color image.
Color Edge Detection using Gradient formula
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 gradient formula.

Fig:(a) RGB image.(b) Gradient computed in


RGB color vector space.
(c) Gradients computed on a per-image basis
and then added.(d) Difference
between (b)and (c).
Noise in Color images

Noise can abrupt each color


component independently.
(a),(b)
(c),(d)
Fig:(a)-(c)-Red , green and blue components
of the image corrypted by additive white
gaussian noise of mean 0 and variance 800.
(d) Resulting RGB image.
HSI components of noisy image

(a),(b),(c)
Fig: HSI components of noisy color image in fig . (a)Hue, (b) Saturation , (c) Intensity
Color Image Compression

After lossy compression with ratio 230:1

You might also like