Spectral Color and Radiometry Louis Feng April 13, 2004 April 13, 2004 Realistic Image Synthesis (Spring 2004) 1
Topics Spectral Color Light and Color Spectrum Spectral Power Distribution Spectral Color Representations and Operations CIE (XYZ) Color Model Color Model Conversion Radiometry Energy of Photon Radiant Energy Flux Irradiance Solid Angle Intensity Radiance April 13, 2004 Realistic Image Synthesis (Spring 2004) 2
Light and Color Understanding Light Light theories Wave Particle Neither are completely correct nor understood Ray Tracing is mostly based on the Particle model Basic particle of light is called Photon Photons vibrates at various frequencies and wavelength Light of different wavelength gives different color White light is a combination of photons at many different frequencies. April 13, 2004 Realistic Image Synthesis (Spring 2004) 3
Spectral Color The amount of light (number of photons) at different wavelength can be different The average number of photons at each visible wavelength over time can be measured. The intensity versus amplitude plot is called spectral power distribution (SPD), or spectrum. Light wavelength visible to human 380nm to 780nm April 13, 2004 Realistic Image Synthesis (Spring 2004) 4
Example of Spectrum Cloudy Sky Pat Hanrahan April 13, 2004 Realistic Image Synthesis (Spring 2004) 5
Color Spectrum and Human Eye Human have trichromatic color vision The eyes respond to light of different wavelength differently There are three types of cones, referred to as S, M, and L. They are roughly equivalent to blue, green, and red sensors, respectively. Their peak sensitivities are located at approximately 430nm, 560nm, and 610nm for the "average" observer. We can exploit the tristimulus theory to use 3 coefficients to represent color RGB HSV Good enough? April 13, 2004 Realistic Image Synthesis (Spring 2004) 6
Ray Tracing with Spectral Color Using 3 coefficient to display colors to human observer can work well, but not particularly good for computation Doing computation in SPD space and its 3 color representation can yield different results Different spectrums may appear as the same color to Human, such spectra are called metamers Using SPD is more accurate For ray tracing Instead of using 3 coefficient, such as RGB, we may attach a number of coefficient (or bins) with each ray, describing the light traveling along that ray The coefficients are given by points on the SPD function The points may be sampled uniformly or non-uniformly Also possible to use nonlinear functions (such as cubic) to represent the spectra (complicated operations and does not work well with complex SPD functions) April 13, 2004 Realistic Image Synthesis (Spring 2004) 7
Spectral Color Operations Spectral color operations such as addition, subtraction multiplication, and division are specified component-wise 1 2 1 2 i i 1 2 1 2 i i 1 2 1 2 i i 1 2 1 2 i i 1 2 If spectral color c and c have n number of bins, c + c = { c + c : 1 i n} c c = { c c : 1 i n} c c = { c c : 1 i n} c / c = { c / c : 1 i n} April 13, 2004 Realistic Image Synthesis (Spring 2004) 8
Color and Color Perception Human visual perception is very complex Color is very subjective to human A laser radiates at 555nm, call it red, but we can t determine whether an observer will call this color red. Eyes respond to color, intensity nonlinearly and the color perceived depends on many factors, such as color contrast and color opponency. Grey looks whiter against black background Red looks more vivid against yellow background For many applications, a standard needs to be created April 13, 2004 Realistic Image Synthesis (Spring 2004) 9
CIE XYZ Color Space The CIE XYZ color space is an international standard based on experiments on human subjects through matching colors The results are 3 color matching functions based on an average of all subjects The spectral power distribution (SPD) for a colored object is weighted by these curves to compute the X, Y, and Z values in the CIE color space April 13, 2004 Realistic Image Synthesis (Spring 2004) 10
CIE Chromaticity Diagram The CIE system characterizes colors by a luminance parameter Y, and two color components X and Z The chromaticity coordinates x, y, and z are calculated as follows x y z X = X + Y + Z Y = X + Y + Z Z = X + Y + Z x + y + z = 1 z = 1 x y chromaticity diagram For simplicity, we often project the triangle x + y + z = 1 to the 2D xy plane to create the chromaticity diagram April 13, 2004 Realistic Image Synthesis (Spring 2004) 11
Color Conversion Before output to display, convert from SPD function to CIE color Once in CIE space, color can be converted to RGB, etc. It s possible to convert from CIE to SPD function For NTSC TV standard C( λ) = Xx( λ) + Yy( λ) + Zz( λ) λ= 780 X = C()() λ x λ dxλ λ= 380 λ= 780 Y = C()() λ y λ dyλ λ= 380 λ= 780 ()() λ λ λ 1 λ= 380 CXYZ = CRGBM Z = C z dz C = C M M RGB XYZ 1.967 0.955 0.064 = 0.548 1.938 0.130 0.297 0.027 0.982 April 13, 2004 Realistic Image Synthesis (Spring 2004) 12
Radiometry Radiometry is the science of measuring light in any portion of the electromagnetic spectrum Radiometric terms describe physical quantities They are functions of wavelength, time, position, direction, and polarization. Radiometric Some measure of light as integrated over all wavelengths Spectral Radiometric g(,,, λ t r ω, γ) E = E( λ) dλ Some measure of light at a particular wavelength 0 E = E( λ) April 13, 2004 Realistic Image Synthesis (Spring 2004) 13
Radiant Energy Energy of a photon with wavelength hc eλ = λ 34 h 6.63 10 J s c = 299, 792, 458 m/ s Spectral Radiant Energy of n photons Q = n e = n Radiant Energy is the energy of a collection of photons over all possible wavelengths λ hc λ λ λ λ λ Q = 0 Q λ dλ April 13, 2004 Realistic Image Synthesis (Spring 2004) 14
Radiant Flux and Irradiance Radiant flux known as power, is the total amount of energy passing through a surface or region of space per unit time. Units are in joules/second, or watt Φ = dq dt Radiant flux area density is defined as the differential flux per differential area. Separated into the radiant exitance M (also known as the radiosity), is the flux leaving a surface E (irradiance), is the flux arriving at a surface dφ 2 M = B = [ W / m ] da dφ 2 E = [ W / m ] da April 13, 2004 Realistic Image Synthesis (Spring 2004) 15
Solid Angle θ, the angle subtended by a curve in the plane, is the length of the corresponding arc on the unit circle. The entire sphere subtends a solid angle of The solid angle subtended by an object, is the surface area of its projection onto the unit sphere, Solid angle unit is in steradians (sr) In spherical coordinates, du 4π = rdθ dv = r sin θdφ da = dudv = r sin θdφ dω = da/ r = sinθdφ 2 2 April 13, 2004 Realistic Image Synthesis (Spring 2004) 16
Solid Angle Properties If some object is projected radially onto any surface, then the solid angle occupied by that projection is equal to the solid angle of the original object. Two different shapes with the same cross section as seen from a given point can occupy the same solid angle if they are at appropriate distance from the point April 13, 2004 Realistic Image Synthesis (Spring 2004) 17
Area Projection If the area of intersection with the surface has a differential cross-sectional area da, the cross-sectional area of the ray is dacos θ, where θ is the angle between the ray and the surface normal. The ray cross-sectional area is called the projected area of the ray-surface intersection area da. April 13, 2004 Realistic Image Synthesis (Spring 2004) 18
Intensity and Radiance Radiant Intensity, I, is the radiant flux per unit solid angle, I( ω) = d Φ dω Radiance, L, is the radiant flux per unit solid angle per unit projected area Lx (, ω) 2 4 Φ λ θdadω 0 cos θdadωdtdλ λ d d n hc = = dλ cos Radiance remains constant along rays through empty space. Radiance can be thought of as the number of photons arriving per time at a small area from a given direction, and can be used to describe the intensity of light at a given point in space in a given direction If radiance is given, then all of the other values can be computed in terms of integrals of radiance over areas and directions. April 13, 2004 Realistic Image Synthesis (Spring 2004) 19
References Books The Secrete Book Principles of Digital Image Synthesis, Andrew Glassner Realistic Image Synthesis Using Photon Mapping, Henrik Wann Jensen An Introduction to Ray Tracing, Andrew Gassner Introduction to Light, Gary Waldman Web sources http://hyperphysics.phy-astr.gsu.edu/hbase/vision/cie.html http://www.fourmilab.ch/documents/specrend/ http://www.helios32.com/measuring%20light.pdf Source code http://www.fourmilab.ch/documents/specrend/specrend.c http://www.easyrgb.com/math.php?math=m2 April 13, 2004 Realistic Image Synthesis (Spring 2004) 20