1 CSCE441: Computer Graphics: Color Models Jinxiang Chai.

Slides:



Advertisements
Similar presentations
13- 1 Chapter 13: Color Processing 。 Color: An important descriptor of the world 。 The world is itself colorless 。 Color is caused by the vision system.
Advertisements

Introduction to Computer Graphics ColorColor. Specifying Color Color perception usually involves three quantities: Hue: Distinguishes between colors like.
Color Image Processing
Achromatic and Colored Light CS 288 9/17/1998 Vic.
Light Light is fundamental for color vision Unless there is a source of light, there is nothing to see! What do we see? We do not see objects, but the.
Fundamentals of Digital Imaging
School of Computing Science Simon Fraser University
CS 4731: Computer Graphics Lecture 24: Color Science
SWE 423: Multimedia Systems Chapter 4: Graphics and Images (2)
© 2002 by Yu Hen Hu 1 ECE533 Digital Image Processing Color Imaging.
CSCE641: Computer Graphics Image Formation Jinxiang Chai.
What is color for?.
Color Representation Lecture 3 CIEXYZ Color Space CIE Chromaticity Space HSL,HSV,LUV,CIELab X Z Y.
COLOR and the human response to light
Display Issues Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
CSc 461/561 CSc 461/561 Multimedia Systems Part A: 2. Image.
CSCE 641: Computer Graphics Image Formation & Plenoptic Function Jinxiang Chai.
1 CSCE441: Computer Graphics: Color Models Jinxiang Chai.
CS559-Computer Graphics Copyright Stephen Chenney Color Recap The physical description of color is as a spectrum: the intensity of light at each wavelength.
Why Care About Color? Accurate color reproduction is commercially valuable - e.g. Kodak yellow, painting a house Color reproduction problems increased.
Color Models AM Radio FM Radio + TV Microwave Infrared Ultraviolet Visible.
9/14/04© University of Wisconsin, CS559 Spring 2004 Last Time Intensity perception – the importance of ratios Dynamic Range – what it means and some of.
Colour Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 6 This presentation © 2004, MacAvon Media Productions Colour.
CS 376 Introduction to Computer Graphics 01 / 26 / 2007 Instructor: Michael Eckmann.
Chapter 6: Color Image Processing Digital Image Processing.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Light and Color Graphics Systems / Computer.
Chapter 3: Colorimetry How to measure or specify color? Color dictionary?
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
CPSC 641: Computer Graphics Image Formation Jinxiang Chai.
Computer Science 631 Lecture 7: Colorspace, local operations
Color. Contents Light and color The visible light spectrum Primary and secondary colors Color spaces –RGB, CMY, YIQ, HLS, CIE –CIE XYZ, CIE xyY and CIE.
Color 2011, Fall. Colorimetry : Definition (1/2) Colorimetry  Light is perceived in the visible band from 380 to 780 nm  distribution of wavelengths.
Color Theory ‣ What is color? ‣ How do we perceive it? ‣ How do we describe and match colors? ‣ Color spaces.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Chapter 2: Color Basics. 2 What is light?  EM wave, radiation  Visible light has a spectrum wavelength from 400 – 780 nm.  Light can be composed.
CSC361/ Digital Media Burg/Wong
1 Light and Color. 2/118 Topics The Human Visual System Displaying Intensity and Luminance Display Using Fixed Intensities Understanding Color Display.
COLORCOLOR Angel 1.4 and 2.4 J. Lindblad
CS6825: Color 2 Light and Color Light is electromagnetic radiation Light is electromagnetic radiation Visible light: nm. range Visible light:
CS 376 Introduction to Computer Graphics 01 / 24 / 2007 Instructor: Michael Eckmann.
Graphics Lecture 4: Slide 1 Interactive Computer Graphics Lecture 4: Colour.
A color model is a specification of a 3D color co-ordinate system and a visible subset in the co-ordinate System within all colors in a particular color.
Introduction to Computer Graphics
Color Models. Color models,cont’d Different meanings of color: painting wavelength of visible light human eye perception.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Raster Graphics and Color Greg Humphreys University of Virginia CS 445, Fall 2003.
1 CSCE441: Computer Graphics: Color Models Jinxiang Chai.
BASIC COLOUR COURSE Algemeen
CS-321 Dr. Mark L. Hornick 1 Color Perception. CS-321 Dr. Mark L. Hornick 2 Color Perception.
David Luebke 1 2/5/2016 Color CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Chapter 4: Color in Image and Video
09/10/02(c) University of Wisconsin, CS559 Fall 2002 Last Time Digital Images –Spatial and Color resolution Color –The physics of color.
Computer Graphics: Achromatic and Coloured Light.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Color Models Light property Color models.
Half Toning Dithering RGB CMYK Models
Color Image Processing
Color Image Processing
Color Image Processing
(c) University of Wisconsin, CS559 Spring 2002
COLOR space Mohiuddin Ahmad.
Color Image Processing
© University of Wisconsin, CS559 Spring 2004
Color Representation Although we can differentiate a hundred different grey-levels, we can easily differentiate thousands of colors.
Color Image Processing
Slides taken from Scott Schaefer
Color Image Processing
Color Model By : Mustafa Salam.
Color Models l Ultraviolet Infrared 10 Microwave 10
Color Theory What is color? How do we perceive it?
Presentation transcript:

1 CSCE441: Computer Graphics: Color Models Jinxiang Chai

2 Scan conversion 3D Rendering pipeline Modeling transformation lighting Viewing transformation Project transformation Clipping Image Transform into 3D world system Illuminate according to lighting and reflectance Transform into 3D camera coordinate system Transform into 2D camera system Clip primitives outside camera’s view Draw pixels (includes texturing, hidden surface, etc.)

3 Scan conversion 3D Rendering pipeline Modeling transformation lighting Viewing transformation Project transformation Clipping Image Transform into 3D world system Illuminate according to lighting and reflectance Transform into 3D camera coordinate system Transform into 2D camera system Clip primitives outside camera’s view Draw pixels (includes texturing, hidden surface, etc.)

4 Light and Colors How to describe light color? Why the same object appears different color under different light? How to model the color of reflected light?

5 Outline Color Models Required readings: HB 19-1 to 19-8

6 Human Vision Model of human vision

7 Human Vision Model of human vision Vision components: Incoming light Human eye

8 Electromagnetic Spectrum Visible light frequencies range between:  Red: 3.8x10 14 hertz (780nm)  Violet: 7.9x10 14 hertz (380nm)

9 Visible Light The human eye can see “visible” light in the frequency between 380nm-780nm redviolet

10 Visible Light The human eye can see “visible” light in the frequency between 380nm-780nm 380nm780nm

11 Visible Light The human eye can see “visible” light in the frequency between 380nm-780nm 380nm780nm - Each frequency value between 380nm-780nm corresponds to a distinct spectral color - Not strict boundary - Some colors are absent (brown, pink)

12 Spectral Energy Distribution Three different types of lights

13 Perception of Object Colors Why does the same object appear different color under different light?

14 Perception of Object Colors When light is incident upon an object, some frequencies are reflected and some are absorbed. The combination of frequencies present in the reflected light determines what we perceive as the color of the object.

15 Questions Why does some object appear black under sunlight? How does the white object appear lit only by blue light? How does the red object appear lit only by blue light?

16 Questions Why does some object appear black under sunlight? Absorb all the frequencies How does the white object appear lit only by blue light? “blue” How does the red object appear lit only by blue light? “black”

17 Spectral Energy Distribution Three different types of lights Can we use spectral energy distribution to represent color?

18 Spectral Energy Distribution Three different types of lights Can we use spectral energy distribution to represent color? - Not really, different distribution might result in the same color (metamers)!

19 Spectral Energy Distribution The six spectra below look the same purple to normal color-vision people

20 Ideal Color Representation Unique – one to one mapping Compact – require minimal number of bits. General – represent all the visible light. Perceptually appropriate – tell us luminance, purity and saturation of color.

21 Color Representation? Why not all ranges of light spectrum are perceived? So how to represent color? 380nm780nm

22 Human Vision Photoreceptor cells in the retina: - Rods - Cones

23 Human Vision Photoreceptor cells in the retina: - Rods - Cones

24 Light Detection: Rods and Cones Rods: -120 million rods in retina -1000X more light sensitive than Cones - Discriminate B/W brightness in low illumination - Short wave-length sensitive Cons: million Cones in the retina - Responsible for high-resolution vision - Discriminate Colors - Three types of color sensors (64% red, 32%, 2% blue) - Sensitive to any combination of three colors

25 Tristimulus of Color Theory Spectral-response functions of each of the three types of cones

26 Tristimulus of Color Theory Spectral-response functions of each of the three types of cones Color matching function based on RGB - any spectral color can be represented as a linear combination of these primary colors

27 Tristimulus Color Theory So, color is psychological - Representing color as a linear combination of red, green, and blue is related to cones, not physics - Most people have the same cones, but there are some people who don’t – the sky might not look blue to them (although they will call it “blue” nonetheless) - But many people (mostly men) are colorblind, missing 1,2 or 3 cones (can buy cheaper TVs)

28 Additive and Subtractive Color RGB color model CMY color model Complementary color models: R=1-C; G = 1-M; B=1-Y; White: [1 1 1] T Green: [0 1 0]; White: [0 0 0] T Green: [1 0 1];

29 RGB Color Space red green blue

30 RGB Color Space red green blue White (1,1,1)

31 RGB Color Space red green blue magenta (1,0,1)

32 RGB Color Space RGB cube  Easy for devices  Can represent all the colors?  But not perceptual  Where is brightness, hue and saturation? red green blue magenta (1,0,1)

33 Tristimulus Since 3 different cones, the space of colors is 3-dimensional. We need a way to describe color within this 3 dimensional space. No finite set of light sources can be combined to display all possible colors. We want something that will let us describe any visible color with additive combination of three primary (imaginary) colors!

34 The CIE XYZ system CIE – Comission Internationale de l’Eclairage - International Commission on Illumination - Sets international standards related to light Defined the XYZ color system as an international standard in 1931 X, Y, and Z are three Primary colors. - imaginary colors - all visible colors can be defined as an additive combination of these three colors. - defines the 3 dimensional color space

35 Color Matching Functions Given an input spectrum,, we want to find the X, Y, Z coordinates for that color. Color matching functions,,, and tell how to weight the spectrum when integrating: Image taken from mmons/8/87/CIE1931_XYZCMF.png

36 XYZ space Any color can be represented in the XYZ space as an additive combination of three primary colors

37 XYZ space The visible colors form a “cone” in XYZ space.  For visible colors, X, Y, Z are all positive.  But, X, Y, and Z themselves are not visible colors! Image taken from /color1/node27.html

38 Luminance and Chromaticity The intensity (luminance) is just X+Y+Z.  Scaling X, Y, Z just increases intensity.  We can separate this from the remaining part, chromaticity. Color = Luminance + Chromaticity  Chromaticity is 2D, Luminance is 1D To help us understand chromaticity, we’ll fix intensity to the X+Y+Z=1 plane.

39 Chromaticity Diagram Project the X+Y+Z=1 slice along the Z-axis Chromaticity is given by the x, y coordinates Image taken from /color1/node27.html

40 Functions of Chromaticity Diagram Determining purity and dominant wave length for a given color Identify complementary colors Compare color gamuts for different primaries Image taken from /color1/node27.html

41 White Point White: at the center of the diagram. Approximation of average daylight Image taken from /color1/node27.html

42 Spectral Colors Visible Spectrum along outside curve Image taken from /color1/node27.html

43 Spectral Colors Visible Spectrum along outside curve Image taken from /color1/node27.html But this is not Spectral color!

44 Saturation/Purity As you move on line from white to edge, you increase the saturation of that color. Royal blue, red: high saturation Carolina blue, pink: low saturation Image taken from /color1/node27.html

45 Saturation/Purity How to compute the purity of this color? Image taken from /color1/node27.html A B C - The ratio between d AB and d AC

46 Hue Hue is the “direction” from white. Combined with saturation, it gives another way to describe color Also called dominant wavelength Image taken from /color1/node27.html

47 Hue What’s the dominant wavelength of this color? Image taken from /color1/node27.html

48 Hue What’s the dominant wavelength of this color? Image taken from /color1/node27.html

49 Hue What’s the dominant wavelength of this color? Image taken from /color1/node27.html

50 Hue What’s the dominant wavelength of this color? Image taken from /color1/node27.html

51 Hue What’s the dominant wavelength of this color? Image taken from /color1/node27.html But this is not a spectral color!

52 Hue What’s the dominant wavelength of this color? Image taken from /color1/node27.html take the compliment by subtracting the spectral dominant wavelength from white light

53 Non-Spectral Colors Non-spectral colors: do not correspond to any wavelength of light.  i.e. not seen in rainbow  e.g. maroon, magenta Image taken from /color1/node27.html

54 If we have two colors, A and B, by varying the relative intensity, we can generate any color on the line between A and B. Combining Two Colors Image taken from /color1/node27.html

55 Complementary Colors Complementary colors are those that will sum to white. The distances to white determine the amounts of each needed to produced white light Image taken from /color1/node27.html

56 Combining Three Colors If we have three colors, A, B, and C, by varying the relative intensity, we can generate any color in the triangle between them. Image taken from /color1/node27.html

57 Gamut Display devices generally have 3 colors (a few have more).  e.g. RGB in monitor The display can therefore display any color created from a combination of those 3. This range of displayable colors is called the gamut of the device.

58 Differing Gamuts Different devices have different gamuts  e.g. differing phosphors So, RGB on one monitor is not the same as RGB on another Image taken from /color1/node27.html

59 Monitor/Print/Scanner Gamut

60 Device Gamuts For monitors, typically have colors in the Red, Green, Blue areas  Helps cover lots of visible spectrum But, not all (in fact, nowhere close to all) of the visible spectrum is ever represented Since all 3 colors are visible, can’t possibly encompass full visible spectrum!

61 Gamuts Red: typical monitor gamut Blue: maximum gamut with 3 phosphors Image taken from /color1/node27.html

62 Color Models CIE’s XYZ system is a standard, but not very intuitive. As we saw with saturation and hue, there’s more than one way to specify a color. A variety of color models have been developed to help with some specifications.

63 RGB Red, Green, Blue Common specifications for most monitors  Tells how much intensity to use for pixels Note: Not standard – RGB means different things for different monitors Generally used in an additive system  Each adds additional light (e.g. phosphor)  Combine all three colors to get white

64 CMY Cyan, Magenta, Yellow Commonly used in printing Generally used in a subtractive system:  Each removes color from reflected light  Combine all three colors to get black Conceptually, [C M Y] = [1 1 1] – [R G B]  Complimentary colors to RGB

65 CMYK Cyan, Magenta, Yellow, Black Comes from printing process – since CMY combine to form black, can replace equal amounts of CMY with Black, saving ink.

66 YIQ / YUV NTSC, PAL standards for broadcast TV Backward compatible to Black and White TV Y is luminance – only part picked up by Black and White Televisions Y is given most bandwith in signal I, Q channels (or U,V) contain chromaticity information

67 HSV Color Model Perceptually appropriate: - Hue: the color type (0-360 deg); angle from the cone - Saturation: the purity of the color (0-100%); how far from the center - Value (luminance): the brightness of color (0-100%); how high up cone Nonlinear transform between the HSV and RGB space - see 592 & 593 in H&B

68 Representing Color Generally, store 3 color channels in equal bits  Not necessary, though, e.g. YIQ  Can sometimes get better mapping of color space for an application by adjusting bits  e.g. 10 bits R, 8 bits G, 6 bits B Color indexing: give each color a numerical identifier, then use that as reference  Good for specifying with a limited palette

69 Outline Color Models Image representation

70 Image Representation An image is a 2D rectilinear array of Pixels - A width * height array where each entry of the array stores a single pixel

71 Displays – Pixels Pixel: the smallest element of picture - Integer position (i,j) - Color information x y (0,0)

72 Image Representation A pixel stores color information Luminance pixels - gray-scale images (intensity images) or bits per pixel Red, green, blue pixels (RGB) - Color images - Each channel: or bits per pixel

73 Image Representation An image is a 2D rectilinear array of Pixels - A width X height array where each entry of the array stores a single pixel - Each pixel stores color information (255,255,255)