Raster Graphics and Color

Slides:



Advertisements
Similar presentations
CS 445 / 645 Introduction to Computer Graphics Lecture 13 Color Color.
Advertisements

Introduction to Computer Graphics ColorColor. Specifying Color Color perception usually involves three quantities: Hue: Distinguishes between colors like.
2002 by Jim X. Chen: 1 Understand brightness, intensity, eye characteristics, and gamma correction, halftone technology,
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.
What is color for?.
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.
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.
Color Models AM Radio FM Radio + TV Microwave Infrared Ultraviolet Visible.
Color & Color Management. Overview I. Color Perception Definition & characteristics of color II. Color Representation RGB, CMYK, XYZ, Lab III. Color Management.
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.
Understanding Colour Colour Models Dr Jimmy Lam Tutorial from Adobe Photoshop CS.
Course Website: Digital Image Processing Colour Image Processing.
Digital Image Processing Colour Image Processing.
CS 376 Introduction to Computer Graphics 01 / 26 / 2007 Instructor: Michael Eckmann.
2001 by Jim X. Chen: 1 The purpose of a color model is to allow convenient specification of colors within some color gamut.
Color Models and Color Applications
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?
Color Color is a psychophysical concept depending both upon the spectral distribution of the radiant energy of the illumination source and the visual sensations.
Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실.
CS 325 Introduction to Computer Graphics 01 / 29 / 2010 Instructor: Michael Eckmann.
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.
CS 445 / 645 Introduction to Computer Graphics Lecture 13 Color Color.
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
COLORCOLOR Angel 1.4 and 2.4 J. Lindblad
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.
Three-Receptor Model Designing a system that can individually display thousands of colors is very difficult Instead, colors can be reproduced by mixing.
1 CSCE441: Computer Graphics: Color Models Jinxiang Chai.
Introduction to Computer Graphics
EEL Introduction to Computer Graphics PPT12: Color models Yamini Bura – U
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.
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
Computer Graphics: Achromatic and Coloured Light.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
COMPUTER GRAPHICS CS 482 – FALL 2016 CHAPTER 28 COLOR COLOR PERCEPTION CHROMATICITY COLOR MODELS COLOR INTERPOLATION.
Color Models Light property Color models.
Half Toning Dithering RGB CMYK Models
Display Issues Ed Angel
Color Image Processing
Color Image Processing
Advanced AV Production
COLOR space Mohiuddin Ahmad.
Chapter 6: Color Image Processing
Color Image Processing
Colour Theory Fundamentals
Introduction to Computer Graphics with WebGL
Color Image Processing
Slides taken from Scott Schaefer
Color Model By : Mustafa Salam.
Color Models l Ultraviolet Infrared 10 Microwave 10
Presentation transcript:

Raster Graphics and Color Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006

Overview Display hardware Raster graphics systems Color models How are images displayed? Raster graphics systems How are imaging systems organized? Color models How can we describe and represent colors? All non-credited images in this slide set are from Wikipedia

Overview Display hardware Raster graphics systems Color models How are images displayed? Raster graphics systems How are imaging systems organized? Color models How can we describe and represent colors?

Display Hardware Video display devices Hard-copy devices Cathode Ray Tube (CRT) Liquid Crystal Display (LCD) Plasma panels Thin-film electroluminescent displays Light-emitting diodes (LED) Hard-copy devices Ink-jet printer Laser printer Film recorder Electrostatic printer Pen plotter

Cathode Ray Tube (CRT) Electron guns Anode connection Electron beams Focusing coils Deflection coils Anode connection Mask for separating beams for RGB part of displayed image Phosphor layer with RGB zones Close-up of the phos-phor-coated inner side of the screen Cathode rays are electron beams emitted by a cathode (negative terminal); the annode is number 5 Emission is by heating the cathode in a vacuum tube – hence the name CRT Image via Wikipedia: http://en.wikipedia.org/wiki/Cathode_ray_tube

Liquid Crystal Display (LCD) Figure 2.16 from H&B

Display Hardware Video display devices Hard-copy devices Cathode Ray Tube (CRT) Liquid Crystal Display (LCD) Plasma panels Thin-film electroluminescent displays Light-emitting diodes (LED) Hard-copy devices Ink-jet printer Laser printer Film recorder Electrostatic printer Pen plotter

Overview Display hardware Raster graphics systems Color models How are images displayed? Raster graphics systems How are imaging systems organized? Color models How can we describe and represent colors?

Raster Graphics Systems I/O Devices System Bus Display Processor CPU System Memory Frame Buffer Video Controller Monitor Figure 2.29 from H&B

Frame Buffer Frame Buffer Figure 1.2 from FvDFH

Frame Buffer Refresh Refresh rate is usually 60-120 Hz for CRTs Figure 1.3 from FvDFH

Direct Color Framebuffer Store the actual intensities of R, G, and B individually in the framebuffer 24 bits per pixel = 8 bits red, 8 bits green, 8 bits blue To make these images: in GIMP, do a decompose (from the image->mode menu). Add a all black layer. Then choose compose (filters->colors), and compose it three times, with the two other layers being black DAC

Red component vs. monochromatic The red component only has the red components of each pixel (duh!) Monochromatic is a gray-scale image that uses another color instead of white

Color Lookup Framebuffer Store indices (usually 8 bits) in framebuffer Display controller looks up the R,G,B values before triggering the electron guns DAC Color indices

Color CRT Figure 2.8 from H&B

Overview Display hardware Raster graphics systems Color models How are images displayed? Raster graphics systems How are imaging systems organized? Color models How can we describe and represent colors?

Specifying Color Color perception usually involves three quantities: Hue: Distinguishes between colors like red, green, blue, etc Saturation: How far the color is from a gray of equal intensity Lightness: The perceived intensity of a reflecting object Sometimes lightness is called brightness if the object is emitting light instead of reflecting it. In order to use color precisely in computer graphics, we need to be able to specify and measure colors.

How Do Artists Do It? Artists often specify color as tints, shades, and tones of saturated (pure) pigments Tint: Adding white to a pure pigment, decreasing saturation Shade: Adding black to a pure pigment, decreasing lightness Tone: Adding white and black to a pure pigment White Pure Color Black Grays Tints Shades Tones

Additive color vs. Subtractive color Additive colors models are used in light Start with black, and add colored light to make your desired shade Subtractive color models are used with paint Start with white, and add colors A given color – red – subtracts away (from the reflected light) any wavelength that is not red Additive color mixing: Subtractive color mixing:

HSV Color Model H S V Color 0 1.0 1.0 Red 120 1.0 1.0 Green 240 1.0 1.0 Blue * 0.0 1.0 White * 0.0 0.5 Gray * * 0.0 Black 60 1.0 1.0 ? 270 0.5 1.0 ? 270 0.0 0.7 ? Figure 15.16&15.17 from H&B

Intuitive Color Spaces HSV is an intuitive color space Corresponds to our perceptual notions of tint, shade, and tone Hue (H) is the angle around the vertical axis Saturation (S) is a value from 0 to 1 indicating how far from the vertical axis the color lies Value (V) is the height of the “hexcone”

Precise Color Specifications Pigment-mixing is subjective --- depends on human observer, surrounding colors, lighting of the environment, etc We need an objective color specification Light is electromagnetic energy in the 400 to 700 nm wavelength range Dominant wavelength is the wavelength of the color we “see” Excitation purity is the proportion of pure colored light to white light Luminance is the amount (or intensity) of the light

Electromagnetic Spectrum Visible light frequencies range between ... Red = 4.3 x 1014 hertz (700nm) Violet = 7.5 x 1014 hertz (400nm) Figures 15.1 from H&B

Visible Light Hue = dominant frequency (highest peak) Saturation = excitation purity (ratio of highest to rest) Lightness = luminance (area under curve) White Light Orange Light Figures 15.3-4 from H&B

Color Matching In order to match a color, we can adjust the brightness of 3 overlapping primaries until the two colors look the same. C = color to be matched RGB = laser sources (R=700nm, G=546nm, B=435nm) Humans have trichromatic color vision C = R + G + B C + R = G + B B R G C

Linear Color Matching Grassman’s Laws: Scaling the color and the primaries by the same factor preserves the match: 2C = 2R + 2G + 2B To match a color formed by adding two colors, add the primaries for each color C1 + C2 = (R1 + R2) + (G1 + G2) + (B1 + B2)

RGB Spectral Colors Match each pure color in the visible spectrum (rainbow) Record the color coordinates as a function of wavelength ?

Perception of color intensities Which shade of gray is half-way between white and black? It’s the second one Humans perceive color intensity (and sound, etc.) on a logarithmic scale The first one is (about) 3/4 lit We perceive it as 1/2 lit The second one is 1/2 lit We perceive it as 1/4 lit That exponent is called gamma () 2.0 is a sample value for a CRT or LCD monitor

Human Color Vision Humans have 3 light sensitive pigments in their cones, called L, M, and S The cones respond to different lights: L to red M to green S to blue This leads to metamerism “Tristimulus” color theory Green is picked up by all the cones, so it’s the most vivid Note the vertical axis -- amount of light absorbed – is realtive to the cone itself S cones need to absorb much less light to hit 100% Metamerism is when colors match under one condition (a given light source), but not another

Just Noticeable Differences The human eye can distinguish hundreds of thousands of different colors When two colors differ only in hue, the wavelength between just noticeably different colors varies with the wavelength! More than 10 nm at the extremes of the spectrum Less than 2 nm around blue and yellow Most JND hues are within 4 nm. Altogether, the eye can distinguish about 128 fully saturated hues Human eyes are less sensitive to hue changes in less saturated light (not a surprise)

Luminance Compare color source to a gray source Luminance Y = .30R + .59G + .11B Color signal on a black and white TV

Chromaticity and the CIE Negative spectral matching functions? Some colors cannot be represented by RGB Enter the CIE Three new standard primaries called X, Y, and Z Y has a spectral matching function exactly equal to the human response to luminance

XYZ Matching Functions Match all visible colors with only positive weights Y matches luminance These functions are defined tabularly at 1-nm intervals Linear combinations of the R,G,B matching functions

CIE Color Space

Spectral Locus Human perceptual gamut The cone keeps going towards the right Brightness (not whiteness!) keeps increasing From http://pages.infinit.net/graxx/Theorie4.html

recover the X,Y,Z coordinates Chromaticity Diagram Converting from RGB to XYZ is a snap: Given x, y, and Y, we can recover the X,Y,Z coordinates

Measuring Color Colorimeters measure the X, Y, and Z values for any color A line between the “white point” of the chromaticity diagram and the measured color intersects the horseshoe curve at exactly the dominant wavelength of the measured color A ratio of lengths will give the excitation purity of the color Complementary colors are two colors that mix to produce pure white Some colors are non-spectral --- their dominant wavelength is defined as the same as their complimentary color, with a “c” on the end

Gamuts

Gamut problems Monitor gamuts are RGB Printer gamuts are CMYK Each can display colors the other cannot

A Problem With XYZ Colors If we have two colors C1 and C2, and we add C to both of them, the differences between the original and new colors will not be perceived to be equal C1: C2: This is due to the variation of the just noticeable differences in saturated hues XYZ space is not perceptually uniform LUV space was created to address this problem add green add green

The RGB Color Model This is the model used in color CRT monitors RGB are additive primaries We can represent this space as a unit cube: From http://ian-albert.com/graphics/rgb.php

More on RGB The color gamut covered by the RGB model is determined by the chromaticites of the three phosphors To convert a color from the gamut of one monitor to the gamut of another, we first measure the chromaticities of the phosphors Then, convert the color to XYZ space, and finally to the gamut of the second monitor We can do this all with a single matrix multiply

The CMY Color Model Cyan, magenta, and yellow are the complements of red, green, and blue We can use them as filters to subtract from white The space is the same as RGB except the origin is white instead of black This is useful for hardcopy devices like laser printers If you put cyan ink on the page, no red light is reflected

CMYK Most printers actually add a fourth color, black Use black in place of equal amounts of C, M, and Y Why? Black ink is darker than mixing C, M, and Y Black ink is cheaper than colored ink

CMY vs CMYK You can create (more or less) any color with each gamut Colored printer ink is more expensive Notice how much less CMY is needed in the CMYK version One of the reasons printers use CMYK And color mixing…

The YIQ Color Model YIQ is used to encode television signals Y is the CIE Y primary, not yellow Y is luminance, so I and Q encode the chromaticity of the color If we just throw I and Q away, we have black and white TV This assumes known chromaticities for your monitor Backwards compatibility with black and white TV More bandwidth can be assigned to Y

HSV color space aside Consider a HSV picture space: Blue and red are at right angles to each other Thus, with 2 coordinates, you can define any saturation/hue combination Let’s call the blue axis Cb It defines the blue/yellow combination And the red axis Cr It defines the red/cyan combination

The YCbCr Color Model Y is luma (similar to luminance) The brightness of a pixel Cb and Cr define the chrominance Meaning they each define saturation and hue Cb is the blue chroma, Cr is the red From the last slide Notice the murkiness of the Cr and Cb components The human eye does not notice differences in them nearly as much

JPEG Image Compression Take an image in the (r,g,b) color space Assume it’s 8 bits per image (24 bits total) Convert it to YCbCr Also 8 bits per image Downsample Cb and Cr to fewer bits Let’s say 4 bits (24 = 16) So it can have values 0, 15, 31, 47, … 255 Each pixel now takes up 16 bits 8 for Y, 4 for Cb and 4 for Cr Then do some other magic (including zip-like compression) And you have a (lossy) compressed image

Future of color displays Future color displays may have more pixels RGB plus yellow, cyan, etc. Will allow much more vivid color A greater gamut of color possibilities Note that both the pictures on the right are being displayed by an RGB output device…

Photo printers Photo printers use many ink colors for rich, vivid color Also a scam to sell you more ink (the razor business model)