CS559: Computer Graphics

Similar documents
Computer Graphics Si Lu Fall /27/2016

Prof. Feng Liu. Winter /09/2017

Figure 1: Energy Distributions for light

Interactive Computer Graphics

Computer Graphics. Si Lu. Fall er_graphics.htm 10/02/2015

Understand brightness, intensity, eye characteristics, and gamma correction, halftone technology, Understand general usage of color

Color Science. What light is. Measuring light. CS 4620 Lecture 15. Salient property is the spectral power distribution (SPD)

Introduction to Color Science (Cont)

Image and video processing (EBU723U) Colour Images. Dr. Yi-Zhe Song

Color , , Computational Photography Fall 2017, Lecture 11

Prof. Feng Liu. Fall /02/2018

Color , , Computational Photography Fall 2018, Lecture 7

Colors in Images & Video

Digital Image Processing COSC 6380/4393. Lecture 20 Oct 25 th, 2018 Pranav Mantini

Introduction. The Spectral Basis for Color

University of British Columbia CPSC 414 Computer Graphics

To discuss. Color Science Color Models in image. Computer Graphics 2

Color Image Processing. Gonzales & Woods: Chapter 6

12 Color Models and Color Applications. Chapter 12. Color Models and Color Applications. Department of Computer Science and Engineering 12-1

Frequencies and Color

Color Science. CS 4620 Lecture 15

INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET

Images. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 38

Colour. Why/How do we perceive colours? Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!

Color and Color Model. Chap. 12 Intro. to Computer Graphics, Spring 2009, Y. G. Shin

Color images C1 C2 C3

Colour. Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!) Colour Lecture!

Capturing Light in man and machine

Colour. Cunliffe & Elliott, Chapter 8 Chapman & Chapman, Digital Multimedia, Chapter 5. Autumn 2016 University of Stirling

LECTURE 07 COLORS IN IMAGES & VIDEO

Announcements. The appearance of colors

Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE) Color Vision

Image Representations, Colors, & Morphing. Stephen J. Guy Comp 575

What will be on the final exam?

Lecture 8. Color Image Processing

Color & Graphics. Color & Vision. The complete display system is: We'll talk about: Model Frame Buffer Screen Eye Brain

Fig Color spectrum seen by passing white light through a prism.

Raster Graphics. Overview קורס גרפיקה ממוחשבת 2008 סמסטר ב' What is an image? What is an image? Image Acquisition. Image display 5/19/2008.

קורס גרפיקה ממוחשבת 2008 סמסטר ב' Raster Graphics 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור

Chapter 3 Part 2 Color image processing

CS 4300 Computer Graphics. Prof. Harriet Fell Fall 2012 Lecture 4 September 12, 2012

Color Image Processing

Additive Color Synthesis

The Science Seeing of process Digital Media. The Science of Digital Media Introduction

Oversubscription. Sorry, not fixed yet. We ll let you know as soon as we can.

Lecture: Color. Juan Carlos Niebles and Ranjay Krishna Stanford AI Lab. Lecture 1 - Stanford University

USE OF COLOR IN REMOTE SENSING

Color image processing

Digital Image Processing. Lecture # 8 Color Processing

Brief Introduction to Vision and Images

Color Computer Vision Spring 2018, Lecture 15

Color and Perception. CS535 Fall Daniel G. Aliaga Department of Computer Science Purdue University

Color Image Processing

12/02/2017. From light to colour spaces. Electromagnetic spectrum. Colour. Correlated colour temperature. Black body radiation.

Computers and Imaging

Understanding Color Theory Excerpt from Fundamental Photoshop by Adele Droblas Greenberg and Seth Greenberg

CS 565 Computer Vision. Nazar Khan PUCIT Lecture 4: Colour

University of British Columbia CPSC 314 Computer Graphics Jan-Apr Tamara Munzner. Color.

Reading for Color. Vision/Color. RGB Color. Vision/Color. University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013.

Visual Perception. Overview. The Eye. Information Processing by Human Observer

Color vision and representation

Capturing Light in man and machine

EECS490: Digital Image Processing. Lecture #12

Color and perception Christian Miller CS Fall 2011

Capturing Light in man and machine

Introduction to Color Theory

Digital Image Processing Color Models &Processing

Imaging Process (review)

Comparing Sound and Light. Light and Color. More complicated light. Seeing colors. Rods and cones

CS6640 Computational Photography. 6. Color science for digital photography Steve Marschner

Announcements. Electromagnetic Spectrum. The appearance of colors. Homework 4 is due Tue, Dec 6, 11:59 PM Reading:

VC 16/17 TP4 Colour and Noise

Human Vision, Color and Basic Image Processing

CSE 332/564: Visualization. Fundamentals of Color. Perception of Light Intensity. Computer Science Department Stony Brook University

Introduction to Computer Vision CSE 152 Lecture 18

Introduction to computer vision. Image Color Conversion. CIE Chromaticity Diagram and Color Gamut. Color Models

Reading. Foley, Computer graphics, Chapter 13. Optional. Color. Brian Wandell. Foundations of Vision. Sinauer Associates, Sunderland, MA 1995.

Achim J. Lilienthal Mobile Robotics and Olfaction Lab, AASS, Örebro University

CSE1710. Big Picture. Reminder

For a long time I limited myself to one color as a form of discipline. Pablo Picasso. Color Image Processing

Computer Graphics Si Lu Fall /25/2017

Capturing Light in man and machine

Digital Image Processing Chapter 6: Color Image Processing ( )

CMPSCI 670: Computer Vision! Color. University of Massachusetts, Amherst September 15, 2014 Instructor: Subhransu Maji

Images and Colour COSC342. Lecture 2 2 March 2015

Brightness Calculation in Digital Image Processing

COLOR and the human response to light

Test 1: Example #2. Paul Avery PHY 3400 Feb. 15, Note: * indicates the correct answer.

Color Image Processing. Jen-Chang Liu, Spring 2006

skip chap. 8 for now Chap. 9 Color (continued) Lecture 19 Tuesday, October 26

Image processing & Computer vision Xử lí ảnh và thị giác máy tính

Color Reproduction. Chapter 6

6 Color Image Processing

Visual Imaging and the Electronic Age Color Science

COLOR. Elements of color. Visible spectrum. The Human Visual System. The Fovea. There are three types of cones, S, M and L. r( λ)

IMAGE PROCESSING >COLOR SPACES UTRECHT UNIVERSITY RONALD POPPE

COLOR. Elements of color. Visible spectrum. The Fovea. Lecture 3 October 30, Ingela Nyström 1. There are three types of cones, S, M and L

Continued. Introduction to Computer Vision CSE 252a Lecture 11

Histograms and Color Balancing

Technology and digital images

Transcription:

CS559: Computer Graphics Lecture 8: Dynamic Range and Trichromacy Li Zhang Spring 2008 Most Slides from Stephen Chenney

Today Finish image morphing Dynamic Range: Is 8 bits per channel enough? Trichromacy: Is RGB 3 bands enough? Start on 3D graphics Reading: Shirley ch 3.1 3.4 Shirley ch 20.1 20.2 Shirley ch 6, except 6.2.2

Barycentric coordinates Idea: represent P using A1,A2,A3 1 3 1 2 1 A A A A A P + = γ β 3 2 1 1 A A A P + + = γ β γ β 1 3 2 1 3 3 2 2 1 1 = + + + + = t t t A t A t A t P 3 2 1 3 2 1 A A A area A PA area t = 3 2 1 2 1 3 A A A area PA A area t = 3 2 1 1 3 2 A A A area A PA area t =

Non parametric image warping P = wa A + wbb + w C C P' = wa A' + wbb' + w C C' Barycentric coordinate P P Turns out to be equivalent to affine transform

Non parametric image warping Gaussian ρ r = e βr 2 1 ΔP = ρ P' X i ΔX i K i

Demo http://www.colonize.com/warp/warp04 2.php Warping is a useful operation for mosaics, video matching, view interpolation and so on.

Image morphing

Image morphing The goal is to synthesize a fluid transformation from one image to another. Cross dissolving is a common transition between cuts, but it is not good for morphing because of the ghosting effects. image #1 dissolving image #2 1-t Image1 + t Image2

Why ghosting? Image morphing Morphing = warping + cross dissolving shape geometric color photometric

Image morphing image #1 cross-dissolving image #2 warp morphing warp

Morphing sequence

Image morphing create a morphing sequence: for each time t 1. Create an intermediate warping field by interpolation A0 A0.33 A1 B0 C0 B0.33 C0.33 B1 C1 t=0 t=0.33 t=1

Image morphing create a morphing sequence: for each time t 1. Create an intermediate warping field by interpolation 2. Warp both images towards it A0 A0.33 A1 B0 C0 B0.33 C0.33 B1 C1 t=0 t=0.33 t=1

Image morphing create a morphing sequence: for each time t 1. Create an intermediate warping field by interpolation 2. Warp both images towards it A0 A0.33 A1 B0 C0 B0.33 C0.33 B1 C1 t=0 t=0.33 t=1

Image morphing create a morphing sequence: for each time t A0 1. Create an intermediate warping field by interpolation 2. Warp both images towards it 3. Cross dissolve the colors in the newly warped images A0.33 A1 B0 C0 B0.33 C0.33 B1 t=0 t=0.33 t=1 C1

Triangular Mesh More complex morph

Results Michael Jackson s MTV Black or White http://www.michaeljackson.com/quicktime_blackorwhite.html

Multi source morphing

Multi source morphing

The average face http://www.uniregensburg.de/fakultaeten/phil_fak_ii/psycholog ie/psy_ii/beautycheck/english/index.htm

3D Face morphing http://www.youtube.com/watch?v=nice6nyb_wa Blanz and Vetter, SIGGRAPH 1998

Dynamic Range The dynamic range is the ratio between the maximum and minimum values of a physical measurement. Its definition depends on what the dynamic range refers to. For a Scene: ratio between the brightest and darkest parts of the scene. For a Display: ratio between the maximum and minimum intensities emitted from the screen.

Dynamic Range Dynamic range is a ratio and as such a dimensionless quantity. In photography and imaging, the dynamic range represents the ratio of two luminance values, with the luminance expressed in candelas per square meter. A scene showing the interior of a room with a sunlit view outside the window, for instance, will have a dynamic range of approximately 100,000:1. The human eye can accommodate a dynamic range of approximately 10,000:1 in a single view.

Dynamic Range Dynamic range is a ratio and as such a dimensionless quantity. In photography and imaging, the dynamic range represents the ratio of two luminance values, with the luminance expressed in candelas per square meter. A scene showing the interior of a room with a sunlit view outside the window, for instance, will have a dynamic range of approximately 100,000:1. The human eye can accommodate a dynamic range of approximately 10,000:1 in a single view. Beyond that, use adaptation to adjust

Dynamic Range Image depth refers to the number of bits available. We can use those bits to represent a large range at low resolution, or a small range at high resolution

High dynamic imaging High Dynamic Range Image Floating point pixel Tone mapped image 8 bits, for standard monitors http://www.hdrsoft.com/examples.html

Intensity Perception Humans are actually tuned to the ratio of intensities, not their absolute difference So going from a 50 to 100 Watt light bulb looks the same as going from 100 to 200 So, if we only have 4 intensities, between 0 and 1, we should choose to use 0, 0.25, 0.5 and 1 Ignoring this results in poorer perceptible intensity resolution at low light levels, and better resolution at high light levels It would use 0, 0.33, 0.66, and 1

Display on a Monitor When images are created, a linear mapping between pixels and intensity is assumed For example, if you double the pixel value, the displayed intensity should double Monitors, however, do not work that way For analog monitors, the pixel value is converted to a voltage The voltage is used to control the intensity of the monitor pixels But the voltage to display intensity is not linear Similar problem with other monitors, different causes The outcome: A linear intensity scale in memory does not look linear on a monitor Even worse, different monitors do different things

Gamma Control The mapping from voltage to display is usually an γ exponential function: I display I to monitor To correct the problem, we pass the pixel values through a gamma function before converting them to the monitor I to monitor 1 γ image This process is called gamma correction The parameter, γ, is controlled by the user It should be matched to a particular monitor Typical values are between 2.2 and 2.5 The mapping can be done in hardware or software I

Color Vision We have seen that humans have three sensors for color vision What s the implications for digital color representation

Qualitative Response Sensitivity, ρ Multiply ρe #photons, E 400 500 600 700 Red 400 500 600 700 400 500 600 700 Big response! Area under curve?

Qualitative Response Sensitivity, ρ Multiply ρe #photons, E 400 500 600 700 Blue 400 500 600 700 400 500 600 700 Tiny response! Area under curve?

Trichromacy means Spectrum Color Matching: People think these two spectra look the same 400 500 600 700 3 Primaries Representing color: If you want people to see the continuous spectrum, you can just show the three primaries 400 500 600 700

: Taregt Perceived target target target E l E m E s Trichromacy spectrum : Target target E spectrum : Display B G R E b E g E r + + + + + + + + : Display Perceived B G R B G R B G R E l b E l g E l r E m b E m g E m r E s b E s g E s r For almost any given E_target, we can solve for [r,g,b] so that the displayed color looks indistinguishable from the target color to our eyes. 400 500 600 700 Spectrum 400 500 600 700 3 primaries

Trichromacy Many colors can be represented as a mixture of R, G, B: M=rR + gg + bb Additive matching Gives a color description system two people who agree on R, G, B need only supply r, g, b to describe a color Some colors can t be matched like this, instead, write: M+rR=gG+bB Subtractive matching Interpret this as r, g, b Problem for reproducing colors you can t subtract light using a monitor

Primaries are Spectra Too A primary can be a spectrum Single wavelengths are just a special case 3 Primaries 3 Primaries or 400 500 600 700 400 500 600 700

Color Matching Given a spectrum, how do we determine how much each of R, G and B to use to match it? Procedure: For a light of unit intensity at each wavelength, ask people to match it using some combination of R, G and B primaries Gives you, r, g and b, the amount of each primary used for wavelength Defined for all visible wavelengths, r, g and b are the RGB color matching functions

The RGB Color Matching Functions

Computing the Matching Given a spectrum E, how do we determine how much each of R, G and B to use to match it? The spectrum function that we are trying to match, E, gives the amount of energy at each wavelength The RGB matching functions describe how much of each primary is needed to give one energy unit s worth of response at each wavelength E = rr + gg + bb r = r E d g = g E d b = b E d

Color Spaces The principle of trichromacy means that the colors displayable are all the linear combination of primaries Taking linear combinations of R, G and B defines the RGB color space If R, G and B correspond to a monitor s phosphors monitor RGB, then the space is the range of colors displayable on the monitor

RGB Cube Cyan 0,1,1 White1,1,1 Green0,1,0 Yellow 1,1,0 Blue 0,0,1 Magenta 0,1,1 Black 0,0,0 Red 1,0,0 Demo

Problems with RGB It isn t easy for humans to say how much of RGB to use to make a given color How much R, G and B is there in brown? Answer:.64,.16,.16

HSV Color Space Alvy Ray Smith, 1978 Hue: the color family: red, yellow, blue Saturation: The purity of a color: white is totally unsaturated Value: The intensity of a color: white is intense, black isn t Space looks like a cone Parts of the cone can be mapped to RGB space Not a linear space, so no linear transform to take RGB to HSV But there is an algorithmic transform

RGB to HSV #define RETURN_HSVh, s, v {HSV.H = h; HSV.S = s; HSV.V = v; return HSV;} #define RETURN_RGBr, g, b {RGB.R = r; RGB.G = g; RGB.B = b; return RGB;} #define UNDEFINED 1 // Theoretically, hue 0 pure red is identical to hue 6 in these transforms. Pure // red always maps to 6 in this implementation. Therefore UNDEFINED can be // defined as 0 in situations where only unsigned numbers are desired. typedef struct {float R, G, B;} RGBType; typedef struct {float H, S, V;} HSVType; HSVType RGB_to_HSV RGBType RGB { // RGB are each on [0, 1]. S and V are returned on [0, 1] and H is // returned on [0, 6]. Exception: H is returned UNDEFINED if S==0. float R = RGB.R, G = RGB.G, B = RGB.B, v, x, f; int i; HSVType HSV; x = minr, G, B; v = maxr, G, B; ifv == x RETURN_HSVUNDEFINED, 0, v; f = R == x? G B : G == x? B R : R G; i = R == x? 3 : G == x? 5 : 1; RETURN_HSVi f /v x, v x/v, v; } http://alvyray.com/papers/hsv2rgb.htm

HSV to RGB RGBType HSV_to_RGB HSVType HSV { // H is given on [0, 6] or UNDEFINED. S and V are given on [0, 1]. // RGB are each returned on [0, 1]. float h = HSV.H, s = HSV.S, v = HSV.V, m, n, f; int i; RGBType RGB; if h == UNDEFINED RETURN_RGBv, v, v; i= floorh; f = h i; if!i&1 f = 1 f; // if iis even m = v * 1 s; n = v * 1 s * f; switch i { case 6: case 0: RETURN_RGBv, n, m; case 1: RETURN_RGBn, v, m; case 2: RETURN_RGBm, v, n case 3: RETURN_RGBm, n, v; case 4: RETURN_RGBn, m, v; case 5: RETURN_RGBv, m, n; } } http://alvyray.com/papers/hsv2rgb.htm http://www.mandelbrot-dazibao.com/hsv/hsv.htm