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

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

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

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 #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Introduction to color science

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

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

The Elements of Colour

Lecture 1 Image Formation.

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

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

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

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

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

Color Vision. Spectral Distributions Various Light Sources

Introduction to Computer Graphics with WebGL

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

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

3D graphics, raster and colors CS312 Fall 2010

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

EM Waves Practice Problems

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

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

CS635 Spring Department of Computer Science Purdue University

Illumination and Shading

CS4670: Computer Vision

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

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

specular diffuse reflection.

INTRODUCTION. Slides modified from Angel book 6e

Pick up Light Packet & Light WS

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

Colour Reading: Chapter 6. Black body radiators

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

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

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

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 #4: Vertex Transformation

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

Spectral Color and Radiometry

Lecture #2: Color and Linear Algebra pt.1

Activity 9.1 The Diffraction Grating

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

CS5670: Computer Vision

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

CHAPTER 3 COLOR MEASUREMENT USING CHROMATICITY DIAGRAM - SOFTWARE

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

CS6670: Computer Vision

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

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

VISUAL SIMULATING DICHROMATIC VISION IN CIE SPACE

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

Color. Phillip Otto Runge ( )

Chapter 1. Light and color

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

UNIT 102-9: INTERFERENCE AND DIFFRACTION

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

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

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

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

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

Computer Vision. The image formation process

Image Formation. CS418 Computer Graphics Eric Shaffer.

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

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

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

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

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

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

Game Programming. Bing-Yu Chen National Taiwan University

Michelson Interferometer

CS6670: Computer Vision

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

Lenses: Focus and Defocus

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

Color to Binary Vision. The assignment Irfanview: A good utility Two parts: More challenging (Extra Credit) Lighting.

Realtime 3D Computer Graphics Virtual Reality

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

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

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

Fall 2015 Dr. Michael J. Reale

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

Chapter 24 - The Wave Nature of Light

Introduction: Experiment 1: Wave Properties of Light

Chapter 24. Wave Optics

Chapter 22. Reflection and Refraction of Light

Colour computer vision: fundamentals, applications and challenges. Dr. Ignacio Molina-Conde Depto. Tecnología Electrónica Univ.

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

Light and Electromagnetic Waves. Honors Physics

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

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

PHY132 Introduction to Physics II Class 5 Outline:

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

CSE4030 Introduction to Computer Graphics

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!

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

Computer Graphics. Bing-Yu Chen National Taiwan University

Sources, Surfaces, Eyes

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

Transcription:

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

Announcements Homework project #3 due this Friday, October 14 To be presented starting 1:30pm in lab 260 Late submissions for project #2 accepted until Friday, October 14 New lab office hours on Thursdays Lex Lacson: Thu 10-11:30a, Thu 3:30-5p Please check grades in Ted Problems with Ted? Discussion groups Grades 2

Lecture Overview Rasterization Perspectively correct interpolation Color Physical background Color perception Color spaces 3

Rasterization What if a triangle s vertex colors are different? Need to interpolate across triangle Naïve: linear interpolation 4

Barycentric Interpolation Interpolate values across triangles, e.g., colors Linear interpolation on triangles Barycentric coordinates 5

Perspectively Correct Interpolation Problem Barycentric (linear) interpolation in image coordinates does not correspond to barycentric interpolation in camera space Equal step size on image plane does not correspond to equal step size on object Object Image plane 6

Perspectively Correct Interpolation Linear interpolation in image coordinates Perspectively correct interpolation in object coordinates 7

Summary Perspectively correct texturing accounts for the vertices' positions in 3D space, rather than simply interpolating a 2D triangle. Instead of interpolating the texture coordinates directly, the coordinates are divided by their depth (relative to the viewer). This correction makes it so that in parts of the polygon that are closer to the viewer the difference from pixel to pixel between texture coordinates is smaller (stretching the texture wider), and in parts that are farther away this difference is larger (compressing the texture). 8

Perspective Projection Revisited Vertices a, b before projection Linear interpolation: Perspective projection, homogeneous division 9

Perspective Projection Revisited Rewrite with s is linear interpolation weight in image space Straight lines are preserved Interpolation speed is different in s and t 10

Perspective Projection Revisited Relation between parameters 11

Perspective Projection Revisited Relation between parameters: Projection after interpolation: Interpolation after projection: 12

Perspectively Correct Interpolation In order to interpolate (in image space) any vertex attribute we need to compute a u and b u Hyperbolic interpolation: 13

Perspectively Correct Interpolation Hyperbolic Interpolation Note Recipe: given parameter s in image space 1. 2. 3. 14

Perspectively Correct Interpolation Works for triangles with barycentric coordinates Given point in image space with barycentric coordinates 1. 2. 3. 15

Lecture Overview Rasterization Perspectively correct interpolation Color Physical background Color perception Color spaces 16

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 17

Electromagnetic Waves Different frequencies high Frequency low Gamma rays, X-rays nuclear radiation Ultra-violet light Visible light Infrared, microwaves Radiowaves 18

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

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

Limitations Wave nature of light ignored E.g., no diffraction effects Diffraction pattern of a small square aperture 21 Surface of a DVD forms a diffraction grating

Lecture Overview Rasterization Perspectively correct interpolation Color Physical background Color perception Color spaces 22

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

Color Perception Photoreceptor cells Light sensitive Two types, rods and cones Ganglion Cells Bipolar Cells Horizontal Cells Rod Cone Rods Cones Light Light 24 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 25

Photoreceptor Cells (Source: Encyclopedia Britannica) 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 26

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

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

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

Response to Arbitrary Spectrum Arbitrary spectrum as sum of mono-chromatic spectra Monochromatic spectra, width h Arbitrary spectrum Wavelength 30 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 31

Response to Arbitrary Spectrum Stimulus Response curves Multiply Integrate 32

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 33 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 34

Lecture Overview Rasterization Perspectively correct interpolation Color Physical background Color perception Color spaces 35

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 36

Color Spaces Set of parameters describing a color sensation Coordinate system for colors Three types of cones, expect three parameters to be sufficient 37

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 38

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) 39

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

Tristimulus Experiment Determine tristimulus values for spectral colors experimentally 41

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! 42 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! 43

Tristimulus Values Given arbitrary spectrum, find weights of primaries such that weighted sum of primaries is perceived the same as input spectrum Linearity again Matching values for a sum of spectra with small spikes are the same as sum of matching values for the spikes In the limit (spikes are infinitely narrow) 44 Monochromatic matching curves

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 45

CIE XYZ Color Space Linear transformation of CIE RGB 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) 46

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

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 48