SlideShare a Scribd company logo
1 of 21
Colour Spaces
By
K.E.Raghav
Introduction
• Colour is the brains reaction to a specific visual stimulus. Although we can
precisely describe colour by measuring its spectral power distribution (the
intensity of the visible electro-magnetic radiation at many discrete wavelengths)
this leads to a large degree of redundancy.
• The reason for this redundancy is that the eye’s retina samples colour using only
three broad bands, roughly corresponding to red, green and blue light. The signals
from these colour sensitive cells (cones), together with those from the rods
(sensitive to intensity only), are combined in the brain to give several different
“sensations” of the colour.
Types of sensations of colour
• Brightness: the human sensation by which an area exhibits more or less light.
• Hue: the human sensation according to which an area appears to be similar to one,
or to proportions of two, of the perceived colours red, yellow, green and blue.
• Colourfulness: the human sensation according to which an area appears to exhibit
more or less of its hue.
• Lightness: the sensation of an area’s brightness relative to a reference white in the
scene.
• Chroma: the colourfulness of an area relative to the brightness of a reference white.
• Saturation: the colourfulness of an area relative to its brightness.
What is a colour space?
A colour space is a method by which we can specify,
create and visualise colour. As humans, we may
define a colour by its attributes of brightness, hue
and colourfulness. A computer may describe a
colour using the amounts of red, green and blue
phosphor emission required to match a colour. A
printing press may produce a specific colour in
terms of the reflectance and absorbance of cyan,
magenta, yellow and black inks on the printing
paper.
A colour is thus usually specified using three co-
ordinates, or parameters. These parameters
describe the position of the colour within the
colour space being used. They do not tell us what
the colour is, that depends on what colour space is
being used.
Tri-Chromatic theory of light
The tri-chromatic theory describes the way three separate
lights, red, green and blue, can match any visible colour –
based on the eye’s use of three colour sensitive sensors. It
is also the way that most computer colour spaces operate,
using three parameters to define a colour.
Tristimulus values
The human eye has receptors (called cone cells) for short (S), middle (M), and long (L)
wavelengths. Thus in principle, three parameters describe a color sensation. The
tristimulus values of a color are the amounts of three primary colors in a three-
component additive color model needed to match that test color. The tristimulus
values are most often given in the CIE 1931 color space, in which they are denoted X,
Y, and Z.
Any specific method for associating tristimulus values with each color is called a color
space. CIE XYZ, one of many such spaces, is special because it is based on direct
measurements of human visual perception, and serves as the basis from which many
other color spaces are defined.
Contd.
Different colour spaces are better for different applications, for example some
equipment has limiting factors that dictate the size and type of colour space that
can be used.
Some colour spaces are perceptually linear, i.e. a 10 unit change in stimulus will
produce the same change in perception wherever it is applied. Many colour
spaces, particularly in computer graphics, are not linear in this way.
Some colour spaces are intuitive to use, i.e. it is easy for the user to navigate within
them and creating desired colours is relatively easy. Other spaces are confusing for
the user with parameters with abstract relationships to the perceived colour.
Finally, some colour spaces are tied to a specific piece of equipment (i.e. are device
dependent) while others are equally valid on whatever device they are used
(device independent).
The Gamma Function
Many image processing operations, and also colour space transforms that involve
device independent colour spaces, must be performed in a linear luminance
domain. By this we really mean that the relationship between image pixel values
specified in software and the luminance of a specific area on the CRT display must
be known. In most cases the CRT will have a nonlinear response. The luminance of
a CRT is generally modeled using a power function with an exponent, gamma,
somewhere between 2.2 (NTSC and SMPTE specifications) and 2.8 (as given by
Hunt and Sproson). The common relationship is given below:
Where luminance and voltage are normalized between 0 and 1.

voltage
luminance 
Contd.
For a colour computer system we can replace the voltages by the image pixel values
(assuming that your graphics card converts digital values to analogue voltages in
accordance with the power relationship)
where R’, G’, and B’ are the normalized input Red, Green and Blue pixel values and R,
G, and B are the normalized gamma corrected signals sent to the graphics card.
b
aB
B
b
aG
G
b
aR
R









'
'
'
Types of colour spaces
RGB (Red Green Blue)
This is an additive colour system based on tri-
chromatic theory. Often found in systems that
use a CRT to display images. RGB is easy to
implement but non–linear with visual
perception. It is device dependent and
specification of colours is semi–intuitive.
CMY(K) (Cyan Magenta Yellow (Black))
This is a subtractive based colour space and is
mainly used in printing and hard copy output.
The fourth, black, component is included to
improve both the density range and the
available colour gamut (by removing the need
for the CMY inks to produce a good neutral
black it is possible to used inks that have
better colour reproductive capabilities).
Contd.
HSL (Hue Saturation and Lightness)
This represents a wealth of similar colour spaces,
alternative names include HSI (intensity), HSV
(value), HCI (chroma / colourfulness), HVC, TSD
(hue saturation and darkness) etc. Most of
these colour spaces are linear transforms from
RGB and are therefore device dependent and
non–linear.
CIE
There are two CIE based colour spaces, CIELuv and
CIELab. They are nearly linear with visual
perception, or at least as close as any colour
space is expected to sensibly get. Since they are
based on the CIE system of colour
measurement, which is itself based on human
vision, CIELab and CIELuv are device
independent .
Contd.
CIE XYZ (1931)
The CIE XYZ (1931) system is at the root of all
colorimetry. It is defined such that all visible
colours can be defined using only positive values,
and, the Y value is luminance. Consequently, the
colours of the XYZ primaries themselves are not
visible.. A colour defined in this system is referred
to as Yxy. A third co-ordinate, z, can also be
defined but is redundant since x+y+z=1 for all
colours.
Z
Y
X
Y
y
;
Z
Y
X
X






x
Grassman’s Laws of additive colour
mixture.
Any colour (source C) can be matched by a linear combination of three other colours
(primaries e.g. RGB), provided that none of those three can be matched by a
combination of the other two. This is fundamental to colorimetry and is
Grassman’s first law of colour mixture. So a colour C can be matched by Rc units of
red, Gc units of green and Bc units of blue. The units are can be measured in any
form that quantifies light power.
C = Rc(R) + Gc(G) + Bc(B)
A mixture of any two colours (sources C1 and C2) can be matched by linearly adding
together the mixtures of any three other colours that individually match the two
source colours. This is Grassman’s second law of colour mixture. It can be
extended to any number of source colours.
C3(C3) = C1(C1) + C2(C2) = [R1 + R2](R) + [G1 + G2](G) + [B1 + B2](B)
Colour matching persists at all luminances. This is Grassman’s third law. It fails at very
low light levels where rod cell vision (scoptopic) takes over from cone cell vision
(photopic).
kC3(C3) = kC1(C1) + kC2(C2).
Colour gamut
A colour gamut is the area enclosed by a colour
space in three dimensions. It is usual to
represent the gamut of a colour reproduction
system graphically as the range of colours available
in some device independent colour space. Often
the gamut will be represented in only two
dimensions, for example on a CIE u’v’ chromaticity
diagram
The RGB Colour Space
This is the colour space produced on a CRT (or
similar) display when pixel values are applied
to a graphics card. RGB space may be visualised
as a cube with the three axis corresponding
to red, green and blue. The bottom corner, when
red = green = blue = 0 is black, while the
opposite top corner, where red = green = blue =
255 (for an 8 bit per channel display system),
is white. RGB is frequently used in most
computer applications since no transform is
required to display information on the screen.
For this reason it is commonly the base colour
space for most applications.
Transformation from RGB to CIEXYZ
T: (RGB) CIE(XYZ)
This transformation can be achieved by a 2 step process.
Firstly you need to calculated the relationship between input image pixel values and
displayed intensity. This relationship is the transfer function, often simplified to
gamma. The transfer functions will usually differ for each channel so are best
measured independently.
The gamma function does the job for us.
The second stage is to transform between the displayed red, green and blue to the CIE
tristimulus values. This is most easily performed using a matrix transform of the
following form:

voltage
luminance 
B
b
G
R
Z
Z
Z
Y
Y
Y
X
X
X
Z
Y
X
g
r
b
g
r
b
g
r


Contd.
Where X, Y,Z are the desired CIE tri-stimulus values, R, G,B are the displayed RGB values
obtained from the transfer functions and the 3x3 matrix is the measured CIE tri-
stimulus values for your CRT’s three channels (i.e. Xr, Yr, Zr are the measured CIE tri-
stimulus values for the red channel at maximum emission). If the transfer functions
used are relative (i.e. when using a gamma based method on normalized data) this
transform will give you relative values. This means that, for example, derived CIE xy
chromaticity values will be correct by the absolute luminance given by the CIE Y
tristimulus value will not. If you transfer functions are measured absolutely, to give
luminance on the CRT, then the tri-stimulus values should be correct (but see below
for other problems).
To convert from XYZ to RGB use the inverse form of the matrix given in equation 27:
Z
Y
X
Z
Z
Z
Y
Y
Y
X
X
X
G
R
)
1
(
g
r
b
g
r
b
g
r



b
B
Transformation from RGB to HSV
T: (RGB) HSV
Contd.
This RGB-HSV conversion is given by Travis. To convert from RGB to HSV (assuming
normalized RGB values) first find the maximum and minimum values from the RGB
triplet. Saturation, S, is then:
the value V is then
The Hue, H, is then calculated as follows. First calculate R’G’B’:
if saturation, S, is 0 (zero) then hue is undefined (i.e. the colour has no hue therefore it
is monochrome) otherwise: H has to satisfy the equations for each variable in
colour space RGB to be the max and min.
For e.g.. If R = max, and G = min. then H = 5 – B’
max
min)
(max

S
max

V
min
max
max
;
min
max
max
;
min
max
max '
'
'









B
B
G
G
R
R
Examples of transformation
RGB colour
space
sepia
Black and white negative
A
B
D
C
References
• University of Derby, Colour Research Group’s colour links:
http://ziggy.derby.ac.uk/web/colour.html
• Specifying color differences in a linear color space (LEF) N. Rudaz, R. D. Hersch
V. Ostromoukhov Ecole Polytechnique Fédérale, Lausanne, Switzerland
• Images - www.couleur.org/index.php?page=transformations
• 50 years of the 1931 CIE Standard Observer, David Wright,. Die Farbe, 29:4/6
(1981)
• Colour science—Concepts and methods, quantitive data and formalae.,
Gunter,Wyszecki and Stiles, WS Wiley and Sons INC NY 1982
• Hybrid color spaces applied to image database, J. D. Rugna, P. Colantoni,
and N.Boukala,, vol. 5304, pp. 254{264, Electronic Imaging, SPIE, 2004.
Thank you
Any questions?

More Related Content

Similar to Color_Spaces.pptx

10 color image processing
10 color image processing10 color image processing
10 color image processingbabak danyal
 
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...IOSR Journals
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processingkiruthiammu
 
Color-in-Digital-Image-Processing.pptx
Color-in-Digital-Image-Processing.pptxColor-in-Digital-Image-Processing.pptx
Color-in-Digital-Image-Processing.pptxEveCarolino
 
Color Models Computer Graphics
Color Models Computer GraphicsColor Models Computer Graphics
Color Models Computer Graphicsdhruv141293
 
Color image processing ppt
Color image processing pptColor image processing ppt
Color image processing pptMvidhya9
 
Lecnoninecolorspacemodelindigitalimageprocess
LecnoninecolorspacemodelindigitalimageprocessLecnoninecolorspacemodelindigitalimageprocess
LecnoninecolorspacemodelindigitalimageprocessIrsaAamir
 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subratSubrat Prasad
 
Colour models
Colour modelsColour models
Colour modelsBCET
 
Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and videoMazin Alwaaly
 
A primer for colour computer vision
A primer for colour computer visionA primer for colour computer vision
A primer for colour computer visionpotaters
 

Similar to Color_Spaces.pptx (20)

10 color image processing
10 color image processing10 color image processing
10 color image processing
 
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...Colorization of Gray Scale Images in YCbCr Color Space Using  Texture Extract...
Colorization of Gray Scale Images in YCbCr Color Space Using Texture Extract...
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
Lect 06
Lect 06 Lect 06
Lect 06
 
Displays and color system in computer graphics(Computer graphics tutorials)
Displays and color system in computer graphics(Computer graphics tutorials)Displays and color system in computer graphics(Computer graphics tutorials)
Displays and color system in computer graphics(Computer graphics tutorials)
 
Color models
Color modelsColor models
Color models
 
Color-in-Digital-Image-Processing.pptx
Color-in-Digital-Image-Processing.pptxColor-in-Digital-Image-Processing.pptx
Color-in-Digital-Image-Processing.pptx
 
Color
ColorColor
Color
 
Color Models Computer Graphics
Color Models Computer GraphicsColor Models Computer Graphics
Color Models Computer Graphics
 
Color image processing ppt
Color image processing pptColor image processing ppt
Color image processing ppt
 
[IJET-V1I6P10] Authors: Mr.B.V.Sathish Kumar, M.Tech Scholar G.Sumalatha
[IJET-V1I6P10] Authors: Mr.B.V.Sathish Kumar, M.Tech Scholar G.Sumalatha [IJET-V1I6P10] Authors: Mr.B.V.Sathish Kumar, M.Tech Scholar G.Sumalatha
[IJET-V1I6P10] Authors: Mr.B.V.Sathish Kumar, M.Tech Scholar G.Sumalatha
 
Id3115321536
Id3115321536Id3115321536
Id3115321536
 
Lecnoninecolorspacemodelindigitalimageprocess
LecnoninecolorspacemodelindigitalimageprocessLecnoninecolorspacemodelindigitalimageprocess
Lecnoninecolorspacemodelindigitalimageprocess
 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subrat
 
Colormodels
ColormodelsColormodels
Colormodels
 
Colormodels
ColormodelsColormodels
Colormodels
 
Colour models
Colour modelsColour models
Colour models
 
Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and video
 
Color models
Color modelsColor models
Color models
 
A primer for colour computer vision
A primer for colour computer visionA primer for colour computer vision
A primer for colour computer vision
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningMarc Dusseiller Dusjagr
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111GangaMaiya1
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 

Recently uploaded (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 

Color_Spaces.pptx

  • 2. Introduction • Colour is the brains reaction to a specific visual stimulus. Although we can precisely describe colour by measuring its spectral power distribution (the intensity of the visible electro-magnetic radiation at many discrete wavelengths) this leads to a large degree of redundancy. • The reason for this redundancy is that the eye’s retina samples colour using only three broad bands, roughly corresponding to red, green and blue light. The signals from these colour sensitive cells (cones), together with those from the rods (sensitive to intensity only), are combined in the brain to give several different “sensations” of the colour.
  • 3. Types of sensations of colour • Brightness: the human sensation by which an area exhibits more or less light. • Hue: the human sensation according to which an area appears to be similar to one, or to proportions of two, of the perceived colours red, yellow, green and blue. • Colourfulness: the human sensation according to which an area appears to exhibit more or less of its hue. • Lightness: the sensation of an area’s brightness relative to a reference white in the scene. • Chroma: the colourfulness of an area relative to the brightness of a reference white. • Saturation: the colourfulness of an area relative to its brightness.
  • 4. What is a colour space? A colour space is a method by which we can specify, create and visualise colour. As humans, we may define a colour by its attributes of brightness, hue and colourfulness. A computer may describe a colour using the amounts of red, green and blue phosphor emission required to match a colour. A printing press may produce a specific colour in terms of the reflectance and absorbance of cyan, magenta, yellow and black inks on the printing paper. A colour is thus usually specified using three co- ordinates, or parameters. These parameters describe the position of the colour within the colour space being used. They do not tell us what the colour is, that depends on what colour space is being used.
  • 5. Tri-Chromatic theory of light The tri-chromatic theory describes the way three separate lights, red, green and blue, can match any visible colour – based on the eye’s use of three colour sensitive sensors. It is also the way that most computer colour spaces operate, using three parameters to define a colour. Tristimulus values The human eye has receptors (called cone cells) for short (S), middle (M), and long (L) wavelengths. Thus in principle, three parameters describe a color sensation. The tristimulus values of a color are the amounts of three primary colors in a three- component additive color model needed to match that test color. The tristimulus values are most often given in the CIE 1931 color space, in which they are denoted X, Y, and Z. Any specific method for associating tristimulus values with each color is called a color space. CIE XYZ, one of many such spaces, is special because it is based on direct measurements of human visual perception, and serves as the basis from which many other color spaces are defined.
  • 6. Contd. Different colour spaces are better for different applications, for example some equipment has limiting factors that dictate the size and type of colour space that can be used. Some colour spaces are perceptually linear, i.e. a 10 unit change in stimulus will produce the same change in perception wherever it is applied. Many colour spaces, particularly in computer graphics, are not linear in this way. Some colour spaces are intuitive to use, i.e. it is easy for the user to navigate within them and creating desired colours is relatively easy. Other spaces are confusing for the user with parameters with abstract relationships to the perceived colour. Finally, some colour spaces are tied to a specific piece of equipment (i.e. are device dependent) while others are equally valid on whatever device they are used (device independent).
  • 7. The Gamma Function Many image processing operations, and also colour space transforms that involve device independent colour spaces, must be performed in a linear luminance domain. By this we really mean that the relationship between image pixel values specified in software and the luminance of a specific area on the CRT display must be known. In most cases the CRT will have a nonlinear response. The luminance of a CRT is generally modeled using a power function with an exponent, gamma, somewhere between 2.2 (NTSC and SMPTE specifications) and 2.8 (as given by Hunt and Sproson). The common relationship is given below: Where luminance and voltage are normalized between 0 and 1.  voltage luminance 
  • 8. Contd. For a colour computer system we can replace the voltages by the image pixel values (assuming that your graphics card converts digital values to analogue voltages in accordance with the power relationship) where R’, G’, and B’ are the normalized input Red, Green and Blue pixel values and R, G, and B are the normalized gamma corrected signals sent to the graphics card. b aB B b aG G b aR R          ' ' '
  • 9. Types of colour spaces RGB (Red Green Blue) This is an additive colour system based on tri- chromatic theory. Often found in systems that use a CRT to display images. RGB is easy to implement but non–linear with visual perception. It is device dependent and specification of colours is semi–intuitive. CMY(K) (Cyan Magenta Yellow (Black)) This is a subtractive based colour space and is mainly used in printing and hard copy output. The fourth, black, component is included to improve both the density range and the available colour gamut (by removing the need for the CMY inks to produce a good neutral black it is possible to used inks that have better colour reproductive capabilities).
  • 10. Contd. HSL (Hue Saturation and Lightness) This represents a wealth of similar colour spaces, alternative names include HSI (intensity), HSV (value), HCI (chroma / colourfulness), HVC, TSD (hue saturation and darkness) etc. Most of these colour spaces are linear transforms from RGB and are therefore device dependent and non–linear. CIE There are two CIE based colour spaces, CIELuv and CIELab. They are nearly linear with visual perception, or at least as close as any colour space is expected to sensibly get. Since they are based on the CIE system of colour measurement, which is itself based on human vision, CIELab and CIELuv are device independent .
  • 11. Contd. CIE XYZ (1931) The CIE XYZ (1931) system is at the root of all colorimetry. It is defined such that all visible colours can be defined using only positive values, and, the Y value is luminance. Consequently, the colours of the XYZ primaries themselves are not visible.. A colour defined in this system is referred to as Yxy. A third co-ordinate, z, can also be defined but is redundant since x+y+z=1 for all colours. Z Y X Y y ; Z Y X X       x
  • 12. Grassman’s Laws of additive colour mixture. Any colour (source C) can be matched by a linear combination of three other colours (primaries e.g. RGB), provided that none of those three can be matched by a combination of the other two. This is fundamental to colorimetry and is Grassman’s first law of colour mixture. So a colour C can be matched by Rc units of red, Gc units of green and Bc units of blue. The units are can be measured in any form that quantifies light power. C = Rc(R) + Gc(G) + Bc(B) A mixture of any two colours (sources C1 and C2) can be matched by linearly adding together the mixtures of any three other colours that individually match the two source colours. This is Grassman’s second law of colour mixture. It can be extended to any number of source colours. C3(C3) = C1(C1) + C2(C2) = [R1 + R2](R) + [G1 + G2](G) + [B1 + B2](B) Colour matching persists at all luminances. This is Grassman’s third law. It fails at very low light levels where rod cell vision (scoptopic) takes over from cone cell vision (photopic). kC3(C3) = kC1(C1) + kC2(C2).
  • 13. Colour gamut A colour gamut is the area enclosed by a colour space in three dimensions. It is usual to represent the gamut of a colour reproduction system graphically as the range of colours available in some device independent colour space. Often the gamut will be represented in only two dimensions, for example on a CIE u’v’ chromaticity diagram
  • 14. The RGB Colour Space This is the colour space produced on a CRT (or similar) display when pixel values are applied to a graphics card. RGB space may be visualised as a cube with the three axis corresponding to red, green and blue. The bottom corner, when red = green = blue = 0 is black, while the opposite top corner, where red = green = blue = 255 (for an 8 bit per channel display system), is white. RGB is frequently used in most computer applications since no transform is required to display information on the screen. For this reason it is commonly the base colour space for most applications.
  • 15. Transformation from RGB to CIEXYZ T: (RGB) CIE(XYZ) This transformation can be achieved by a 2 step process. Firstly you need to calculated the relationship between input image pixel values and displayed intensity. This relationship is the transfer function, often simplified to gamma. The transfer functions will usually differ for each channel so are best measured independently. The gamma function does the job for us. The second stage is to transform between the displayed red, green and blue to the CIE tristimulus values. This is most easily performed using a matrix transform of the following form:  voltage luminance  B b G R Z Z Z Y Y Y X X X Z Y X g r b g r b g r  
  • 16. Contd. Where X, Y,Z are the desired CIE tri-stimulus values, R, G,B are the displayed RGB values obtained from the transfer functions and the 3x3 matrix is the measured CIE tri- stimulus values for your CRT’s three channels (i.e. Xr, Yr, Zr are the measured CIE tri- stimulus values for the red channel at maximum emission). If the transfer functions used are relative (i.e. when using a gamma based method on normalized data) this transform will give you relative values. This means that, for example, derived CIE xy chromaticity values will be correct by the absolute luminance given by the CIE Y tristimulus value will not. If you transfer functions are measured absolutely, to give luminance on the CRT, then the tri-stimulus values should be correct (but see below for other problems). To convert from XYZ to RGB use the inverse form of the matrix given in equation 27: Z Y X Z Z Z Y Y Y X X X G R ) 1 ( g r b g r b g r    b B
  • 17. Transformation from RGB to HSV T: (RGB) HSV
  • 18. Contd. This RGB-HSV conversion is given by Travis. To convert from RGB to HSV (assuming normalized RGB values) first find the maximum and minimum values from the RGB triplet. Saturation, S, is then: the value V is then The Hue, H, is then calculated as follows. First calculate R’G’B’: if saturation, S, is 0 (zero) then hue is undefined (i.e. the colour has no hue therefore it is monochrome) otherwise: H has to satisfy the equations for each variable in colour space RGB to be the max and min. For e.g.. If R = max, and G = min. then H = 5 – B’ max min) (max  S max  V min max max ; min max max ; min max max ' ' '          B B G G R R
  • 19. Examples of transformation RGB colour space sepia Black and white negative A B D C
  • 20. References • University of Derby, Colour Research Group’s colour links: http://ziggy.derby.ac.uk/web/colour.html • Specifying color differences in a linear color space (LEF) N. Rudaz, R. D. Hersch V. Ostromoukhov Ecole Polytechnique Fédérale, Lausanne, Switzerland • Images - www.couleur.org/index.php?page=transformations • 50 years of the 1931 CIE Standard Observer, David Wright,. Die Farbe, 29:4/6 (1981) • Colour science—Concepts and methods, quantitive data and formalae., Gunter,Wyszecki and Stiles, WS Wiley and Sons INC NY 1982 • Hybrid color spaces applied to image database, J. D. Rugna, P. Colantoni, and N.Boukala,, vol. 5304, pp. 254{264, Electronic Imaging, SPIE, 2004.