Colour in Computer Graphics Mel Slater. Outline: This time Introduction Spectral distributions Simple Model for the Visual System Simple Model for an.

Slides:



Advertisements
Similar presentations
4.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 4 – Colour Models.
Advertisements

What is Color? Color is related to the wavelength of light. If a color corresponds to one particular wavelength, this is called spectral color. =600 nm.
1 Color Kyongil Yoon VISA Color Chapter 6, “Computer Vision: A Modern Approach” The experience of colour Caused by the vision system responding.
Color & Light, Digitalization, Storage. Vision Rods work at low light levels and do not see color –That is, their response depends only on how many photons,
Introduction to 3D Graphics Lecture 1: Illusions and the Fine Art of Approximation Anthony Steed University College London.
Light, Color & Perception CMSC 435/634. Light Electromagnetic wave – E & M perpendicular to each other & direction Photon wavelength, frequency f = c/
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Color Week 5, Fri Feb.
School of Computing Science Simon Fraser University
CS 4731: Computer Graphics Lecture 24: Color Science
SWE 423: Multimedia Systems Chapter 4: Graphics and Images (2)
© 2002 by Yu Hen Hu 1 ECE533 Digital Image Processing Color Imaging.
Color.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Color 2 Week 10, Fri 7 Nov 2003.
1 Computer Science 631 Lecture 6: Color Ramin Zabih Computer Science Department CORNELL UNIVERSITY.
Color Representation Lecture 3 CIEXYZ Color Space CIE Chromaticity Space HSL,HSV,LUV,CIELab X Z Y.
COLOR and the human response to light
Display Issues Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
CSC 461: Lecture 2 1 CSC461 Lecture 2: Image Formation Objectives Fundamental imaging notions Fundamental imaging notions Physical basis for image formation.
1 CSCE441: Computer Graphics: Color Models Jinxiang Chai.
CS559-Computer Graphics Copyright Stephen Chenney Color Recap The physical description of color is as a spectrum: the intensity of light at each wavelength.
Why Care About Color? Accurate color reproduction is commercially valuable - e.g. Kodak yellow, painting a house Color reproduction problems increased.
9/14/04© University of Wisconsin, CS559 Spring 2004 Last Time Intensity perception – the importance of ratios Dynamic Range – what it means and some of.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 6 This presentation © 2004, MacAvon Media Productions Colour.
SCI 200 Physical Science Lecture 9 Color Mixing Rob Daniell July 28, 2011.
Digital Image Processing Colour Image Processing.
CS 376 Introduction to Computer Graphics 01 / 26 / 2007 Instructor: Michael Eckmann.
Computer Graphics I, Fall 2008 Image Formation.
1 Image Formation. 2 Objectives Fundamental imaging notions Physical basis for image formation ­Light ­Color ­Perception Synthetic camera model Other.
Any questions about the current assignment? (I’ll do my best to help!)
Color Theory What is color? How do we describe and match colors? Color spaces.
1 Color vision and representation S M L.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Light and Color Graphics Systems / Computer.
Chapter 3: Colorimetry How to measure or specify color? Color dictionary?
Topic 5 - Imaging Mapping - II DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Color. Contents Light and color The visible light spectrum Primary and secondary colors Color spaces –RGB, CMY, YIQ, HLS, CIE –CIE XYZ, CIE xyY and CIE.
Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented.
Many of the figures from this book may be reproduced free of charge in scholarly articles, proceedings, and presentations, provided only that the following.
Color Theory ‣ What is color? ‣ How do we perceive it? ‣ How do we describe and match colors? ‣ Color spaces.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Digital Image Processing Part 1 Introduction. The eye.
CSC361/ Digital Media Burg/Wong
CS6825: Color 2 Light and Color Light is electromagnetic radiation Light is electromagnetic radiation Visible light: nm. range Visible light:
CS 376 Introduction to Computer Graphics 01 / 24 / 2007 Instructor: Michael Eckmann.
Graphics Lecture 4: Slide 1 Interactive Computer Graphics Lecture 4: Colour.
Three-Receptor Model Designing a system that can individually display thousands of colors is very difficult Instead, colors can be reproduced by mixing.
1 CSCE441: Computer Graphics: Color Models Jinxiang Chai.
Introduction to Computer Graphics
Color Models. Color models,cont’d Different meanings of color: painting wavelength of visible light human eye perception.
1 CSCE441: Computer Graphics: Color Models Jinxiang Chai.
College of Computer and Information Science, Northeastern UniversityJanuary 3, CS U540 Computer Graphics Prof. Harriet Fell Spring 2007 Lecture 35.
BASIC COLOUR COURSE Algemeen
CS-321 Dr. Mark L. Hornick 1 Color Perception. CS-321 Dr. Mark L. Hornick 2 Color Perception.
David Luebke 1 2/5/2016 Color CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
David Luebke2/23/2016 CS 551 / 645: Introductory Computer Graphics Color Continued Clipping in 3D.
Hebrew University Image Processing Exercise Class 12: Color Many slides from Freeman and Durand Color Exercise Class 12.
09/10/02(c) University of Wisconsin, CS559 Fall 2002 Last Time Digital Images –Spatial and Color resolution Color –The physics of color.
Color Measurement and Reproduction Eric Dubois. How Can We Specify a Color Numerically? What measurements do we need to take of a colored light to uniquely.
Computer Graphics: Achromatic and Coloured Light.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Color Models Light property Color models.
ECE 638: Principles of Digital Color Imaging Systems
Half Toning Dithering RGB CMYK Models
(c) University of Wisconsin, CS559 Spring 2002
Light, Color & Perception
Color & Light CMSC 435/634.
Color Representation Although we can differentiate a hundred different grey-levels, we can easily differentiate thousands of colors.
Computer Vision Lecture 4: Color
Slides taken from Scott Schaefer
Color Model By : Mustafa Salam.
Color Theory What is color? How do we perceive it?
Presentation transcript:

Colour in Computer Graphics Mel Slater

Outline: This time Introduction Spectral distributions Simple Model for the Visual System Simple Model for an Emitter System Generating Perceivable Colours CIE-RGB Colour Matching Functions

Outline: Next Time CIE-RGB Chromaticity Space CIE-XYZ Chromaticity Space Converting between XYZ and RGB Colour Gamuts and Undisplayable Colours Summary for Rendering: What to do in practice

Spectral Distributions Radiometry (radiant power, radiance etc) – Measurement of light energy Photometry (luminance etc) – Measurement including response of visual system  (  = Kn(  / spectral radiant power distribution Generally C(  defines spectral colour distribution  [ a, b ] =  In computer graphics C is usually radiance.

Monochromatic Light (pure colour)  ( ) = 0,  0   ( ) d = 1   (t) f(x-t)d t = f(x) C( ) =  ( - 0 ) is spectral distribution for pure colour with wavelength 0

Colour as Spectral Distributions Wavelength nm Spectral radiant power Spectral Energy Distribution

Visible Spectrum

Schematic Representation of Colour Spectra

Colour Space Space of all visible colours equivalent to set of all functions C :  R – C( )  0 all – C( ) > 0 some. (Cardinality of this space is 2 c )

Perception and ‘The Sixth Sense’ movie We do not ‘see’ C( ) directly but as filtered through visual system. Two different people/animals will ‘see’ C( ) differently. Different C( )s can appear exactly the same to one individual (metamer). (Ignoring all ‘higher level’ processing, which basically indicates “we see what we expect to see”).

Infinite to Finite Colour space is infinite dimensional Visual system filters the energy distribution through a finite set of channels Constructs a finite signal space (retinal level) Through optic nerve to higher order processing (visual cortex ++++).

A Simple Model for the Visual System Human Eye Schematic

Photosensitive Receptors Rods – 130,000,000 night vision + peripheral (scotopic) Cones – 5-7,000,000, daylight vision + acuity (one point only) Cones – L-cones – M-cones – S-cones

LMS Response Curves l =  C( )L( )d m =  C( )M( )d s =  C( )S( )d C  (l,m,s) (trichromatic theory) LMS(C) = (l,m,s) LMS(C a ) = LMS(C b ) then C a, C b are metamers.

2-degree cone normalised response curves

Simple Model for an Emitter System Generates chromatic light by mixing streams of energy of light of different spectral distributions Finite number (>=3) and independent

Primaries (Basis) for an Emitter C E ( )=  1 E 1 ( )+  2 E 2 ( ) +  3 E 3 ( ) E i are the primaries (form a basis)  i are called the intensities. CIE-RGB Primaries are: – E R ( ) =  ( - R ), R = 700nm – E G ( ) =  ( - G ), G = 546.1nm – E B ( ) =  ( - B ), B = 435.8nm

Computing the Intensities For a given C( ) problem is to find the intensities  i such that C E ( ) is metameric to C( ). First Method to be shown isn’t used, but illustrative of the problem.

Colour Matching Functions Previous method relied on knowing L, M, and S response curves accurately. Better method based on colour matching functions. Define how to get the colour matching functions  i ( ) relative to a given system of primaries.

2-degree RGB Colour Matching Functions

Colour Matching Experiment Target colour Mixing of 3 primaries Adjust intensities to match the colour overlap

Summary Week 1 Compute the radiance distribution C( ) Find out the colour matching functions for the display  i ( ) Perform the 3 integrals   i ( )C( )d to get the intensities for the metamer for that colour on the display. …. Except that’s not how it is done … ….to be continued….

Outline: Week 2 CIE-RGB Chromaticity Space CIE-XYZ Chromaticity Space Converting between XYZ and RGB Colour Gamuts and Undisplayable Colours Summary for Rendering: What to do in practice

CIE-RGB Chromaticity Space Consider CIE-RGB primaries: – For each C( ) there is a point (  R,  G,  B ): C( )   R E R ( ) +  G E G ( ) +  B E B ( ) – Considering all such possible points (  R,  G,  B ) – Results in 3D RGB colour space – Hard to visualise in 3D – so we’ll find a 2D representation instead.

CIE-RGB Chromaticity Space Consider 1 st only monochromatic colours: – C( ) =  ( - 0 ) Let the CIE-RGB matching functions be – r( ), g( ), b( ) Then, eg, –  R ( 0 ) =   ( - 0 ) r( )d = r( 0 ) Generally – (  R ( 0 ),  G ( 0 ),  B ( 0 )) = (r( 0 ), g( 0 ), b( 0 ))

CIE-RGB Chromaticity Space As 0 varies over all wavelengths – (r( 0 ), g( 0 ), b( 0 )) sweeps out a 3D curve. This curve gives the metamer intensities for all monochromatic colours. To visualise this curve, conventionally project onto the plane –  R +  G +  B = 1

CIE-RGB Chromaticity Space It is easy to show that projection of (  R,  G,  B ) onto  R +  G +  B = 1 is: – (  R /D,  G /D,  B /D), D =  R +  G +  B Show that interior and boundary of the curve correspond to visible colours. CIE-RGB chromaticity space.

CIE-RGB Chromaticity Diagram

CIE-RGB Chromaticity Define: – V( ) =  1 L( ) +  2 M( ) +  3 S( ) Specific constants  i results in – Spectral luminous efficiency curve Overall response of visual system to C( ) – L(C) = K  C( ) V( )d For K=680 lumens/watt, and C as radiance, L is called the luminance (candelas per square metre)

Spectral Luminous Efficiency Function

CIE-RGB Chromaticity Since – C( )   R E R ( ) +  G E G ( ) +  B E B ( ) Then L(C) =  R  E R ( ) V( )d +  G  E G ( ) V( )d +  B  E B ( ) V( )d Or – L(C ) =  R l R +  G l G +  B l B

Luminance and Chrominance L(C ) =  R l R +  G l G +  B l B – and l R l G l B are constants Consider set of all (  R,  G,  B ) satisfying this equation… – a plane of constant luminance in RGB space Only one point on plane corresponds to colour C – so what is varying? Chrominance – The part of a colour (hue) abstracting away the luminance Colour = chrominance + luminance (independent)

Luminance and Chrominance Consider plane of constant luminance –  R l R +  G l G +  B l B = L Let  * = (  * R,  * G,  * B ) be a point on this plane. – (t  * R, t  * G, t  * B ), t>0 is a line from 0 through  * Luminance is increasing (tL) but projection on  R +  G +  B = 1 is the same. Projection on  R +  G +  B = 1 is a way of providing 2D coord system for chrominance.

(Change of Basis) E and F are two different primaries – C( )   1 E 1 ( ) +  2 E 2 ( ) +  3 E 3 ( ) – C( )   1 F 1 ( ) +  2 F 2 ( ) +  3 F 3 ( ) Let A be the matrix that expresses F in terms of E – F ( ) = AE( ) Then –  =  A –  Ej ( ) =  i  Fi ( )  ij (CMFs)

CIE-XYZ Chromaticity Space CIE-RGB representation not ideal – Colours outside 1 st quadrant not achievable – Negative CMF function ranges CIE derived a different XYZ basis with better mathamatical behaviour – X( ), Y( ), Z( ) basis functions (imaginary primaries) – X, Z have zero luminance – CMF for Y is specral luminous efficiency function V Known matrix A for transformation to CIE-RGB

CIE-XYZ Chromaticity Space C( )  X. X( ) + Y. Y( ) + Z. Z( ) – X =  C( )x( )d – Y =  C( )y( )d [luminance] – Z =  C( )z( )d – x,y,z are the CMFs

2-deg XYZ Colour Matching Functions

CIE-XYZ Chromaticity Diagram

Converting Between XYZ and RGB System has primaries R( ), G( ), B( ) How to convert between a colour expressed in RGB and vice versa? Derivation…

Colour Gamuts and Undisplayable Colours Display has RGB primaries, with corresponding XYZ colours C R, C G, C B Chromaticities c R, c G, c B will form triangle on CIE-XYZ diagram All points in the triangle are displayable colours – forming the colour gamut

Some Colour Gamuts

Undisplayable Colours Suppose XYZ colour computed, but not displayable? Terminology – Dominant wavelength – Saturation

XYZ with White Point P W Q For colour at P Q dominant wavelength WP/WQ saturation

Colour might not be displayable Falls outside of the triangle (its chromaticity not displayable on this device) – Might desaturate it, move it along line QW until inside gamut (so dominant wavelength invariant) Colour with luminance outside of displayable range. – Clip vector through the origin to the RGB cube (chrominance invariant)

RGB Colour Cube red green blue (1,0,0) (0,1,0) (0,0,1) black w h i t e magenta cyan yellow (1,1,1) (0,0,0) (1,0,1) (0,1,1) (1,1,0)

RGB Cube Mapped to XYZ Space

Summary for Rendering Incorrect to use RGB throughout!!! – Different displays will produce different results – RGB is not the appropriate measure of light energy (neither radiometric nor photometric). – But depends on application Most applications of CG do not require ‘correct’ colours… …but colours that are appropriate for the application.

For Rendering Algorithm should compute C( ) for surfaces – means computing at a sufficient number of wavelengths to estimate C (not ‘RGB’). Transform into XYZ space – X =  C( )x( )d – Y =  C( )y( )d – Z =  C( )z( )d Map to RGB space, with clipping and gamma correction.