College of Computer and Information Science, Northeastern UniversityOctober 19, 20151 CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2009.

Slides:



Advertisements
Similar presentations
Introduction to Computer Graphics ColorColor. Specifying Color Color perception usually involves three quantities: Hue: Distinguishes between colors like.
Advertisements

Color Image Processing
Achromatic and Colored Light CS 288 9/17/1998 Vic.
Light, Color & Perception CMSC 435/634. Light Electromagnetic wave – E & M perpendicular to each other & direction Photon wavelength, frequency f = c/
Light Light is fundamental for color vision Unless there is a source of light, there is nothing to see! What do we see? We do not see objects, but the.
Fundamentals of Digital Imaging
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
SWE 423: Multimedia Systems Chapter 4: Graphics and Images (2)
Multi-media Graphics JOUR 205 Color Models & Color Space 5 ways of specifying colors.
© 2002 by Yu Hen Hu 1 ECE533 Digital Image Processing Color Imaging.
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.
Lecture 4: The spectrum, color theory and absorption and photogrammetry Thursday, 14 January Ch 2.3 (color film)
1 Perception. 2 “The consciousness or awareness of objects or other data through the medium of the senses.”
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.
Color Models AM Radio FM Radio + TV Microwave Infrared Ultraviolet Visible.
Colour in Computer Graphics Mel Slater. Outline: This time Introduction Spectral distributions Simple Model for the Visual System Simple Model for an.
Color & Color Management. Overview I. Color Perception Definition & characteristics of color II. Color Representation RGB, CMYK, XYZ, Lab III. Color Management.
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.
Course Website: Digital Image Processing Colour Image Processing.
Digital Image Processing Colour Image Processing.
CS 376 Introduction to Computer Graphics 01 / 26 / 2007 Instructor: Michael Eckmann.
2001 by Jim X. Chen: 1 The purpose of a color model is to allow convenient specification of colors within some color gamut.
Chapter 6: Color Image Processing Digital Image Processing.
Color Management. How does the color work?  Spectrum Spectrum is a contiguous band of wavelengths, which is emitted, reflected or transmitted by different.
Computer Science 631 Lecture 7: Colorspace, local operations
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.
Color 2011, Fall. Colorimetry : Definition (1/2) Colorimetry  Light is perceived in the visible band from 380 to 780 nm  distribution of wavelengths.
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.
©College of Computer and Information Science, Northeastern UniversityMay 27, CS 4300 Computer Graphics Prof. Harriet Fell Fall 2012 Lecture 4 – September.
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.
College of Computer and Information Science, Northeastern UniversityDecember 5, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2006.
CS654: Digital Image Analysis Lecture 29: Color Image Processing.
1 CSCE441: Computer Graphics: Color Models Jinxiang Chai.
Introduction to Computer Graphics
EEL Introduction to Computer Graphics PPT12: Color models Yamini Bura – U
Color Models. Color models,cont’d Different meanings of color: painting wavelength of visible light human eye perception.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Raster Graphics and Color Greg Humphreys University of Virginia CS 445, Fall 2003.
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.
CS-321 Dr. Mark L. Hornick 1 Color Perception. CS-321 Dr. Mark L. Hornick 2 Color Perception.
Chapter 4: Color in Image and Video
09/10/02(c) University of Wisconsin, CS559 Fall 2002 Last Time Digital Images –Spatial and Color resolution Color –The physics of color.
Computer Graphics: Achromatic and Coloured Light.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Digital Image Processing Lecture 12: Color Image Processing Naveed Ejaz.
Color Models Light property Color models.
Half Toning Dithering RGB CMYK Models
Design Concepts: Module A: The Science of Color
Color Image Processing
Color Image Processing
(c) University of Wisconsin, CS559 Spring 2002
COLOR space Mohiuddin Ahmad.
Chapter 6: Color Image Processing
Color Image Processing
Light, Color & Perception
Color & Light CMSC 435/634.
Color Image Processing
Slides taken from Scott Schaefer
CSC418 Computer Graphics Shading Color.
Color Model By : Mustafa Salam.
Color Models l Ultraviolet Infrared 10 Microwave 10
Color Theory What is color? How do we perceive it?
Presentation transcript:

College of Computer and Information Science, Northeastern UniversityOctober 19, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2009 Lecture 8 – February 25, 2009

College of Computer and Information Science, Northeastern UniversityOctober 19, Today’s Topics A little more Noise Gouraud and Phong Shading Color Perception mostly ala Shirley et al.  Light – Radiometry  Color Theory  Visual Perception

College of Computer and Information Science, Northeastern UniversityOctober 19, Flat Shading A single normal vector is used for each polygon. The object appears to have facets.

College of Computer and Information Science, Northeastern UniversityOctober 19, Gouraud Shading Average the normals for all the polygons that meet a vertex to calculate its surface normal. Compute the color intensities at vertices base on the Lambertian diffuse lighting model. Average the color intensities across the faces. This image is licensed under the Creative CommonsCreative Commons Attribution License v. 2.5.Attribution License v. 2.5

College of Computer and Information Science, Northeastern UniversityOctober 19, Phong Shading Gouraud shading lacks specular highlights except near the vertices. Phong shading eliminates these problems. Compute vertex normals as in Gouraud shading. Interpolate vertex normals to compute normals at each point to be rendered. Use these normals to compute the Lambertian diffuse lighting.

College of Computer and Information Science, Northeastern UniversityOctober 19, Color Systems RGB CMYCMYK HVS YIQ CIE = XYZ for standardized color

College of Computer and Information Science, Northeastern UniversityOctober 19, Light – Radiometry Things You Can Measure Think of light as made up of a large number of photons. A photon has position, direction, and wavelength.  is usually measured in nanometers  1 nm = m = 10 angstroms A photon has a speed c that depends only on the refractive index of the medium. The frequency f = c/.  The frequency does not change with medium.

College of Computer and Information Science, Northeastern UniversityOctober 19, Spectral Energy The energy q of a photon is given by h = 6.63* Js, is Plank’s Constant.

College of Computer and Information Science, Northeastern UniversityOctober 19, Spectral Energy We just use small  for computation, but not so small that the quantum nature of light interferes. For theory we let   0.

College of Computer and Information Science, Northeastern UniversityOctober 19, Radiance Radiance and spectral radiance describe the amount of light that passes through or is emitted from a particular area, and falls within a given solid angle in a specified direction. Radiance characterizes total emission or reflection, while spectral radiance characterizes the light at a single wavelength or frequency.

College of Computer and Information Science, Northeastern UniversityOctober 19, Radiance Definition Radiance is defined by where the approximation holds for small A and Ω, L is the radiance (W·m -2 ·sr -1 ), Φ is the radiant flux or power (W), θ is the angle between the surface normal and the specified direction, A is the area of the source (m 2 ), and Ω is the solid angle (sr). The spectral radiance (radiance per unit wavelength) is written L λ.

SISI radiometry units edit QuantitySymbolSI unitAbbr.Notes Radiant energy QjouleJenergy Radiant fluxΦwattWradiant energy per unit time, also called radiant power Radiant intensity Iwattwatt per steradian steradian W·sr −1 power per unit solid angle RadianceLwattwatt per steradian per square metre steradiansquare metre W·sr −1 ·m −2 power per unit solid angle per unit projected source area. Sometimes confusingly called "intensity". Retrieved from "

IrradianceEwattwatt per square metre square metre W·m −2 power incident on a surface. Sometimes confusingly called "intensity".intensity Radiant emittanceRadiant emittance / Radiant exitance Mwattwatt per square metre square metre W·m −2 power emitted from a surface. Sometimes confusingly called "intensity".intensity Spectral radiance L λ or L ν wattwatt per steradian per metre 3 or steradian metre wattwatt per steradian per square metre per Hertzsteradiansquare metreHertz W·sr −1 ·m −3 or W·sr −1 ·m −2 ·Hz −1 commonly measured in W·sr −1 ·m −2 ·nm −1 Spectral irradiance E λ or E ν wattwatt per metre 3 or watt per square metre per hertz metre watt square metrehertz W·m −3 or W·m −2 ·Hz −1 commonly measured in W·m −2 ·nm −1

College of Computer and Information Science, Northeastern UniversityOctober 19, SI Units Spectral radiance has SI units W  sr -1  m -3 when measured per unit wavelength, and W  sr -1  m -2 Hz -1 when measured per unit frequency interval.

College of Computer and Information Science, Northeastern UniversityOctober 19, Photometry Usefulness to the Human Observer Given a spectral radiometric quantity f r ( ) there is a related photometric quantity where y is the luminous efficiency function of the human visual system. y is 0 for < 380 nm, the ultraviolet range. y then increases as increases until = 555 nm, pure green. y then decreases, reaching 0 when = 800 nm, the boundary with the infrared region.

College of Computer and Information Science, Northeastern UniversityOctober 19, CIE Luminous Efficiency Function

College of Computer and Information Science, Northeastern UniversityOctober 19, Luminance Y is luminance when L is spectral radiance. lm is for lumens and W is for watts. Luminance describes the amount of light that passes through or is emitted from a particular area, and falls within a given solid angle.

College of Computer and Information Science, Northeastern UniversityOctober 19, Color Given a detector, e.g. eye or camera, The eye has three type of sensors, cones, for daytime color vision. This was verified in the 1800’s. Wyszecki & Stiles, 1992 show how this was done.

College of Computer and Information Science, Northeastern UniversityOctober 19, Tristimulus Color Theory Assume the eye has three independent sensors. Then the response of the sensors to a spectral radiance A ( ) is If two spectral radiances A 1 and A 2 produce the same ( S, M, L), they are indistinguishable and called metamers. Blue receptors = Short Green receptors = Medium Red Receptors = Long

College of Computer and Information Science, Northeastern UniversityOctober 19, Three Spotlights R( ) G( ) B( ) Similarly for M R, M G, M B, L R, L G, L B.

College of Computer and Information Science, Northeastern UniversityOctober 19, Response to a Mixed Light rR( ) gG( ) bB( ) Scale the lights with control knobs and combine them to form A( ) = rR( ) + gG( ) + bB( ) The S response to A( ) is rS R + gS G + bS B.

College of Computer and Information Science, Northeastern UniversityOctober 19, rR( ) Matching Lights a subject uses control knobs to set the fraction of R( ), G( ), and B( ) to match the given color. Given a light with spectral radiance C( ), gG( ) bB( )

College of Computer and Information Science, Northeastern UniversityOctober 19, Matching Lights Assume the sensor responses to C( ) are (S C, M C, L C ), then S C = rS R + gS G + bS B M C = rM R + gM G + bS B L C = rL R + gL G + bL B Users could make the color matches. So there really are three sensors. But, there is no guarantee in the equations that r, g, and b are positive or less than 1.

College of Computer and Information Science, Northeastern UniversityOctober 19, Matching Lights Not all test lights can be matched with positive r, g, b. Allow the subject to mix combinations of R( ), G( ), and B( ) with the test color. If C( ) + 0.3R( ) matches 0·R( ) + gG( ) + bB( ) then r = Two different spectra can have the same r, g, b. Any three independent lights can be used to specify a color. What are the best lights to use for standardizing color matching?

College of Computer and Information Science, Northeastern UniversityOctober 19, The Monochromatic Primaries The three monochromatic primaries are at standardized wavelengths of  700 nm (red) Hard to reproduce as a monchromatic beam, resulting in small errors. Max of human visual range.  nm (green)  nm (blue). The last two wavelengths are easily reproducible monochromatic lines of a mercury vapor discharge. –

College of Computer and Information Science, Northeastern UniversityOctober 19, CIE 1931 RGB Color Matching Functions How much of r, g, b was needed to match each.

College of Computer and Information Science, Northeastern UniversityOctober 19, CIE Tristimulus Values ala Shirley The CIE defined the XYZ system in the 1930s. The lights are imaginary. One of the lights is grey – no hue information. The other two lights have zero luminance and provide only hue information, chromaticity.

College of Computer and Information Science, Northeastern UniversityOctober 19, Chromaticity and Luminance Luminance Chromaticity

College of Computer and Information Science, Northeastern UniversityOctober 19, CIE 1931 xy Chromaticity Diagram Gamut and Location of the CIE RGB primaries represents all of the chromaticities visible to the average person

College of Computer and Information Science, Northeastern UniversityOctober 19, CIE XYZ color space 1.Color matching functions were to be everywhere greater than or equal to zero. 2.The color matching function = the photopic luminous efficiency function. 3.x=y=1/3 is the the white point. 4.Gamut of all colors is inside the triangle [1,0], [0,0], [0,1]. 5. = zero above 650 nm.

College of Computer and Information Science, Northeastern UniversityOctober 19, CIE 1931 Standard Observer Colorimetric XYZ Functions between 380 nm and 780 nm

College of Computer and Information Science, Northeastern UniversityOctober 19, XYZ Tristimulus Values for a Color with Spectral Distribution I( )

College of Computer and Information Science, Northeastern UniversityOctober 19, CIE XYZ color space

College of Computer and Information Science, Northeastern UniversityOctober 19, Adding R, G, and B Values

College of Computer and Information Science, Northeastern UniversityOctober 19, RGB Color Cube (1, 1, 1) (1, 1, 0) (0, 0, 1) (0, 1, 1) (0, 1, 0) (1, 0, 1) (1, 0, 0)

College of Computer and Information Science, Northeastern UniversityOctober 19, CMYRGB CMY Complements of RGB CMYKCMYK are commonly used for inks. They are called the subtractive colors. Yellow ink removes blue light.

College of Computer and Information Science, Northeastern UniversityOctober 19, Subtractive Color Mixing

College of Computer and Information Science, Northeastern UniversityOctober 19, CMYKCMYRGB in Theory CMYK  CMY  RGB in Theory CMYK CMY C CMYK = (C, M, Y, K)  CMY C M Y CMY C CMY = (C, M, Y) = (C(1 − K) + K, M(1 − K) + K, Y(1 − K) + K)  RGB R G BCMY C RGB = (R, G, B) = (1 - C, 1 - M, 1 - Y) CMY = (1 – (C(1 − K) + K), 1 – (M(1 − K) + K), 1 – (Y(1 − K) + K))

College of Computer and Information Science, Northeastern UniversityOctober 19, RGB  CMY  CMYK in Theory RGB CMYK is not unique. RGB  CMYK is not unique. RGB R G B C RGB = (R, G, B)  CMY C M Y RGB C CMY = (C, M, Y) = (1 - R, 1 − G, 1 − B)  C M Y == 1 then CMYK = (0, 0, 0, 1) if min(C, M, Y) == 1 then C CMYK = (0, 0, 0, 1) C M Y else K = min(C, M, Y) CMYK CMY C CMYK = ( (C − K)/(1 − K), (M − K) /(1 − K), (Y − K)/(1 − K), K) This uses as much black as possible.

College of Computer and Information Science, Northeastern UniversityOctober 19, CMYKCMYRGB in Practice CMYK  CMY  RGB in Practice RGBRGB is commonly used for displays. CMYKCMYK is commonly used for 4-color printing. CMYKCMYCMYK or CMY can be used for displays.  CMYRGB  CMY colours mix more naturally than RGB colors for people who grew up with crayons and paint. RGBPrinting inks do not have the same range as RGB display colors.

College of Computer and Information Science, Northeastern UniversityOctober 19, Time for a Break

College of Computer and Information Science, Northeastern UniversityOctober 19, Color Spaces RGB and CMYK are color models. A mapping between the color model and an absolute reference color space results a gamut, defines a new color space.

College of Computer and Information Science, Northeastern UniversityOctober 19, ADOBE RGB and RGBs CIE 1931 xy chromaticity diagram showing the gamut of the sRGB color space and location of the primaries.chromaticity diagramgamut

College of Computer and Information Science, Northeastern UniversityOctober 19, RGB vs CMYK Space

College of Computer and Information Science, Northeastern UniversityOctober 19, Blue RGB(0, 0, 255) converted in Photoshop to CMYK becomes CMYK(88, 77, 0, 0) = RGB(57, 83, 164).

College of Computer and Information Science, Northeastern UniversityOctober 19, Color Spaces for Designers Mixing colors in RGB is not natural. Mixing colors in CMY is a bit more natural but still not very intuitive. How do you make a color paler? How do you make a color brighter? How do you make this color? HSV (HSB) and HSL (HSI) are systems for designers.

College of Computer and Information Science, Northeastern UniversityOctober 19, HSV (Hue, Saturation, Value) HSB (Hue, Saturation, Brightness) Hue (e.g. red, blue, or yellow):Hue  Ranges from Saturation, the "vibrancy" or “purity” of the color:Saturation  Ranges from 0-100%  The lower the saturation of a color, the more "grayness" is present and the more faded or pale the color will appear. Value, the brightness of the color:Valuebrightness  Ranges from 0-100%

College of Computer and Information Science, Northeastern UniversityOctober 19, HSV Created in the GIMP by Wapcaplet

College of Computer and Information Science, Northeastern UniversityOctober 19, HSV Cylinder

College of Computer and Information Science, Northeastern UniversityOctober 19, HSV Annulus

College of Computer and Information Science, Northeastern UniversityOctober 19, HSL Alexandre Van de Sander

College of Computer and Information Science, Northeastern UniversityOctober 19, RGB  HSV Given (R, G, B) 0.0  R, G, B  1.0 MAX = max(R, G, B) MIN = min(R, G, B)

College of Computer and Information Science, Northeastern UniversityOctober 19, HSV  RGB Given color (H, S, V) 0.0  H  360.0, 0.0  S, V  1.0 if S == 0.0 then R =G = B =V and H and S don’t matter. else

College of Computer and Information Science, Northeastern UniversityOctober 19, YIQ NTSC Television YIQ is a linear transformation of RGB.  exploits characteristics of human visual system  maximizes use of fixed bandwidth  provides compatibility with B&W receivers Y = 0.299R G B luminance I = 0.74(R - Y) (B - Y) chrominance Q = 0.48(R - Y) (B - Y) See and discussionhttp://en.wikipedia.org/wiki/YIQ

College of Computer and Information Science, Northeastern UniversityOctober 19, YIQ Y is all that is used for B&W TV B-Y and R-Y small for dark and low saturation colors Y is transmitted at bandwidth 4.2 MHz I at 1.3 MHz Q at.7 MHz.