Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
55 views

Digital ImageProcessing-color Image Processing

This document provides an overview of digital image processing with a focus on color image processing. It discusses color fundamentals, color models, and color image processing techniques. The key topics covered include color perception, color devices, color models like RGB, HSV and HSI, color matching, conversion between color models, and pseudo versus true color processing. The overall aim is to describe and explain basic principles and algorithms for digital color image processing.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Digital ImageProcessing-color Image Processing

This document provides an overview of digital image processing with a focus on color image processing. It discusses color fundamentals, color models, and color image processing techniques. The key topics covered include color perception, color devices, color models like RGB, HSV and HSI, color matching, conversion between color models, and pseudo versus true color processing. The overall aim is to describe and explain basic principles and algorithms for digital color image processing.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 115

COL LEGE OF E N GI N E ER I N G ROOR K EE

Established in 1998

Digital Image Processing (TCS-071)

Session: 2020-21

Digital Image Processing


COURSE OBJECTIVE

The aim of this course is,


 Describe and explain basic principles of digital image
processing.
 Design and implement algorithms that perform basic image
processing (e.g. noise removal and image enhancement).
 Design and implement algorithms for advanced image
analysis (e.g. image compression, image segmentation).
 Assess the performance of image processing algorithms and
systems.

Digital Image Processing


Digital Image Processing
Color Image Processing

Digital Image Processing


Color Image Processing
Color Image Processing (CIP)

One of the
most • Color fundamentals
important • Devices for managing colors
aspects of any • Color models
object is its • Pseudo color image
color. CIP processing
provides an • True color image processing
overview of
the following:
Color: Its necessity

The color is necessary for two


reasons.
• To identify the object
• To facilitate the manual analysis by
highlighting the Region Of
Interest(ROI) in different colors.
CIP

Color
Image • Full(or true)
Processing color processing
is divided
into two
• Pseudo color
major processing
groups viz.
Full color processing

This deals with acquisition, display, and printing of full-


color images.

Now-a-days,all the fields, except a few like medical


domains, are using the color images in wide variations.

Hence Full Color Processing is useful in all domain


where full color images are used.
Pseudo color processing

It is used to assign
artificial color to a
monochrome image.
Color
Fundamentals

The phenomenon of color involves


• The physical properties of light
• The psychological phenomenon of human brain.
The human eye perceives the light reflected by the object.
Let be the illumination of light and be the reflectivity of the
object.
Now the color is given as:
The physical intensity and perceptual brightness are
linked, as perceptual brightness is directly
proportional to total number of absorbed photon.

Sensor response ,

Where
is the sensitivity function of the
sensor used for capturing the image.
Color Fundamentals…
Human eyes have two kinds of photoreceptors, namely
rods and cones.

Cones provide a low-level light or scotopic vision where


there is no color perception.

They are sensitive to wavelenghts around 555nm.

Rods provide a high-level or photopic vision where color


sensation is present
Color Fundamentals…
Between photopic and scotopic, there is another type of
vision called mestopic vision where both cons and rods
provide meaningful information.

Three types of cones cells, long, medium and short.

They are sensitive to red, green and blue light respectively


Color Fundamentals…

Whenever an additional
The ability to perceive same color
correction is required to maintain
of an object in different lighting
the same color, as in digital
conditions, is called color
cameras, its called chromatic
constancy.
adaptation
Color Fundamentals…
• For a monochrome image response or
intensity I is given by

Where,
I is called luminance, intensity, brightness, value
or grey-level of the image.
Color Fundamentals…
• A color image, thus can be considered to be the set of three
monochrome images.
• It can be described as a set of three responses

The combination of these three can yield any color, which is


called Grassman axiom.
Color Fundamentals…

The essence of a color can be


conveyed by the following
parameters
• Brightness or luminance,
• Hue, and
• saturation
Color Fundamentals…
Luminance is the power of light and is
indicated by the area under the entire
spectrum

The dominant wavelength is called hue

Saturation is measured as a percentage


of the luminance in the dominant
component of the spectrum
Devices for color imaging

They may include cameras and color monitors etc.

The earliest cameras were collectively called as vidicon


camera, which is a storage type camera tube based on
photoemission.

It contained i)an electron gun and ii)a target and faceplate.


Color imaging…
• In late 90s they were replaced by charge-
Couple device based(CCD) cameras.
• CCD-based cameras have i.)Lens
ii.)photosensitive sensors and iii.)electronic
circuits
Color imaging…
• Color monitors have three separate electron
guns one each for red, green and blue. the
image is perceived as a combination of these
three colors
• The quality of image is determined by the
graphics adapter card. Video Graphics
Array(VGA) and Super-VGA are some of the
graphics cards.
Color image storage and processing

There
are two • Component
ways of ordering, and
storing • Packed ordering
color
images
Component ordering

A color image is stored as three


identical intensity images . The
value of the pixels of the image
are obtained by accessing all the
three identical intensity images
together.
Packed ordering
In this method every pixel contained all the
three color components packed together.

Packed Ordering
Indexed Images

An indexed image is a special category of full color


image

The number of colors in a full color image can be


reduced, since the human eyes can see only a
limited number of colors, by the various methods

They include creating an additional color map,


color gamut or palette with the image.
Conversion of color to grey scale image

• Color image can be converted to grey scale by


replacing the RGB-value by the luminance
value for each pixel.
• It can be obtained as

But the image obtained by this method is too


dark in the red areas and too bright in blue areas.
RGB to Gray…
• To remove this , we adopt a method using
weights

The value of weights are


RGB to Gray…
Similarly, desaturation is a process of removing
the RGB in a linear manner.

Here k is between 0 and 1.


Color models

Colors are represented as a tuple of numbers


(mostly three and four in case of CMYK model).

A set of colors is described as an abstract


mathematical model called a color model.

There are many ways of classifying colour


models.
Color Models

There are many ways to classify


color models, they are called color
systems, as
• Primary systems
• Luminance-chrominance systems
• Perceptual systems, and
• Statistical systems
Luminance-chrominance systems

These systems use one


component for luminance
and two components for
the chrominance part.

Examples include .

• They are the color models that are


Primary systems based on the trichromatic theory.
Examples include RGB and CIEXYZ
Perceptual systems
• These systems try to use quantification of
subjective color perception in terms of intensity,
hue, and saturation.
• Examples include HSV and HLS.
• The main disadvantage of these systems is the
device dependence.
Statistical systems
Statistically independent component color spaces
use statistic methods for color generation.
Color matching
It is an experimental setup where a sample color can be
projected and can be compared to test lights .

It stops when there is a match between test color and


combination of test lights.

𝐶=𝑟𝑅+𝑔𝐺+𝑏𝐵
Here R,G,B indicate red, green, and blue components and
r,g,b represent the amount of each primary color used in
matching.
Color matching…

This leads to standardization as defined by the


International Commission of Illumination, or Commission
Internationale de l’Eclairage(CIE).

The components hue and saturation together are called


chromaticity.

Red blue and green are called tri-stimulus and are denoted
by X- Y- and Z-axes.
Color models

Color models can be grouped as follows


• Additive color models
• Subtractive color models
• If the combination of two or more colors result in
new color with higher luminance, its additive color
model
• If the combination of two or more colors result in
new color with lower luminance, its subtractive
color model
Color Models
RGB color models

HSI color models

HSV color models

HLS color models

TV- color models


RGB color model
In this, colors are represented by a cube. Origin is
represented by black while the opposite corners are by
white.

The lines connecting the primaries represent the various


shades of a given color

Used in TV, cameras scanners and computer monitors.


HSI color model

The component I is the


H represent Hue, S
average of the R, G and B
represent Saturation, and I
components and hue is
represent Intensity.
expressed as an angle.
RGB HSI
• RGB can be converted to HSI using the
following

With
HIS to RGB
• Similarly HSI can be converted to RGB using
Divide into three sectors as
• Sector 1 if H is between 0 and 120 degree
• Sector 2 if H is between 120 and 240 degree
• Sector 3 if H is between 240 and 360 degree
• Based on the sectors , compute the
components
HSV color models
It includes Hue, Saturation, and Value.

Like the RGB model, it is represented by a six-sided


pyramid

Vertical axis is called Brightness or value

Horizontal distance from the axis represent the


saturation

The angle represent the hue


HSV…..
• The RGB can be converted to HSV as:
• Calculate the maximum of RGB component,
called as . The range k is given as -
• The saturation can be calculated as

The luminance is given as

Where is the maximum component value as R,G,B


RGB HSV
• Normalize the components as follows

The hue can be calculated as

The normalized hue is in range 0-1 and is given as

For any angle, say 360 the HSV can be calculated by


multiplying the angle with the H value.
HLS model

It stands for Hue, Luminance, and Saturation

The storage representation is a double pyramid,


but is mathematically represented as a cylinder

The hue value of the HLS space is similar to that


of HSV space.
HSV model to RGB model conversion is done as

• Calculate
• Calculate

Make a branch based on the value of as follows:


Switch
Case 0: (v,z,x) Case 1: (y,v,x) Case 2: (x,v,z) Case 3: (x,y,v) Case 4:
(z,x,y) Case 5: (v,x,y)
The values can be rounded off as follows:
HSV to RGB….
• The luminance is calculated as

Saturation is given by

Hue can be calculated as


TV color models

Video standards specify many aspects relatted to video signals such as

Scan rate

Interlacing

Image aspect ratio

Synchronizing signals

Some of the video standards include


• National Television System Committee(NTSC)
Printing color models

They are the color models that


are used extensively in printers

• CMY model, and


They are • CMYK model
CMY and CMYK
• C stands for Cyan, m stands for magenta, y stands
for yellow and k stands for black
• CMYK is an alternative model used in color
printing, where

This is mathematically represented as


From RGB to CMY
The transformation from RGB to CMY is given as
Color Quantization

The tuples that are


It is necessary to convert
generated during the
floating point numbers to
conversion of model to an
binary values before they are
image may be floating point
either displayed or stored.
numbers
Color Quantization

Also the human eye cannot


The process of converting the recognize millions of colors, thus the
floating points into a binary value is process of picking the best 256
called Quantization. colors that the eye recognizes, is
called color quantization
Color Quantization…….

Given M tuples, the problem is to


identify the best K colors that can
be representative of the whole
population.
If such colors are found, they can
replace the whole color
population which is the purpose
of color quantization algorithms
Color Quantization…….
Color
Quantization
Algorithms

Uniform Non-uniform
Quantization Quantization

Popularity Median-Cut Octree


Algorithm Algorithm Algorithm
Popularity Algorithm
• In this, we give priority to the colors that occur
frequently in the image.
The procedure is as follows
• Form a list of colors present in the image
• Sort the list based on the frequency of occurrence of
colors
• Choose the best K predefined colors in the sorted list
• Replace each color by its closest representative,
which is determined by the mean-square distance
Median-cut Algorithm
• In this, we split the color space into sub blocks
using the median value such that the sub
blocks have the same color dots.
The procedure is as following
• Take an original cube of the image
• Find the median value. Using the value, split
the cube along its lowest dimension. The split is
such that each block has approximately N/2
dots.
Contd…
• Repeat the above step, until there are exactly
K- sub blocks
• For each sub block, pick a color
representative, which is the centre of the sub-
block
• Replace the original color with the
representative
• Exit
Octree Based Algorithm
• Octree is a data structure where every node
has eight children nodes. The idea is to
partition the color space into octree cubic sub-
spaces
The procedure is as follows:
• Initially the quantization tree is empty. Decide
the predefined colors K.
• Read the color tuple
Contd..
• Check and insert the color tuple in the
quantization tree. If the color tuple is not
present then,
-if the number of nodes is less than K, create a
new node
-if the number of nodes is K, the existing
nodes of a similar color are merged.
• Replace by locating the best color in the octree
Processing in colour imaging
Physical Background
• Visible light: a narrow band of
electromagnetic radiation →
380nm (blue) - 780nm (red)
• Wavelength: Each physically
distinct colour corresponds to at
least one wavelength in this
band.
• Pure Colours: Pure or
monochromatic colours do not
exist in nature.
• Spectrum: Intensity as
a function of wavelength.

From http://fuse.pha.jhu.edu/~wpb/spectroscopy/basics.html

• The colour of an object: is the product of the


spectrum of the incident light with the light
absorption and/or reflection properties of the
object.
Human colour perception
• The human eye does not perceive individual
light wavelengths.
• It contains three types of colour receptor
(cones) which integrate over parts of the
spectrum:

From http://math.ucr.edu/home/baez/physics/General/BlueSky/blue_sky.html
• It is therefore possible to characterise a psycho-
visual colour by specifying the amounts of three
primary colours: red, green and blue, mixed
together.
• This leads to the standard RGB space used in
television, computer monitors, etc.
• We specify the levels of R, G and B in the range
[0, 1], but they can easily be extended to other
ranges (8-bit integers for example).
(1,1,1)

RGB
Problems with Processing Colour Images

• When processing colour images, the following


problems (amongst others) have to be dealt with:
– The images are vectorial → 3 numbers are associated with
each pixel.
– The colours recorded by a camera are heavily dependent
on the lighting conditions.
Lighting conditions
• The lighting conditions of the scene have a
large effect on the colours recorded.

Image taken lit by a flash. Image taken lit by a tungsten


lamp.
• The following four images of the same scene were
acquired under different lighting conditions:
Dealing with Lighting Changes
• Knowing just the RGB values is not enough to
know everything about the image.
– The R, G and B primaries used by different devices are
usually different.
• For scientific work, the camera and lighting should
be calibrated.
• For multimedia applications, this is more difficult
to organise:
– Algorithms exist for estimating the illumination colour.
Processing Vectorial Images
Processing Vectorial Images
• A vectorial image has a vector at each pixel. For colour
images, these vectors each have 3 components.
• Vectorial images with larger numbers of components
also exist, e.g. in satellite imagery.
• There are two ways one can process vectorial images:
– Marginal processing.
– Vectorial processing.
Greyscale

Colour

f (x, y) ® {0,1,…, N} f (x, y) ® [ {0,…,N}, {0,…,N}, {0,…,N} ]


Marginal Processing

• Each channel is processed separately:

Red Red
Scalar process.

Green Green
Scalar process.

Blue Blue
Scalar process.
Vectorial Processing
• The colour triplets are processed as single units:

Red Red

Green Vectorial Green


process.
Blue Blue
The Problem of False Colours
False
Colours !!
Marginal
Median

Vectorial
Median
The Problem of False Colours

Marginal  R  100 
 
median  V  100 
 
 B  0 
 R  100   R0   R  100 
     
 V 0   V  100   V  100 
     
 B  0   B  0   B  100 
 R0 
 
Vectorial  V  100 
median  
 B0 
Alternative Colour Spaces
Alternative Colour Spaces
• Various other colour representations can be
calculated from the RGB representation.
• This can be done for:
– Decorrelating the colour channels:
• principal components.
– Bringing colour information to the fore:
• Hue, saturation and brightness.
– Perceptual uniformity:
• CIELuv, CIELab, …
Processing Strategy

Red Red

Processing
Green Green
T T-1
Blue Blue
Colour spaces
• RGB (CIE), RnGnBn (TV - National Television Standard Comittee)
• XYZ (CIE)
• UVW (UCS de la CIE), U*V*W* (UCS modified by the CIE)
• YUV, YIQ, YCbCr
• YDbDr
• DSH, HSV, HLS, IHS
• Munsel colour space (cylindrical representation)
• CIELuv
• CIELab
• SMPTE-C RGB
• YES (Xerox)
• Kodak Photo CD, YCC, YPbPr, ...
3D-polar Coordinate Colour Spaces
3D-polar Coordinate Colour Spaces
• These spaces use a cylindrical (3D-polar) coordinate system to
encode the following three psycho-visual coordinates:
– Hue (dominant colour seen)
• Wavelength of the pure colour observed in the signal.
• Distinguishes red, yellow, green, etc.
• More the 400 hues can be seen by the human eye.
– Saturation (degree of dilution)
• Inverse of the quantity of “white” present in the signal. A pure colour has
100% saturation, the white and grey have 0% saturation.
• Distinguishes red from pink, marine blue from royal blue, etc.
• About 20 saturation levels are visible per hue.
– Brightness
• Amount of light emitted.
• Distinguishes the greylevels.
• The human eye perceives about 100 levels.
3D-polar Coordinate Colour Spaces
• The transformation of the RGB colour space to a hue, saturation
and brightness colour space is essentially a conversion from a
set of rectangular coordinates to a set of (3D-polar) cylindrical
coordinates.

• Yet there are many such spaces triangle HSI


described in books. HSV
• How does one choose which one to IHS HLS
use?
Idea Behind the Transformation
• In the RGB space, the vectors [R, G, B] specify the amount of each
red, green and blue primary in the colour.
– For convenience, we take R, G, B  [0, 1]
– The valid coordinates form the RGB cube [0, 1]  [0, 1]  [0, 1].
• The basic idea behind the transformation to the hue, saturation
and brightness coordinate system is to place a new axis between
[0, 0, 0] and [1, 1, 1], and to specify the colours in 3D-polar
coordinates based on this axis.
– This new axis passes through all the grey points (R = G = B), so we call it the
achromatic axis.
Achromatic axis
ic

Hue
at
i s om

[1,1,1] H
ax ch r
A

Saturatio
Brightness
[0,0,0] n
Basic Problem Achromatic
axis
• Many of the spaces were originally developed for
easy numerical specification of colours in

Conic HSV
computer graphics applications.
• Due to its brightness function, the “natural”
shape of the HSV colour gamut is a cone.
• However, with this shape, there are many
coordinates which are not valid. H=180° H=0°
• In order to avoid costly verification of the validity
of specified coordinates, these gamuts were often
artificially expanded into cylinders.
• These cylindrical spaces have often been
unwittingly carried over into image processing
applications.

Cylindrical HSV
Standard RGB → HSV Transform
• max = sup(R, G, B) min = inf(R, G, B)
• L = max

•  max  min
 if max  0
S   max
0 otherwise

 maxG Bmin if R  max
 BR
H t   max  min  2 if G  max
If Ht < 0, HRt :=
G Ht + 6
 max  min  4 if B  max

• H = Ht  60°
Conic HLS
• The same problem occurs
for the HLS transformation.
H=180° H=0°
• Here the double cone has
been artificially expanded
at both ends.

Cylindrical HLS
Standard RGB → HLS Transform
• max = sup(R, G, B) min = inf(R, G, B)

L max  min
2
R, G and B are between 0 and 1.


 max  min
max  min if L 1
Sc   2


max  min
2  max  min if L 1
2

 GB
max  min if R  max

• If Ht < 0, HtB:=
 R Ht + 6
H 
t max  min  2 if G  max
 R G
 4 if B  max
 max  min

• H = Ht  60°
Removal of the Brightness Dependence
of the Saturation (1)
• HSV model
 max R, G, B   min R, G, B 
 if max R, G, B   0
S HSV  max R, G, B 
0 otherwise

• But the HSV brightness LHSV = max(R, G, B)


• So the saturation with the brightness-
dependence removed is
S HSV  max R, G, B   min R, G, B 
NC
Removal of the Brightness Dependence
of the Saturation (2)
• HLS model
0 if max R, G, B   min R, G , B 
max R, G , B   min R, G, B 
S HLS  if LHLS  12
max R, G, B   min R, G , B 
max R, G, B   min R, G , B 
otherwise
2  max R, G , B   min R, G, B 

• where the brightness


max R, G, B   min R, G, B 
LHLS 
2
• The brightness dependence is removed by
using
S NC
HLS 
 S HLS 1  2 12  LHLS 

S HLS  max R, G, B   min R, G, B 


• to give NC

Same as the non-cylindrical saturation obtained for HSV!


• Consider the colour image below. Not all the pixels which
appear white have RGB coordinates of exactly [1, 1, 1] (similar
for black pixels).
• These small variations are amplified in the saturation images due to
the expansion of the cones into cylinders.

HSV cylindrical HLS cylindrical


saturation saturation
“Le chanteur”, Joan Mirò
(bottom half inverted)
• The advantage of this measure of saturation is visible on
the example image.

Com
pa r
e to

Le chanteur, Joan Mirò HSV cylindrical


Proposed Saturation
(bottom half inverted) saturation
Advantages of the IHLS space
• This is the Improved HLS space.
• It has the following advantages:
– The saturation is low for black and white pixels.
– The brightness is independent of the saturation (can
be shown mathematically). This means that you are
free to choose any brightness, luminance or
lightness function.
– The saturation values can be easily compared. This
is important for mathematical morphology
operators.
Transformation into the IHLS space
• The full transformation is implemented efficiently as:

Or your own
Y  0.2126 R  0.7152G  0.0722 B favourite
brightness
S  max R, G, B   min R, G, B 
expression.

 R  12 G  12 B 
H   arccos  
 R 2  G 2  B 2  RG  RB  BG 2 
1

Trigonometric
version is more
accurate.
360  H  if B  G
H 
H  otherwise
Contents
• Introduction
• Processing Vectorial Images
• Alternative Colour Spaces
• 3D-polar Coordinate Colour Spaces
• Processing and Analysing Colour Images
Processing and Analysing Colour Images

• Some applications which take advantage of


the good properties of the IHLS space are
presented.
• The following are discussed:
– Hue statistics.
– Mathematical morphology on colour images.
B
R

G
Change of representation

S
H

Image Processing or Analysis


Basic Idea

S
H

Change of representation
B
R

G
Processing the Hue Component

Colour image – “The virgin”, Hue component


P. Serra (16th century)

The reds and violets are separated by a Histogram of the hue


large discontinuity, even though they
look similar.
Hue Statistics
• For the brightness and the saturation, one can use standard
statistical methods for calculating the mean, standard deviation,
etc.
• For data ai (i = 1, 2, …, n) distributed on the unit circle, the mean
direction is that of the resultant vector obtained by adding unit
vectors with directions ai.
• A measure of the variation in the directions of the data is given by
the length of this vector divided by n (the mean length), which
has the following characteristics:
– range [0:1]
– Values close to 1  the data is less spread out.

n=3
Mean
• Given n values of the hue Hi
• The mean direction H is calculated as follows:
n n (1)
A   cos H i , B  sin H i , R  A2  B 2 2

i 1 i 1

arctan  BA  if B  0(2)
,A0

H  arctan  BA    if A0
arctan  B   2 if B  0, A  0
•  R is: A
The mean length

(3)

R
R
n
Hue Mean which Takes the Saturation
Into Account
• The previous formulation is standard in the texts on circular
statistics, but it ignores the fact that not all hues have the same
importance.
• We take this into account by weighting the length of each hue
vector by the associated saturation value.

n=3
• Let Si be the saturation associated with hue Hi.
• We replace equation (1) by:
n n
AS   S i cos H i , BS  Si sin H i , RS2  AS2  BS2
i 1 the saturation-weighted
• To calculate i 1 mean direction H , we replace A and
S
B by AS and BS in equation (2).
• Equation (3) becomes:

RS
RS 

• Note that RS remains a measure ofn theS i
angular dispersion, and does not
i 1 saturation.
give information on the mean of the
Example • H = 327°
• R = 0.24
Colour Image

Weighted
• HS = 20°
• R = 0.16 Hue threshold
S 307° - 347°
Hue histogram
Hue

Saturation Hue threshold


0° - 40°
Saturation

histogram
Mathematical Morphology in a
3D-Polar Coordinate Colour Space
• One can easily order the brightness and saturation
1 1
values.
• On the other hand, the hue is defined on the circle,
for which there is no obvious order (blue larger than
red?, green smaller than red? ).
0 0
• Applying morphological operators to the brightness
L S
and saturation is therefore easy.
– We just have to be sure that we order the vectors and not
the components (i.e. marginal order), so as to avoid
introducing false colours.
– For this purpose we use the lexicographical order.
H 0°
• Applying mathematical morphology to the hue is
trickier, and won’t be discussed in this talk.
Lexicographical Order
• This is the order in which words are
arranged in a dictionary.
Aardvark
Abacus
Abandon
.
.
.
Borough
Bough
.
.
Lexicographical Order for Vectors
• For example, given two vectors x = (x1, x2, x3) and y = (y1, y2, y3):
 x1  y1
or


x  y if  x1  y1 and x2  y 2
or


 x1  y1 and x2  y 2 and x3  y3

• The lexicographical order is a total vector order. This means:


– There are no pairs of vectors for which the order is unknown.
– The maximum and minimum of a set of vectors is always part of the set 
no false colours!
• The disadvantage is that one of the vector components has to play
a dominant role.
Angular Distance
a  a
• To enable us to work on the circle, we
begin by defining an angular distance. a a
• Given a circle C with centre o o
• We choose an arbitrary origin a0 on the circle.
The points ai are then described by their curvilinear
coordinate between 0 and 2p starting at a0.
• Given two points a and a, the size of the acute angle aoa
is
 a  a if a  a  
Da, a  a  a  
2  a  a if a  a  
Lexicographical Order with
Brightness at the Top Level (1)
• We define
 Li  L j
 or

ci  c j if  Li  L j and Si  S j
 or

 Li  L j and Si  S j and Hi  H0  H j  H0
• and
 Li  L j
 or

ci  c j if  Li  L j and Si  S j
 or

 Li  L j and Si  S j and H i  H 0  H j  H 0
Lexicographical Order with
Brightness at the Top Level (2)
• H0 is an arbitrary parameter. It does not have a major effect
on the results, as, being at the third level, it is almost never
taken into account.
• The erosion is defined in the standard way as follows:
e f (x) = {f (y) : f (y) = inf [f (z)] , z  Bx }

and the dilation:


d f (x) = {f (y) : f (y) = sup [f (z)] , z  Bx }
Example
Brightness at the

Opening
Erosion
top level

Closing
Dilation

Original Image
(293  418)
SE: Square of
size 5  5
Lexicographical Order with
Saturation at the Top Level
• We define
S i  S j
 or

ci  c j if S i  S j and Li  L j
 or

Si  S j and Li  L j and Hi  H0  H j  H0
• and

Si  S j
 or

ci  c j if S i  S j and Li  L j
 or

Si  S j and Li  L j and H i  H 0  H j  H 0
Example
Saturation at the

Opening
Erosion
top level

Closing
Dilation

Original image
(293  418)

SE: Square of
size 5  5
Colour Top-Hat
• We can define a top-hat operator for colour
images similar to the one used for greyscale
images.
• We simply calculate the Euclidean distance DE
between each corresponding pixel of the
original image I and the result
E I , I  of one of the
colour opening g or closing  operators:
– Opening top-hat: E I , I 

– Closing top-hat:
Original Image Saturation
Example

We wish to extract the greyish These lines are visible in the


lines in between the mosaic tiles saturation image

A colour morphological closing Top-hat operator. The pixel-by-


using a lexicographical order with pixel Euclidean distance between
saturation at the first level the two colour images to the left.
Summary
• A 3D-polar coordinate representation of the RGB colour space
can be very useful in image processing and analysis.
• One should be careful with how the saturation is defined.
• Applications demonstrated are:
– Colour statistics.
– Colour morphology.
• Further applications include:
– Colour histograms.
– 2-dimensional brightness-saturation histograms (have been used for
segmentation).
– …
THANK YOU!

Digital Image Processing

You might also like