CSE 167: Lecture #6: Color. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Similar documents
CSE 167: Lecture #6: Color. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Lecture #6: Colors. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Introduction to color science

Image Formation. Camera trial #1. Pinhole camera. What is an Image? Light and the EM spectrum The H.V.S. and Color Perception

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

(0, 1, 1) (0, 1, 1) (0, 1, 0) What is light? What is color? Terminology

The Elements of Colour

The Display pipeline. The fast forward version. The Display Pipeline The order may vary somewhat. The Graphics Pipeline. To draw images.

Lecture 1 Image Formation.

Color Vision. Spectral Distributions Various Light Sources

Reading. 2. Color. Emission spectra. The radiant energy spectrum. Watt, Chapter 15.

EM Waves Practice Problems

Interference. Electric fields from two different sources at a single location add together. The same is true for magnetic fields at a single location.

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CS635 Spring Department of Computer Science Purdue University

Pick up Light Packet & Light WS

Chapter 5 Extraction of color and texture Comunicação Visual Interactiva. image labeled by cluster index

f. (5.3.1) So, the higher frequency means the lower wavelength. Visible part of light spectrum covers the range of wavelengths from

Colour Reading: Chapter 6. Black body radiators

Digital Image Processing COSC 6380/4393. Lecture 19 Mar 26 th, 2019 Pranav Mantini

Spectral Color and Radiometry

Announcements. Lighting. Camera s sensor. HW1 has been posted See links on web page for readings on color. Intro Computer Vision.

Color and Shading. Color. Shapiro and Stockman, Chapter 6. Color and Machine Vision. Color and Perception

2003 Steve Marschner 7 Light detection discrete approx. Cone Responses S,M,L cones have broadband spectral sensitivity This sum is very clearly a dot

specular diffuse reflection.

this is processed giving us: perceived color that we actually experience and base judgments upon.

When this experiment is performed, subjects find that they can always. test field. adjustable field

CSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015

Chapter 1. Light and color

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

VISUAL SIMULATING DICHROMATIC VISION IN CIE SPACE

CS4670: Computer Vision

Image Formation. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Activity 9.1 The Diffraction Grating

Illumination and Shading

Lecture #2: Color and Linear Algebra pt.1

CHAPTER 3 COLOR MEASUREMENT USING CHROMATICITY DIAGRAM - SOFTWARE

Announcements. Light. Properties of light. Light. Project status reports on Wednesday. Readings. Today. Readings Szeliski, 2.2, 2.3.

Reading. 4. Color. Outline. The radiant energy spectrum. Suggested: w Watt (2 nd ed.), Chapter 14. Further reading:

Optics. Dispersion and resolving power of the prism and grating spectroscope Geometrical Optics. What you need:

Light. Properties of light. What is light? Today What is light? How do we measure it? How does light propagate? How does light interact with matter?

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Textbook Reference: Physics (Wilson, Buffa, Lou): Chapter 24

Introduction to Computer Graphics with WebGL

Luiz Fernando Martha André Pereira

CS6670: Computer Vision

Color. Phillip Otto Runge ( )

UNIT 102-9: INTERFERENCE AND DIFFRACTION

Models of Light The wave model: The ray model: The photon model:

ams AG TAOS Inc. is now The technical content of this TAOS document is still valid. Contact information:

Final Exam and End Material Test Friday, May 12, 10:00-12:00

Computer Vision. The image formation process

Color. Reading: Optional reading: Chapter 6, Forsyth & Ponce. Chapter 4 of Wandell, Foundations of Vision, Sinauer, 1995 has a good treatment of this.

Why does a visual system need color? Color. Why does a visual system need color? (an incomplete list ) Lecture outline. Reading: Optional reading:

Chapter 22. Reflection and Refraction of Light

Introduction: Experiment 1: Wave Properties of Light

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

Michelson Interferometer

Optics of Vision. MATERIAL TO READ Web: 1.

CS5670: Computer Vision

CSE 167: Lecture 11: Textures 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Chapter 24 - The Wave Nature of Light

Chapter 24. Geometric optics. Assignment No. 11, due April 27th before class: Problems 24.4, 24.11, 24.13, 24.15, 24.24

Lab 12 - Interference-Diffraction of Light Waves

Ulrik Söderström 17 Jan Image Processing. Introduction

INTRODUCTION. Slides modified from Angel book 6e

CS6670: Computer Vision

Chapter 35. The Nature of Light and the Laws of Geometric Optics

Unit 5.C Physical Optics Essential Fundamentals of Physical Optics

SPECTRAL ANALYSIS OF THE COLOR OF SOME PIGMENTS

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

PHYSICS. Chapter 33 Lecture FOR SCIENTISTS AND ENGINEERS A STRATEGIC APPROACH 4/E RANDALL D. KNIGHT

PHYS:1200 LECTURE 32 LIGHT AND OPTICS (4)

Light and Electromagnetic Waves. Honors Physics

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

To see how a sharp edge or an aperture affect light. To analyze single-slit diffraction and calculate the intensity of the light

Lab2: Single Photon Interference

The topics are listed below not exactly in the same order as they were presented in class but all relevant topics are on the list!

Chapter 24. Wave Optics

Lecture 1. Computer Graphics and Systems. Tuesday, January 15, 13

Computational Perception. Visual Coding 3

1. Final Projects 2. Radiometry 3. Color. Outline

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Modeling the top neuron layers of the human retina. Laurens Koppenol ( ) Universiteit Utrecht

Image Processing. Color

CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

AP Practice Test ch 22

PHY132 Introduction to Physics II Class 5 Outline:

CSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems

Fall 2015 Dr. Michael J. Reale

SNC 2PI Optics Unit Review /95 Name:

The branch of physics which studies light

What is it? How does it work? How do we use it?

PH 222-3A Fall Diffraction Lectures Chapter 36 (Halliday/Resnick/Walker, Fundamentals of Physics 8 th edition)

Color. Today s Class. Reading for This Week. Reading for This Week. Mid- Term PresentaCons. Today s Class 2/29/12

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Lighting. Camera s sensor. Lambertian Surface BRDF

Transcription:

CSE 167: Introduction to Computer Graphics Lecture #6: Color Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Announcements Homework project #3 due this Friday, October 19 To be presented starting 1:30pm in lab 260 Late submissions for project #2 accepted Please check grades in Ted Any problems with Ted? Discussion groups Grades 2

Lecture Overview Review: Barycentric Coordinates 3

Color Interpolation What if a triangle s vertex colors are different? Need to interpolate across triangle How to calculate interpolation weights? Source: efg s computer lab 4

Implicit 2D Lines Given two 2D points a, b Define function such that if p lies on the line defined by a, b 5

Implicit 2D Lines Point p lies on the line, if p-a is perpendicular to the normal n of the line n=(a y -b y, b x -a x ) p-a=(p x -a x, p y -a y ) Use dot product to determine on which side of the line p lies. If f(p)>0, p is on same side as normal, if f(p)<0 p is on opposite side. If dot product is 0, p lies on the line. 6

Barycentric Coordinates Coordinates for 2D plane defined by triangle vertices a, b, c Any point p in the plane defined by a, b, c is p = a + β (b - a) + γ (c - a) Solved for a, b, c: p= (1 β γ ) a + β b + γ c We define α = 1 β γ p = α a + β b + γ c α, β, γ are called barycentric coordinates If we imagine masses equal to α, β, γ in the locations of the vertices of the triangle, the center of mass (the Barycenter) is then p. This is the origin of the term barycentric (introduced 1827 by Möbius) 7

Barycentric Interpolation Interpolate values across triangles, e.g., colors Done by linear interpolation on triangle: Works well at common edges of neighboring triangles 8

Barycentric Coordinates Demo Applet: http://www.ccs.neu.edu/home/suhail/barytriangles/applet.htm 9

Lecture Overview Color Physical background Color perception Color spaces 10

Light Physical models Electromagnetic waves [Maxwell 1862] Photons (tiny particles) [Planck 1900] Wave-particle duality [Einstein, early 1900] It depends on the experiment you are doing whether light behaves as particles or waves Simplified models in computer graphics 11

Electromagnetic Waves Large range of frequencies high Frequency low Gamma rays, X-rays nuclear radiation Ultra-violet light Visible light Infrared, microwaves Radiowaves 12

Visible Light Frequency 13 Wavelength: 1nm=10^-9 meters speed of light = wavelength * frequency Example 91.1MHz: 300*10 91.1*10 6 m s 6 1 s = 3.29m

Light Transport Simplified model in computer graphics Light is transported along straight rays Rays carry a spectrum of electromagnetic energy Energy 14 Frequency

Limitations OpenGL ignores wave nature of light no diffraction effects Diffraction pattern of a small square aperture 15 Surface of a CD shows diffraction grating

Lecture Overview Color Physical background Color perception Color spaces 16

Light and Color Different spectra may be perceived as the same color 17

Color Perception Photoreceptor cells Light sensitive Two types, rods and cones Ganglion Cells Bipolar Cells Horizontal Cells Rod Cone Rods Cones Light Light 18 Retina Amacrine Cells Optic Nerve Distribution of Cones and Rods

Photoreceptor Cells Rods More than 1,000 times more sensitive than cones Low light vision Brightness perception only, no color Predominate in peripheral vision Cones Responsible for high-resolution vision 3 types of cones for different wavelengths (LMS): L: long, red M: medium, green S: short, blue 19

Photoreceptor Cells The Austrian naturalist Karl von Frisch has demonstrated that honeybees, although blind to red light, distinguish at least four different color regions, namely: yellow (including orange and yellow green) blue green blue (including purple and violet) ultraviolet (Source: Encyclopedia Britannica) 20

Photoreceptor Cells Response curves to monochromatic spectral stimuli Monochromatic stimulus Experimentally determined in the 1980s 21

Photoreceptor Cells Response curves to monochromatic spectral stimuli Monochromatic stimulus Experimentally determined in the 1980s 22

Photoreceptor Cells Response curves to monochromatic spectral stimuli Monochromatic stimulus Experimentally determined in the 1980s 23

Response to Arbitrary Spectrum Arbitrary spectrum as sum of mono-chromatic spectra Monochromatic spectra, width h Arbitrary spectrum Wavelength 24 Wavelength

Response to Arbitrary Spectrum Assume linearity (superposition principle) Response to sum of spectra is equal to sum of responses to each spectrum S-cone Input: light intensity, impulse width h Response to monochromatic impulse In the limit 25

Response to Arbitrary Spectrum Stimulus Response curves Multiply Integrate 26

Metamers Different spectra, same response Cannot distinguish spectra Arbitrary spectrum is infinitely dimensional (has infinite number of degrees of freedom) Response has three dimensions Information is lost Energy Energy Frequency Perceived color: red 27 Frequency Perceived color: red

Color Blindness One type of cone missing, damaged Different types of color blindness, depending on type of cone Can distinguish even fewer colors But we are all a little color blind 28

Lecture Overview Color Physical background Color perception Color spaces 29

Color Reproduction How can we reproduce, represent color? One option: store full spectrum Representation should be as compact as possible Any pair of colors that can be distinguished by humans should have two different representations 30

Color Spaces Set of parameters describing a color sensation Coordinate system for colors Three types of cones, expect three parameters to be sufficient Why not use L,M,S cone responses? 31

Color Spaces Set of parameters describing a color sensation Coordinate system for colors Three types of cones, expect three parameters to be sufficient Why not use L,M,S cone responses? Not known until 1980s! 32

Trichromatic Theory Claims any color can be represented as a weighted sum of three primary colors Propose red, green, blue as primaries Developed in 18 th, 19 th century, before discovery of photoreceptor cells (Thomas Young, Hermann von Helmholtz) 33

Tristimulus Experiment Given arbitrary color, want to know the weights for the three primaries Tristimulus value Experimental solution CIE (Commission Internationale de l Eclairage, International Commission on Illumination), circa 1920 34

Tristimulus Experiment Determine tristimulus values for spectral colors experimentally 35

Tristimulus Experiment Spectral primary colors were chosen Blue (435.8nm), green (546.1nm), red (700nm) Matching curves for monochromatic target Weight for red primary Negative values! 36 Target (580nm)

Tristimulus Experiment Negative values Some spectral colors could not be matched by primaries in the experiment Trick One primary could be added to the source (stimulus) Match with the other two Weight of primary added to the source is considered negative Photoreceptor response vs. matching curve Not the same! 37

Tristimulus Values Matching values for a sum of spectra with small spikes are the same as sum of matching values for the spikes Monochromatic matching curves In the limit (spikes are infinitely narrow) 38

CIE Color Spaces Matching curves define CIE RGB color space CIE RGB values are color coordinates CIE was not satisfied with range of RGB values for visible colors Defined CIE XYZ color space Most commonly used color space today 39

CIE XYZ Color Space Determined coefficients such that Y corresponds to an experimentally determined brightness No negative values in matching curves White is XYZ=(1/3,1/3,1/3) Linear transformation of CIE RGB: 40

CIE XYZ Color Space Matching curves No corresponding physical primaries Tristimulus values Always positive! 41

Summary CIE color spaces are defined by matching curves At each wavelength, matching curves give weights of primaries needed to produce color perception of that wavelength CIE RGB matching curves determined using trisimulus experiment Each distinct color perception has unique coordinates CIE RGB values may be negative CIE XYZ values are always positive 42