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

Colour Image Processing Techniques

The document covers the fundamentals and processing techniques of color images, including color models, image smoothing, segmentation, and noise in color images. It discusses the human eye's perception of color, the electromagnetic spectrum, and the characteristics of primary and secondary colors. Additionally, it explains various color models such as RGB, CMY, and HSI, along with their applications in digital image processing.
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)
10 views68 pages

Colour Image Processing Techniques

The document covers the fundamentals and processing techniques of color images, including color models, image smoothing, segmentation, and noise in color images. It discusses the human eye's perception of color, the electromagnetic spectrum, and the characteristics of primary and secondary colors. Additionally, it explains various color models such as RGB, CMY, and HSI, along with their applications in digital image processing.
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

Colour Image

Fundamentals
and Processing
Techniques

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 1


Chapter 6

Colour Image Fundamentals and Processing


Techniques

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 2


Contents
• Colour Fundamentals
• Colour Models
• Pseudocolour Image Processing
• Basics of Full-Colour Image Processing
• Colour Image Processing
• Image Smoothing and Image Sharpening
• Image Segmentation based on Colour
• Noise in Colour Images
• Colour Image Compression

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 3


Spectrum of White Light

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

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 4


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

[Link] 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

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 5


Cross section illustration of the
Human Eye

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 6


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
Our Interest
(well-lighted display)

Mesopic Vision is provided at intermediate illumination by both rod and cones

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 7


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 = 46.1nm

Blue = 435.8 nm

CIE = Commission Internationale de l’Eclairage (The International


Commission on Illumination)

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 8


Luminance vs. Brightness
Same lum. Different lum.
Different Similar brightness
brightness

• Luminance (or intensity)


– Independent of the luminance of surroundings

I(x,y,) -- spatial light distribution


V() -- relative luminous efficiency func. of visual system ~ bell shape (different for scotopic
vs. photopic vision;
highest for green wavelength, second for red, and least for blue )
• Brightness
– Perceived luminance
– Depends on surrounding luminance

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 9


Luminance vs. Brightness
(cont’d)
• Example: visible digital watermark
– How to make the watermark appear at
the same graylevel all over the image?

Luminance is an objective measurement of light.


Brightness is a subjective perception of light.

from IBM Watson web page “Vatican Digital Library”

A digital watermark is a unique identifier embedded into content like videos, images, or electronic documents

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 10


Phenomenon of Contrast
• Human perception more sensitive to luminance contrast than
absolute luminance
• Weber’s Law: | Ls – L0 | / L0 = const
– Luminance of an object (L0) is set to be just noticeable from luminance
of surrounding (Ls)
– For just-noticeable luminance difference L:
L / L  d( log L )  0.02 (const)
• equal increments in log luminance are perceived as equally different

• Empirical luminance-to-contrast models


– Assume L  [1, 100], and c  [0, 100]
– c = 50 log10 L (logarithmic law, widely used)
– c = 21.9 L1/3 (cubic root law)
Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 11
Phenomenon
of Contrast Mach Bands

Figure is from slides at


Gonzalez/ Woods DIP
book website (Chapter
2)

• Visual system tends to undershoot or overshoot around the boundary of regions


of different intensities

• Demonstrates the perceived brightness is not a simple function of light intensity


Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 12
Color of Light
• Perceived color depends on spectral content (wavelength composition)
– e.g., 700nm ~ red.
– “spectral color”
• A light with very narrow bandwidth

“Spectrum” from [Link]

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

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 13


Primary and Secondary Colors
Additive primary colors: RGB used in
the case of light sources such as colour
monitors
RGB add together to get white

Subtractive primary colors: CMY use in


the case of pigments in printing devices
White subtracted by CMY to get Black

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 14


Representation by Three Primary Colors
• Any color can be reproduced by mixing an appropriate set of three primary
colors (Thomas Young, 1802)

• Three types of cones in human retina


– Absorption response Si() has peaks around 450nm (blue), 550nm (green), 620nm
(yellow-green)
– Color sensation depends on the spectral response {1(C), 2(C),
3(C) } rather than the complete light spectrum C()

 S1() C() d  1(C)


C()
 S 2() C() d   2(C) Identically perceived
color light colors if i (C1) = i
3(C) (C2)
 S3() C() d 

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 15


Example:Seeing Yellow Without
Yellow
570nm
520nm 630nm

Green and red light are mixed to obtain perception of yellow.

“Seeing Yellow” figure is from [Link] ELE330 S’01 lecture notes @ Princeton; R/G/B cone
response is from slides at Gonzalez/ Woods DIP book website

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 16


Color Matching and Reproduction
• Mixture of three primaries: C = Sum(k Pk () )
• To match a given color C1
– adjust  k such that i (C1) = i (C), i = 1,2,3.

• Tristimulus values Tk (C)


– Tk (C) =  k / wk
wk – the amount of kth primary to match the reference white
• Chromaticity tk = Tk / (T1+T2+T3)
– t1+t2+t3 = 1
– visualize (t1, t2 ) to obtain chromaticity diagram

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 17


Perceptual Attributes of Color
• Value of Brightness (perceived
luminance)
• Chrominance
– Hue
• specify color tone (redness,
greenness, etc.)
• depend on peak wavelength

– Saturation
• describe how pure the color is
• depend on the spread (bandwidth) of light HSV circular cone is from online documentation
spectrum of Matlab image processing toolbox
• reflect how much white light is added
[Link]
• RGB  HSV Conversion ~ nonlinear /helpdesk/help/toolbox/images/col [Link]

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 18


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 Saturation Chromaticity

amount of red (X), green (Y) and blue (Z) to form any particular color is called
tristimulus.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 19


CIE Chromaticity Diagram
Trichromatic coefficients:

X The
x International Commis
XYZ
sion on Illumination
Y (CIE) published
y the CIE 1931 color
XYZ spaces which define
y the relationship
z Z between the
XYZ visible spectrum and
the visual sensation
xyz1 of specific colors by
human color vision.

Points on the boundary are fully


saturated colors

x
Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 20
Color Gamut of Color Monitors and Printing
Devices
A chromaticity diagram is a 2D representation
Color Monitors that shows all the perceivable hues by the
standard observer for different (x, y) pairs,
along with the dominant single frequency
colors and their corresponding spectral
Printing devices wavelengths. It is used as a standard reference
in defining color spaces, such as CIE XYZ or CIE
1931, which map human color perception
based on the CIE parameters x and y.

Colour Gamut is the range of colours that a


device can generate or display.
It is same as colour space.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 21


CIE Color Coordinates (cont’d)
• CIE XYZ system

– hypothetical primary sources to yield all-positive spectral tristimulus values


– Y ~ luminance
• Color gamut of 3 primaries
– Colors on line C1 and C2 can be produced by linear
mixture of the two
– Colors inside the triangle gamut
can be reproduced by three primaries

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 22


RGB Color Model
Purpose of color models: to facilitate the specification of colors in some standard

RGB color models:


- based on cartesian coordinate system

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 23


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

Hidden faces of
the cube

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 24


RGB Color Model
Red fixed at 127

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 25


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

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 26


RGB Safe-color Cube

The RGB Cube is divided into 6


intervals on each axis to achieve the total
63 = 216 common colors.
However, for 8 bit color
representation, there are the total 256 colors.
Therefore, the remaining 40 colors are left to
OS.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 27


CMY and CMYK Color Models
• Primary colors for pigment
C=Cyan M = Magenta
– Defined as one that subtracts/absorbs a primary Y = Yellow K = Black
color of light & reflects the other two
• CMY – Cyan, Magenta, Yellow
– Complementary to RGB
– Proper mix of them produces black

 C  1  R 
M   1  G
    
1 
 Y  B

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 28
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

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 29


Relationship Between RGB and HSI
Color Models

RGB HSI

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 30


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.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 31


HSI Color Model (cont.)

Intensity is given by a position on the vertical axis.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 32


HSI Color Model

Intensity is given by a position on the vertical axis.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 33


Example: HSI Components of RGB Cube

RGB Cube

Hue Saturation

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 34


Converting Colors from RGB to HSI
if B  G

H  if B  G
360  

𝛶 =¿ ]

3
S1
RGB

1
I  (R  G  B) 3

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 35


Converting Colors from HSI to RGB
RG sector: 0  H  120 GB sector:120  H  240
RI 1S cos H H  H  120

cos(60  H ) R  I (1  S )
GI 1 S cos H
B  I (1  S )
cos(60  H )
G  1  (R  B)
B  1  (R  G)
BR sector: 240  H  360
H  H  240

BI 1+S cos H


o
cos(60  H )
G  I (1  S )

R  1  (G  B)
Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 36
Example: HSI Components of RGB Colors

RGB
Image Hue

Saturation Intensity

(Images from Rafael C. Gonzalez and Richard E. Wood,


Digital Image Processing, 2nd Edition.
Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 37
Example: Manipulating HIS
Components
RGB
Image Hue Hue Saturation

Saturation Intensity Intensity RGB


Image
(Images from Rafael C. Gonzalez and Richard E. Wood,
Digital Image Processing, 2nd Edition.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 38


Color Coordinates Used in TV Transmission
• Facilitate sending color video via 6MHz mono TV channel
• YIQ for NTSC (National Television Systems Committee)
transmission system
– Use receiver primary system (RN, GN, BN) as TV receivers standard
– Transmission system use (Y, I, Q) color coordinate
• Y ~ luminance, I & Q ~ chrominance
• I & Q are transmitted in through orthogonal carriers at the same freq.

• YUV (YCbCr) for PAL and digital video


– Y ~ luminance, Cb and Cr ~ chrominance
Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 39
Color Coordinates

• RGB of CIE
• XYZ of CIE
• RGB of NTSC
• YIQ of NTSC
• YUV (YCbCr)
• CMY

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 40


YIQ Color Space
YIQ is the colour space used by the analog
NTSC colour TV system. I stands for in-phase,
while Q stands for quadrature, referring to the
components used in quadrature amplitude
modulation.
Y component represents the luma information, and is the only
component used by black-and-white television
receivers . I and Q represent the chrominance information, with I
indicating (roughly) orange-blue contrast, and Q indicating purple-
green contrast. I and Q can be thought of as a second pair of axes on
the same graph as the YUV color space, rotated 33°; therefore IQ
and UV represent different coordinate systems on the same plane.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 41


YUV Colour Space
YUV is the colour model used by the analog
PAL colour TV system.
Y represents luma and UV represent the two
chroma components. Y’ denotes that luma is from
gamma corrected RGB and it is different from true
luminance.
Currently, YUV is commonly used in the computer
industry to describe colour spaces that are
encoded using YCbCr.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 42


YCbCr Colour Space
• YCbCr, Y′CbCr, or Y Pb/Cb Pr/Cr, also written as YCBCR or Y′CBCR, is a family of color spaces
used as a part of the color image pipeline in digital video and photography systems.
• Y′ is the luma component and CB and CR are the blue-difference and red-difference chroma
components. Luma Y′ (with prime) is distinguished from luminance Y, meaning that light
intensity is nonlinearly encoded based on gamma corrected RGB primaries.
• Y′CbCr color spaces are defined by a mathematical coordinate transformation from an
associated RGB primaries and white point. If the underlying RGB color space is absolute,
the Y′CbCr color space is an absolute color space as well; conversely, if the RGB space is ill-
defined, so is Y′CbCr.
• This color space separates the brightness information (Y) from the color information (Cb
and Cr), which aligns well with the human eye's differing sensitivities to luminance and
chroma, thereby allowing for more efficient compression without a significant loss in
image quality.
Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 43
Examples

RGB

HSV

YUV

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 44


Examples

RGB

HSV

YIQ
Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 45
Summary

• Monochrome human vision


– visual properties: luminance vs. brightness, etc.
– image fidelity criteria
• Color
– Color representations and three primary colors
– Color coordinates

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 46


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

[Link] color image process: The process to manipulate real color images such as
color photographs.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 47


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.
Why we need to assign colors to gray scale image?

Answer: Human can distinguish different colors better than different shades of gray.

(Images from Rafael C. Gonzalez and Richard E. Wood,


Digital Image Processing, 2nd Edition.
Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 48
Intensity Slicing or Density Slicing
Formula:
 C1 if f ( x, y)  T C1 = Color No. 1
g( x, y)   C2 = Color No. 2
if f ( x, y)  T
C2

Color
T C2

C1

0 T L-1
Intensity
A gray scale image viewed as a 3D surface.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 49


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.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 50


Multi Level Intensity Slicing
g( x, y)  Ck for lk 1  f ( x, y)  lk

Ck = Color No. k
lk = Threshold level k
Color

Ck

Ck-1

C3
C2
C
1
0 l1 l2 l3 lk
lk-1 L-1
Intensity

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 51


Multi Level Intensity Slicing Example
Ck = Color No. k
g( x, y)  Ck for lk 1  f ( x, y)  lk lk = Threshold level k

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


Thyroid Phantom.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 52


Color Coding Example >20

Gray Color
Scale 10 map

Gray-scale image of average monthly


rainfall.
0

Color coded image South America region


(Images from Rafael C. Gonzalez and Richard E. Wood,
Digital Image Processing, 2nd Edition.
Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 53
Gray Level to Color Transformation
Assigning colors to gray levels based on specific mapping functions

Red component

Gray scale image


Green component

Blue component

Therefore 3 independent transformations on the intensity of any input pixel is performed.


Then the 3 results are fed separately into the red, green and blue channels of a colour monitor
This produces a composite image whose colour content is modulated by the nature of the transformation functions.
They are not functions of position.

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 54


Colour Transformation

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 55


Colour Transformation

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 56


Colour Transformation

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 57


Colour Transformation

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 58


Colour Transformation

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 59


Colour Transformation

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 60


Colour Complements

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 61


Colour Slicing

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 62


Colour Image Smoothing

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 63


Colour Image Smoothing

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 64


Colour Image Smoothing

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 65


Colour Image Smoothing

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 66


Colour Image Sharpening

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 67


Chapter 6
END OF LECTURE

Digital Image Processing [Link] Sinha Chaudhuri. Dept of ETCE , JU 68

You might also like