Computer Graphics Si Lu Fall /27/2016

Similar documents
Prof. Feng Liu. Winter /09/2017

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

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

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

Figure 1: Energy Distributions for light

Color Science. CS 4620 Lecture 15

Light. intensity wavelength. Light is electromagnetic waves Laser is light that contains only a narrow spectrum of frequencies

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

Introduction to Color Science (Cont)

Introduction to Computer Vision CSE 152 Lecture 18

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

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

Interactive Computer Graphics

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

LECTURE 07 COLORS IN IMAGES & VIDEO

CS559: Computer Graphics

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

COLOR and the human response to light

COLOR. and the human response to light

Colors in Images & Video

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

Color vision and representation

Prof. Feng Liu. Fall /02/2018

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

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

Continued. Introduction to Computer Vision CSE 252a Lecture 11

Announcements. The appearance of colors

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

Color Image Processing. Gonzales & Woods: Chapter 6

Lecture 8. Color Image Processing

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

University of British Columbia CPSC 414 Computer Graphics

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

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

Capturing Light in man and machine

Capturing Light in man and machine

Color. Bilkent University. CS554 Computer Vision Pinar Duygulu

Vision and color. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Capturing Light in man and machine

excite the cones in the same way.

Digital Image Processing

19. Vision and color

Digital Image Processing

Color , , Computational Photography Fall 2018, Lecture 7

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

Color Cameras: Three kinds of pixels

Frequencies and Color

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

Color , , Computational Photography Fall 2017, Lecture 11

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

Today. Color. Color and light. Color and light. Electromagnetic spectrum 2/7/2011. CS376 Lecture 6: Color 1. What is color?

Introduction. The Spectral Basis for Color

Color Image Processing

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

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

Capturing Light in man and machine

Color images C1 C2 C3

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

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

Color Image Processing

The Principles of Chromatics

Capturing Light in man and machine

Colors in images. Color spaces, perception, mixing, printing, manipulating...

PERCEIVING COLOR. Functions of Color Vision

Color Computer Vision Spring 2018, Lecture 15

Announcements. Color. Last time. Today: Color. Color and light. Review questions

Capturing Light in man and machine. Some figures from Steve Seitz, Steve Palmer, Paul Debevec, and Gonzalez et al.

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

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

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

What is Color. Color is a fundamental attribute of human visual perception.

Visual Imaging and the Electronic Age Color Science

Lecture Color Image Processing. by Shahid Farid

Mahdi Amiri. March Sharif University of Technology

Slide 1. Slide 2. Slide 3. Light and Colour. Sir Isaac Newton The Founder of Colour Science

Multimedia Systems Color Space Mahdi Amiri March 2012 Sharif University of Technology

VC 16/17 TP4 Colour and Noise

Digital Image Processing. Lecture # 8 Color Processing

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

Color Reproduction. Chapter 6

Waitlist. We ll let you know as soon as we can. Biggest issue is TAs

Color. April 16 th, Yong Jae Lee UC Davis

Color April 16 th, 2015

Digital Image Processing Color Models &Processing

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

Chapter 3 Part 2 Color image processing

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

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

Lecture 3: Grey and Color Image Processing

Color. Computer Graphics CMU /15-662

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

IFT3355: Infographie Couleur. Victor Ostromoukhov, Pierre Poulin Dép. I.R.O. Université de Montréal

Color Image Processing. Jen-Chang Liu, Spring 2006

Wireless Communication

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

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

In order to manage and correct color photos, you need to understand a few

Human Vision, Color and Basic Image Processing

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

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

Transcription:

Computer Graphics Si Lu Fall 2017 09/27/2016

Announcement Class mailing list https://groups.google.com/d/forum/cs447-fall-2016 2

Demo Time The Making of Hallelujah with Lytro Immerge https://vimeo.com/213266879 3

Last Time Course introduction Digital images The difference between an image and a display Ways to get them Raster vs. Vector Digital images as discrete representations of reality Human perception in deciding resolution and image depth Homework 1 due Oct. 4 in class 4

Today Color Tri-Chromacy Digital Color 5

About Color So far we have only discussed intensities, so called achromatic light (shades of gray) On the order of 10 color names are widely recognized by English speakers - other languages have fewer/more, but not much more 6

About Color So far we have only discussed intensities, so called achromatic light (shades of gray) On the order of 10 color names are widely recognized by English speakers - other languages have fewer/more, but not much more Accurate color reproduction is commercially valuable - e.g. painting a house, producing artwork E-commerce has accentuated color reproduction issues, as has the creation of digital libraries Color consistency is also important in user interfaces, eg: what you see on the monitor should match the printed version 7

Light and Color The frequency,, of light determines its color Wavelength,, is related: Energy also related Describe incoming light by a spectrum Intensity of light at each frequency A graph of intensity vs. frequency We care about wavelengths in the visible spectrum: between the infra-red (700nm) and the ultra-violet (400nm) 8

Normal Daylight # Photons 400 500 600 700 Wavelength (nm) Note the hump at short wavelengths - the sky is blue

Color and Wavelength 10

Normal Daylight # Photons 400 500 600 700 Wavelength (nm) Note the hump at short wavelengths - the sky is blue

White # Photons White Less Intense White (grey) 400 500 600 700 Wavelength (nm) Note that color and intensity are technically two different things However, in common usage we use color to refer to both White = grey = black in terms of color You will have to use context to extract the meaning 12

Helium Neon Laser # Photons 400 500 600 700 Wavelength (nm) Lasers emit light at a single wavelength, hence they appear colored in a very pure way 13

Tungsten Lightbulb # Photons 400 500 600 700 Wavelength (nm) Most light sources are not anywhere near white It is a major research effort to develop light sources with particular properties

Emission vs. Adsorption Emission is what light sources do Adsorption is what paints, inks, dyes etc. do Emission produces light, adsorption removes light We still talk about spectra, but now is it the proportion of light that is removed at each frequency Note that adsorption depends on such things as the surface finish (glossy, matte) and the substrate (e.g. paper quality) The following examples are qualitative at best 15

Adsorption Spectra 400 500 600 700 Wavelength (nm) 16

Adsorption Spectra: Red Paint 400 500 600 700 Wavelength (nm) Red paint absorbs green and blue wavelengths, and reflects red wavelengths, resulting in you seeing a red appearance 17

Representing Color Our task with digital images is to represent color You probably know that we use three channels: R, G and B We will see why this is perceptually sufficient for display and why it is computationally an approximation First, how we measure color 18

Sensors Any sensor is defined by its response to a frequency distribution Expressed as a graph of sensitivity vs. wavelength, () For each unit of energy at the given wavelength, how much voltage/impulses/whatever the sensor provides To compute the response, take the integral E() is the incoming energy at the particular wavelength ( ) E ( ) d The integral multiplies the amount of energy at each wavelength by the sensitivity at that wavelength, and sums them all up 19

A Red Sensor Sensitivity 400 500 600 700 Wavelength (nm) This sensor will respond to red light, but not to blue light, and a little to green light

The Red Sensor Response Sensor Sensitivity, 400 500 600 700 Sensitivity, 400 500 600 700 Color #photons, E 400 500 600 700 #photons, E 400 500 600 700 21

The Red Sensor Response Sensor Sensitivity, 400 500 600 700 Sensitivity, 400 500 600 700 Color #photons, E Red 400 500 600 700 #photons, E Blue 400 500 600 700 High response Low response 22

Seeing in Color The eye contains rods and cones Rods work at low light levels and do not see color That is, their response depends only on how many photons, not their wavelength Cones come in three types (experimentally and genetically proven), each responds in a different way to frequency distributions

Color receptors Each cone type has a different sensitivity curve Experimentally determined in a variety of ways For instance, the L-cone responds most strongly to red light Response in your eye means nerve cell firings How you interpret those firings is not so simple 24

Color Perception How your brain interprets nerve impulses from your cones is an open area of study, and deeply mysterious Colors may be perceived differently: Affected by other nearby colors Affected by adaptation to previous views Affected by state of mind Experiment: Subject views a colored surface through a hole in a sheet, so that the color looks like a film in space Investigator controls for nearby colors, and state of mind 25

The Same Color? 26

The Same Color? 27

Color Deficiency Some people are missing one type of receptor Most common is red-green color blindness in men Red and green receptor genes are carried on the X chromosome - most red-green color blind men have two red genes or two green genes Other color deficiencies Anomalous trichromacy, Achromatopsia, Macular degeneration Deficiency can be caused by the central nervous system, by optical problems in the eye, injury, or by absent receptors 28

Color Deficiency 29

Today Color Tri-Chromacy Digital Color 30

Recall We re working toward a representation for digital color We have seen that humans have three sensors for color vision Now, the implications 31

Trichromacy Experiment: Show a target color spectrum beside a user controlled color User has knobs that adjust primary sources to set their color Primary sources are just lights with a fixed spectrum and variable intensity Ask the user to match the colors make their light look the same as the target Experiments show that it is possible to match almost all colors using only three primary sources - the principle of trichromacy Sometimes, have to add light to the target In practical terms, this means that if you show someone the right amount of each primary, they will perceive the right color This was how experimentalists knew there were 3 types of cones 32

Trichromacy Means Color Matching: People think these two spectra look the same (monomers) 400 500 600 700 3 Primaries Representing color: If you want people to see the continuous spectrum, you can just show the three primaries (with varying intensities) 33

The Math of Trichromacy Write primaries as R, G and B We won t precisely define them yet 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, or add it using ink 34

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 35

Color Matching Given a spectrum, how do we determine how much each of R, G and B to use to match it? First step: 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 36

The RGB Color Matching Functions 37

Computing the Matching Given a spectrum, 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 38

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 the range of perceptible colors generated by adding some part of each of R, G and B 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 39

RGB Color Space Demo 40

Problems with RGB Can only represent a small range of all the colors humans are capable of perceiving (particularly for monitor 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) Perceptually non-linear 41

CIE XYZ Color Space Imaginary primaries X, Y, Z Y component intended to correspond to intensity Cannot produce the primaries need negative light! Defined in 1931 to describe the full space of perceptible colors Revisions now used by color professionals Color matching functions are everywhere positive Most frequently set x=x/(x+y+z) and y=y/(x+y+z) x,y are coordinates on a constant brightness slice 42

CIE Matching Functions

CIE x, y Note: This is a representation on a projector with limited range, so the correct colors are not being displayed

Standard RGB XYZ X 0.4124 Y 0.2126 Z 0.0193 R 3.2410 G 0.9692 B 0.0556 0.3576 0.7151 0.1192 1.5374 1.8760 0.2040 0.1805R 0.0721 G 0.9505 B 0.4986X 0.0416 Y 1.0570 Z Note that each matrix is the inverse of the other Recall, Y encodes brightness, so the matrix tells us how to go from RGB to grey

Determining Gamuts y G XYZ Gamut RGB Gamut Gamut: The range of colors that can be represented or reproduced Plot the matching coordinates for each primary. eg R, G, B B R x Region contained in triangle (3 primaries) is gamut Really, it s a 3D thing, with the color cube distorted and embedded in the XYZ gamut

Accurate Color Reproduction Device dependent RGB space High quality graphic design applications, and even some monitor software, offers accurate color reproduction A color calibration phase is required: Fix the lighting conditions under which you will use the monitor Fix the brightness and contrast on the monitor Determine the monitor s γ Using a standard color card, match colors on your monitor to colors on the card: This gives you the matrix to convert your monitor s RGB to XYZ Together, this information allows you to accurately reproduce a color specified in XYZ format

More Linear Color Spaces Monitor RGB: primaries are monitor phosphor colors, primaries and color matching functions vary from monitor to monitor srgb: A new color space designed for web graphics YIQ: mainly used in television Y is (approximately) intensity, I, Q are chromatic properties Linear color space; hence there is a matrix that transforms XYZ coords to YIQ coords, and another to take RGB to YIQ

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

HSV Color Space

Next Time Color Quantization Dithering 51

Qualitative Response #photons, E Sensitivity, 400 500 600 700 Sensor Red 400 500 600 700 Light source Multiply E 400 500 600 700 Area under curve? Big response! 52

Qualitative Response Sensitivity, Multiply E #photons, E 400 500 600 Sensor 700 Blue 400 500 600 700 Light source 400 500 600 700 Area under curve? Tiny response! 53