CS452/552; EE465/505. Color Display Issues

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

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

Game Programming. Bing-Yu Chen National Taiwan University

Introduction to Computer Graphics with WebGL

Physical Color. Color Theory - Center for Graphics and Geometric Computing, Technion 2

Visible Color. 700 (red) 580 (yellow) 520 (green)

3D graphics, raster and colors CS312 Fall 2010

Computer Graphics. Bing-Yu Chen National Taiwan University

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

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

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

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

Ray Tracing. Shandong University

INTRODUCTION. Slides modified from Angel book 6e

Computer Graphics. Curves and Surfaces. Hermite/Bezier Curves, (B-)Splines, and NURBS. By Ulf Assarsson

Fall 2015 Dr. Michael J. Reale

The Elements of Colour

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

Main topics in the Chapter 2. Chapter 2. Digital Image Representation. Bitmaps digitization. Three Types of Digital Image Creation CS 3570

Introduction to color science

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

COMP3421. Global Lighting Part 2: Radiosity

Display Issues Week 5

National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor

CS635 Spring Department of Computer Science Purdue University

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Curves and Surfaces 1

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

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

Illumination and Shading

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

CHAPTER 1 Graphics Systems and Models 3

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

Design considerations

Rendering Curves and Surfaces. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Lecture 12 Color model and color image processing

2D Spline Curves. CS 4620 Lecture 13

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK

CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside

End-Term Examination

Spectral Color and Radiometry

Curves and Surfaces Computer Graphics I Lecture 10

Survey in Computer Graphics Computer Graphics and Visualization

OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS

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

Topics and things to know about them:

Chapter 4 Color in Image and Video

Intro to Modeling Modeling in 3D

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Lecture 1 Image Formation.

ITP 140 Mobile App Technologies. Colors

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

Digital Image Processing

Lecture 11. Color. UW CSE vision faculty

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics 1/15

The Viewing Pipeline Coordinate Systems

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

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

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

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics. Bin Sheng Representing Shape 9/20/16 1/15

Computer Graphics. Instructor: Oren Kapah. Office Hours: T.B.A.

Computer Graphics Lecture 2

Computer Graphics Curves and Surfaces. Matthias Teschner

Color. making some recognition problems easy. is 400nm (blue) to 700 nm (red) more; ex. X-rays, infrared, radio waves. n Used heavily in human vision

Digital Image Processing. Introduction

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

Black generation using lightness scaling

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

CS 464 Review. Review of Computer Graphics for Final Exam

ECE-161C Color. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

Graphics Hardware and Display Devices

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

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

Objects 2: Curves & Splines Christian Miller CS Fall 2011

Animation & Rendering

Color Vision. Spectral Distributions Various Light Sources

Curves. Computer Graphics CSE 167 Lecture 11

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

CS770/870 Spring 2017 Color and Shading

Modeling 3D Objects: Part 2

CS 445 HW#6 Solutions

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

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

COMPUTER GRAPHICS, MULTIMEDIA AND ANIMATION, Second Edition (with CD-ROM) Malay K. Pakhira

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

Curves and Surfaces Computer Graphics I Lecture 9

CS452/552; EE465/505. Image Formation

CS559 Computer Graphics Fall 2015

B-spline Curves. Smoother than other curve forms

An introduction to interpolation and splines

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1

Central issues in modelling

2D Spline Curves. CS 4620 Lecture 18

CHAPTER 3 COLOR MEASUREMENT USING CHROMATICITY DIAGRAM - SOFTWARE

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

Light Transport Baoquan Chen 2017

Know it. Control points. B Spline surfaces. Implicit surfaces

782 Schedule & Notes

Transcription:

CS452/552; EE465/505 Color Display Issues 4-16 15

2

Outline! Color Display Issues Color Systems Dithering and Halftoning! Splines Hermite Splines Bezier Splines Catmull-Rom Splines Read: Angel, Chapter 8, section 8.13 Display Considerations Chapter 11, Curves and Surfaces Chapter 12, section 12.1-12.7 Advanced Rendering: Ray-Tracing Lab#5 posted, due: April 22nd simple scene: platform & object; 1 light; shadow map; camera controls Project#2 posted due: April 23rd

Light mapping

Recursive Ray Tracer (Simple version) // starting point p, direction d, max # of steps; returns a color c (single light source) trace(p, d, step) { color local, reflected, transmitted; point q; normal n; if(step > max) return(background_color); q = intersect(p, d, status); if(status==light_source) return(light_source_color); if(status==no_intersection) return(background_color); n = normal(q); r = reflect(q, n); t = transmit(q,n); local = phong(q, n, r); reflected = trace(q, r, step+1); // recursive call transmitted = trace(q, t, step+1); // recursive call return(local + reflected + transmitted); }

Ray Tracing: Summary! Efficiency replace the recursion with iteration use bounding boxes to simplify the math used to compute intersections! Aliasing errors, due to sampling use a stochastic sampling method in which the decision on where to cast the next ray is based on the rays cast so far (used in Renderman)! Ray tracing is an inherently parallel process! There are many free ray tracers available

Next Topic: Displays & Color! Consider perceptual issues related to displays! Introduce chromaticity space Color systems Color transformations! Standard Color Systems Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Displays & Color! Problems that affect the quality of a display two different displays may have the same resolution, but display pixels at different sizes the colors displayed on two different monitors may differ map software-defined colors onto the display map brightness values onto the display RGB values are independent of display properties, but do not account for the full range of the human visual system! The range of displayable colors for a device is called its color gamut

Luminance and Color Images! Luminance Image Monochromatic Values are gray levels Analogous to working with black and white film or television! Color Image Has perceptional attributes of hue, saturation, and lightness Do we have to match every frequency in visible spectrum? No! E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Perception Review! Light is the part of the electromagnetic spectrum between ~350-750 nm! A color C(λ) is a distribution of energies within this range! Human visual system has two types of sensors Rods: monochromatic, night vision Cones: color sensitive Three types of cones! Consequently, only three values, the tristimulus values, are perceived by the brain E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Color vision deficiency! red-green difficulty distinguishing between shades of red + green affects ~8% of males and ~0.5% of females in populations of North European ancestry! blue-yellow difficulty differentiating shades of blue and yellow affects males & females equally, < 1/10,000! achromatopsia cannot perceive any colors rare, < 1/30,000 for most populations

Tristimulus Values! The human visual center has three cones with sensitivity curves S 1 (λ), S 2 (λ), and S 3 (λ)! For a color C(λ), the cones output the tristimulus values T = S λ) C( λ) dλ 1 1 ( C(λ) T = S λ) C( λ) dλ 2 2 ( T = S λ) C( λ) dλ 3 3 ( cones optic nerve T 1, T 2, T 3 E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Three Color Theory! Any two colors with the same tristimulus values are perceived to be identical! Thus a display (CRT, LCD, film) must only produce the correct tristimulus values to match a color! Is this possible? Not always Different primaries (different sensitivity curves) in different systems E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

The Problem! The sensitivity curves of the human are not the same as those of physical devices! Human: curves centered in blue, green, and green-yellow! CRT: RGB! Print media: CMY or CMYK! Which colors can we match and, if we cannot match, how close can we come? E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Representing Colors! Consider a color C(λ)! It generates tristimulus values T 1, T 2, T 3 Write C = (T 1, T 2, T 3 ) Conventionally,we assume 1 T 1, T 2, T 3 0 because there is a maximum brightness we can produce and energy is nonnegative 1 C is a point in color solid C 1 T 3 T 2 T 1 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Producing Colors! Consider a device such as a CRT with RGB primaries and sensitivity curves! Tristimulus values T = R( λ) C( λ) dλ T = G( λ) C( λ) dλ T = B( λ) C( λ) dλ 1 2 3 E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Matching! This T 1, T 2, T 3 is dependent on the particular device! If we use another device, we will get different values and these values will not match those of the human cone curves! Need a way of matching and a way of normalizing E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Color Systems! Various color systems are used Based on real primaries: RGB UVW CMYK HLS (aka HSB) NTSC YIQ (National Television System Committee) Theoretical XYZ! Prefer to separate brightness (luminance) from color (chromatic) information Reduce to two dimensions E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Tristimulus Coordinates! For any set of primaries, define t = T T T 1 1 + + 1 2 Note: T t 3 = T T T t 3 3 + + 1 2 = T T T 2 2 + + 1 2 T 3 T + + 1,, 0 t t t 2 3 1 = 1 t t 2 t 1 3 3 E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Maxwell Triangle 1 T 1 + T 2 +T 3 =1 1 1 color solid Project onto 2D: chromaticity space 1 t 1 + t 2 =1 t 1 possible colors t 2 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

NTSC RGB 1 r+g+b=1 g r+g=1 r 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Producing Other Colors! However colors producible on one system (its color gamut) is not necessarily producible on any other! Note that if we produce all the pure spectral colors in the 350-750 nm range, we can produce all others by adding spectral colors! With real systems (CRT, film), we cannot produce the pure spectral colors! We can project the color solid of each system into chromaticity space (of some system) to see how close we can get E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Color Gamuts 600 nm spectral colors CRT colors printer colors producible color on CRT but not on printer unproducible color 350 nm producible color on both CRT and printer 750 nm E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

XYZ! Reference system in which all visible pure spectral colors can be produced! Theoretical systems, as there are no corresponding physical primaries! Standard reference system E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Color Systems! Most correspond to real primaries National Television Systems Committee (NTSC) RGB matches phosphors in CRTs! Film both additive (RGB) and subtractive (CMY) for positive and negative film! Print industry CMYK (K = black) K used to produce sharp crisp blacks Example: ink jet printers E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Color Transformations! Each additive color system is a linear transformation of another G G C = (T 1, T 2, T 3 ) = (T 1, T 2, T 3 ) B B R in R G B system R in RGB system E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Additive and Subtractive Color! Additive color Form a color by adding amounts of three primaries CRTs, projection systems, positive film Primaries are Red (R), Green (G), Blue (B)! Subtractive color Form a color by filtering white light with cyan (C), Magenta (M), and Yellow (Y) filters Light-material interactions Printing Negative film E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

RGB: Red, Green, Blue! Primary colors: red, green, blue! Secondary colors: yellow = red+green cyan = green+blue magenta = blue+red! All colors white = red+green+blue black = no color C = T 1 R + T 2 G + T 3 B Color Cube

CMYK: Cyan, Magenta, Yellow, Black! Primary colors: cyan, magenta, yellow! Secondary colors: blue = cyan+magenta red = magenta+yellow green = yellow+cyan! All colors white = no color black = cyan+magenta+yellow for true black, add in black (+black) Also known as process color (used to print full-color images)

RGB, CMY, CMYK! Assuming 1 is max of a primary C = 1 R M = 1 G Y = 1 B! Convert CMY to CMYK by K = min(c, M, Y) C = C K M = M K Y = Y - K E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Color Matrix! Exists a 3 x 3 matrix to convert from representation in one system to representation in another # &! $! = M$! $ " %! Example: XYZ to NTSC RGB find in colorimetry references & $ $ $ % T' T' T' 1 2 3 T T T! Can take a color in XYZ and find out if it is producible by transforming and then checking if resulting tristimulus values lie in (0,1) 1 2 3 #!!! " E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

YIQ! NTSC Transmission Colors! Here Y is the luminance arose from the need to separate brightness from chromatic information in TV broadcasting & Y# $! $ I! $ % Q! " = & 0.299 $ $ 0.596 $ % 0.212 0.587-0.275-0.523 0.114 #& R# - 0.321! $!! $ G! 0.311!" $ % B! "! Note luminance shows high green sensitivity E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Other Color Systems! UVW: equal numerical errors are closer to equal perceptual errors! HLS: perceptual color (hue, saturation, lightness) Polar representation of color space Single and double cone versions E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

HSB: Hue, Saturation, Brightness! Hue is the actual color. It is measured in angular degrees counter-clockwise around the cone starting and ending at red=0 or 360 (yellow = 60, green = 120, etc.).! Saturation is the purity of the color, measured in percent from the center of the cone (0) to the surface (100).! Brightness is measured in percent from black (0%) to white (100%). grayscale axis from 0% (white) to 100% (black)

Gamma Correction! Intensity vs CRT voltage is nonlinear I = cv γ! Gamma correction (encoding) can code/decode luminance or tristimulus values! Can use a lookup table to correct! Human brightness response is logarithmic Equal steps in gray levels are not perceived equally Can use lookup table! CRTs cannot produce a full black Limits contrast ratio E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

Dithering (digital halftoning)

Black/White Dithering

Color Dithering

Halftoning

Modeling Complex Shapes

What do we need from curves in Computer Graphics?! Local control of shape so that it is easy to build and modify! Stability! Smoothness and continuity! Ability to evaluate derivatives! Ease of rendering

Utah Teapot! Most famous data set in computer graphics! Widely available as a list of 306 3D vertices and the indices that define 32 Bezier patches

Curve Representations

Parameterization of a Curve

Polynomial Interpolation

Splines: Piecewise Polynomials

Piecewise Polynomials

Splines

Cubic Curves in 3D

Cubic Hermite Splines

Deriving Hermite Splines

Deriving Hermite Splines

Deriving Hermite Splines

The Cubic Hermite Spline Equation

Four Basis Functions for Hermite Splines

Piecing together Hermite Splines

Hermite Splines in Adobe Illustrator

Bezier s Idea! In graphics and CAD, we do not usually have derivative data! Bezier suggested using the same 4 data points as with the cubic interpolating curve to approximate the derivatives in the Hermite form

Bezier Splines

Approximating Derivatives p 1 located at u=1/3 p 1 p 2 p 2 located at u=2/3 p p0 p'(0) 1/ 3 1 p p2 p'(1) 1/ 3 3 slope p (0) slope p (1) p 0 u p 3

The Bezier Spline Matrix

Bezier Blending Functions

DeCasteljau Construction

Bezier Patches Using same data array P=[p ij ] as with interpolating form p( u, v) 3 3 = i= 0 j= 0 bi( u) b j ( v) p ij = u T M B P M T B v Patch lies in convex hull

Analysis! Although the Bezier form is much better than the interpolating form, we have the derivatives are not continuous at join points! Can we do better? Go to higher order Bezier More work Derivative continuity still only approximate Supported by OpenGL Apply different conditions Tricky without letting order increase

Catmull-Rom Splines

Constructing the Catmull-Rom Spline

Catmull-Rom Spline Matrix

Splines with More Continuity?

Comparison of Basic Cubic Splines

Natural Cubic Splines

B-Splines

B-Splines! Basis splines: use the data at p=[p i-2 p i-1 p i p i-1 ] T to define curve only between p i-1 and p i! Allows us to apply more continuity conditions to each segment! For cubics, we can have continuity of function, first and second derivatives at join points! Cost is 3 times as much work for curves Add one new point each time rather than three! For surfaces, we do 9 times as much work

B-Spline Basis

Other Common Types of Splines

Generalizing Splines! We can extend to splines of any degree! Data and conditions to not have to given at equally spaced values (the knots) Nonuniform and uniform splines Can have repeated knots Can force spline to interpolate points! Cox-deBoor recursion gives method of evaluation

NURBS! Nonuniform Rational B-Spline curves and surfaces add a fourth variable w to x,y,z Can interpret as weight to give more importance to some control data Can also interpret as moving to homogeneous coordinate! Requires a perspective division NURBS act correctly for perspective viewing! Quadrics are a special case of NURBS

How to Draw Spline Curves

Drawing Splines, continued

Summary

Project: Roller Coaster! use Catmull-Rom splines along with lighting and texture mapping to create a roller coaster simulation! runs in a first-person view, allowing the user to ride the coaster in an immersive environment

Animation