Color Models and Color Applications

Slides:



Advertisements
Similar presentations
ECE 472/572 - Digital Image Processing Lecture 10 - Color Image Processing 10/25/11.
Advertisements

2002 by Jim X. Chen: 1 Understand brightness, intensity, eye characteristics, and gamma correction, halftone technology,
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.
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?.
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.
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.
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.
Image Processing Lecture 2 - Gaurav Gupta - Shobhit Niranjan.
CGMB 324: Multimedia System design
Chapter 6: Color Image Processing Digital Image Processing.
1 Color vision and representation S M L.
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. 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.
6. COLOR IMAGE PROCESSING
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
CS6825: Color 2 Light and Color Light is electromagnetic radiation Light is electromagnetic radiation Visible light: nm. range Visible light:
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.
CS654: Digital Image Analysis Lecture 29: Color Image Processing.
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
Color Measurement and Reproduction Eric Dubois. How Can We Specify a Color Numerically? What measurements do we need to take of a colored light to uniquely.
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.
IMAGE PROCESSING COLOR IMAGE PROCESSING
Color Image Processing
Color Image Processing
Color Image Processing
COLOR space Mohiuddin Ahmad.
Chapter 6: Color Image Processing
Color Image Processing
Chapter II Color Theory.
Colour Theory Fundamentals
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
Presentation transcript:

Color Models and Color Applications Topics : Color Fundamentals Chromaticity Diagram Color Models

What is Color ? To see color, three essential elements must be present: light, an illuminated object, and an observer.

Visible Spectrum We perceive electromagnetic energy having wavelengths in the range 400-700 nm as visible light.

Visible light is an electromagnetic wave in the range 400-700 nm Red light Violet light

The color spectrum shows the range of wavelengths of energy that are visible to the human eye. Variation in wavelengths alters the colors we see. As Isaac Newton showed (1666) with his prisms, white light is a mixture of all the colors of the visible spectrum.

Light and Color The frequency ( or mix of frequencies ) of the light determines the color. The amount of light(sheer quantity of photons ) is the intensity.  Three independent quantities are used to describe any particular color. : hue, saturation, and lightness or brightness or intensity. The hue is determined by the dominant wavelength.(the apparent color of the light) When we call an object "red," we are referring to its hue. Hue is determined by the dominant wavelength.

Light and Color The saturation of a color ranges from neutral to brilliant. The circle on the right is a more vivid red than the circle on the left although both have the same hue. The saturation is determined by the excitation purity , and depends on the amount of white light mixed with the hue. A pure hue is fully saturated, i.e. no white light mixed in. Hue and saturation together determine the chromaticity for a given color.

Light and Color Lightness or brightness refers to the amount of light the color reflects or transmits. Finally, the intensity is determined by the actual amount of light, with more light corresponding to more intense colors ( the total light across all frequencies).

Light that has a dominant frequency or set of frequencies is called chromatic. Achromatic light has no color - its only attribute is quantity or intensity. Greylevel is a measure of intensity. The intensity is determined by the energy, and is therefore a physical quantity. On the other hand, brightness is determined by the perception of the color, and is therefore psychological. Given equally intense blue and green, the blue is perceived as much darker than the green. Note also that our perception of intensity is nonlinear, with changes of normalised intensity from 0.1 to 0.11 and from 0.5 to 0.55 being perceived as equal changes in brightness.

Color depends primarily on the reflectance properties of an object Color depends primarily on the reflectance properties of an object. We see those rays that are reflected, while others are absorbed. However, we also must consider the color of the light source, and the nature of human visual system. For example, an object that reflects both red and green will appear green when there is green but no red light illuminating it, and conversely it will appear red in the absence of green light. In pure white light, it will appear yellow (= red + green).

Light and Color When light strikes an object, wavelengths may be reflected, absorbed or transmitted. Colorants can be mixed to control the wavelengths and colors we see.

The photosensitive part of the eye is called the retina The photosensitive part of the eye is called the retina. The retina is largely composed of two types of cells, called rods and cones. Only the cones are responsible for color perception

Light and Our Eyes Light waves that reach the eye stimulate a visual process so complex it's not yet fully understood. Within the retina, cones respond to color hues and brightness. Rods sense only brightness. Three types of cones respond to wavelengths in ways that produce all the colors we see. The cones are sensitive to colored light and the rods are sensitive to achromatic light only.

The Fovea Cones are most densely packed within a region of the eye called the fovea.

Primary colors ( Red, Green, Blue) The response of each type of cone as a function of the wavelength of the incident light is shown in figure. The peaks for each curve are at 440nm (blue), 545nm (green) and 580nm (red). Note that the last two actually peak in the yellow part of the spectrum. Figure : Spectral response curves for each cone type. The peaks for each curve are at 440nm (blue), 545nm (green) and 580nm (red).

Light and Our Eyes The color signal to the brain comes from the response of the 3 cones to the spectra being observed. That is, the signal consists of 3 numbers: R, G, and B A color can be specified as the sum of three colors. So colors form a 3 dimensional vector space. These three hues: red, green, and blue are called primary colors

Standard observer Based upon psychophysical measurements, standard curves have been adopted by the CIE (Commission Internationale de l'Eclairage) as the sensitivity curves for the "typical" observer for the three "pigments" . These are not the actual pigment absorption characteristics found in the "standard" human retina but rather sensitivity curves derived from actual data . This function of wavelength is called the luminance-efficiency function of the eye. For an arbitrary homogeneous region in an image that has an intensity as a function of wavelength (color) given by I(), the three responses are called the tristimulus values:

                                   Color Matching In order to define the perceptual 3D space in a "standard" way, a set of experiments can (and have been) carried by having observers try and match color of a given wavelength, lambda, by mixing three other pure wavelengths, such as R=700nm, G=546nm, and B=436nm in the following example. Note that the phosphorus of color TVs and other CRTs do not emit pure red, green, or blue light of a single wavelength, as is the case for this experiment.

We commonly see colors arrayed in two dimensions We commonly see colors arrayed in two dimensions. This is a useful, but incomplete representation. Colors actually occupy a three-dimensional space.

  L*a*b Color Model Lightness is the third dimension that is not shown in color wheels often used in image editing software A refined CIE model, named CIE L*a*b in 1976 Luminance: L Chrominance: a -- ranges from green to red, b -- ranges from blue to yellow Used by Photoshop

CIE Chromaticity Diagram To measure and predict the appearance of a particular color, we need a way to link perception to numbers and formulas. Scientific color values were established earlier this century by the CIE group. CIE models for defining color space all rely on the same basic numbers.

CIE Chromaticity Diagram In 1931, the CIE defined three standard primaries (X, Y, Z). The Y primary was intentionally chosen to be identical to the luminous-efficiency function of human eyes. The above figure shows the amounts of X, Y, Z needed to exactly reproduce any visible color.

CIE Color Space In order to achieve a representation which uses only positive mixing coefficients, the CIE ("Commission Internationale d'Eclairage") defined three new hypothetical light sources, x, y, and z, which yield positive matching curves: If we are given a spectrum and wish to find the corresponding X, Y, and Z quantities, we can do so by integrating the product of the spectral power and each of the three matching curves over all wavelengths. The weights X,Y,Z form the three-dimensional CIE XYZ space, as shown below.

CIE chromaticity coordinates In 1931, the Commission Internationale de l'Éclairage (CIE) defined three standard primaries, called X, Y and Z, that can be added to form all visible colors. The primary Y was chosen so that its color matching function exactly matches the luminous-efficiency function for the human eye, given by the sum of the three curves2. The chromaticity coordinates which describe the perceived color information are defined as: The red chromaticity coordinate is given by x and the green chromaticity coordinate by y. The tristimulus values are linear in I() and thus the absolute intensity information has been lost in the calculation of the chromaticity coordinates {x,y}. All color distributions, I(), that appear to an observer as having the same color will have the same chromaticity coordinates.

Figure : The CIE Chromaticity Diagram showing all visible colors Figure : The CIE Chromaticity Diagram showing all visible colors. x and y are the normalized amounts of the X and Y primaries present, and hence z = 1 - x - y gives the amount of the Z primary required.

CIE Chromaticity Diagram Often it is convenient to work in a 2D color space. This is commonly done by projecting the 3D color space onto the plane X+Y+Z=1, yielding a CIE chromaticity diagram. The projection is defined as: Giving the chromaticity diagram shown on the right.

CIE Chromaticity Diagram A complete description of a color is typically given with the three values x, y, and Y. The remaining CIE amounts are then calculated as :

Figure : Mixing colors on the chromaticity diagram Figure : Mixing colors on the chromaticity diagram. All colors on the line IJ can be obtained by mixing colors I and J, and all colors in the triangle IJK can be obtained by mixing colors I, J and K.

The formulas for converting from the tristimulus values (X,Y,Z) to the well-known CRT colors (R,G,B) and back are given by: As long as the position of a desired color (X,Y,Z) is inside the phosphor triangle in Figure , the values of R, G, and B as computed by eq. will be positive and can therefore be used to drive a CRT monitor.

CIE Chromaticity Diagram All visible colors are in a "horseshoe" shaped cone in the X-Y-Z space. Consider the plane X+Y+Z=1 and project it onto the X-Y plane, we get the CIE chromaticity diagram as below.

Definitions: Spectrophotometer :A device to measure the spectral energy distribution. It can therefore also provide the CIE xyz tristimulus values. Illuminant C : The point C is plotted for a white-light source known as illuminant C Complementary colors : If the two color sources combine to produce white light, they are referred to as complementary colors ( blue and yellow; red and cyan. For example, colors on segment CD are complementary to the colors on segment CB.

Definitions: *dominant wavelength : The spectral color which can be mixed with white light in order to reproduce the desired color. color B in the above figure is the dominant wavelength for color A. * non-spectral colors : colors not having a dominant wavelength. For example, color E in the above figure.

A color can be specified by its colorimetric values A color can be specified by its colorimetric values. A colorimeter is an instrument that measures color using numbers derived from CIE values.

A spectrophotometer is another instrument for measuring color A spectrophotometer is another instrument for measuring color. It samples wavelengths across the color spectrum

The gamut of colors is all colors that can be reproduced using the three primaries Measuring color allows us to compare the color gamut, or range of colors produced by different methods. We find that color transparency film produces a wide range of colors including some a monitor cannot display.

Digital color printers and printing presses have different color gamuts. They can never capture all the colors in an original transparency, but they can simulate the appearance very successfully if color reproduction is understood and controlled. Color management software, described later, helps transform color from one gamut to another.

Color Models Color models provide a standard way to specify a particular color, by defining a 3D coordinate system, and a subspace that contains all constructible colors within a particular model. Any color that can be specified using a model will correspond to a single point within the subspace it defines. Each color model is oriented towards either specific hardware (RGB,CMY,YIQ), or image processing applications (HSI).

The RGB Color Cube The additive color model used for computer graphics is represented by the RGB color cube, where R, G, and B represent the colors produced by red, green and blue phosphorus, respectively.

The RGB Model This is an additive model, i.e. the colors present in the light add to form new colors, and is appropriate for the mixing of colored light for example. The image on the left of figure shows the additive mixing of red, green and blue primaries to form the three secondary colors yellow (red + green), cyan (blue + green) and magenta (red + blue), and white ((red + green + blue). The RGB model is used for color monitors and most video cameras. The figure on the left shows the additive mixing of red, green and blue primaries to form the three secondary colors yellow (red + green), cyan (blue + green) and magenta (red + blue), and white ((red + green + blue). The figure on the right shows the three subtractive primaries, and their pairwise combinations to form red, green and blue, and finally black by subtracting all three primaries from white.

The RGB Color Cube The color cube sits within the CIE XYZ color space as follows.

RGB Color Model for CRT Displays CRT displays have three phosphors (RGB) which produce a combination of wavelengths when excited with electrons.

CMY Color Model Cyan, Magenta, and Yellow (CMY) are complementary colors of RGB. They can be used as Subtractive Primaries. CMY model is mostly used in printing devices where the color pigments on the paper absorb certain colors (e.g., no red light reflected from cyan ink).

Conversion between RGB and CMY Convert White from (1, 1, 1) in RGB to (0, 0, 0) in CMY: Sometimes, an alternative CMYK model (K stands for Black) is used in color printing (e.g., to produce darker black than simply mixing CMY). K := min (C, M, Y), C := C - K, M := M - K, Y := Y - K.

Color Gamuts The chromaticity diagram can be used to compare the "gamuts" of various possible output devices (i.e., monitors and printers). Note that a color printer cannot reproduce all the colors visible on a color monitor

Color Printing Green paper is green because it reflects green and absorbs other wavelengths. The following table summarizes the properties of the four primary types of printing ink. dye color absorbs reflects cyan red blue and green magenta green blue and red yellow blue red and green black all none To produce blue, one would mix cyan and magenta inks, as they both reflect blue while each absorbing one of green and red. Unfortunately, inks also interact in non-linear ways. This makes the process of converting a given monitor color to an equivalent printer color a challenging problem. Black ink is used to ensure that a high quality black can always be printed, and is often referred to as to K. Printers thus use a CMYK color model.

K = min(C,M,Y) C' = C - K M' = M - K Y' = Y - K Color Conversion To convert from one color gamut to another is a simple procedure. Each phosphor color can be represented by a combination of the CIE XYZ primaries, yielding the following transformation from RGB to CIE XYZ: The transformation yields the color on monitor 2 which is equivalent to a given color on monitor 1. Conversion to-and-from printer gamuts is difficult. A first approximation is as follows: C = 1 - R M = 1 - G Y = 1 – B The fourth color, K, can be used to replace equal amounts of CMY: K = min(C,M,Y) C' = C - K M' = M - K Y' = Y - K

The YIQ (luminance-inphase-quadrature) model is a recoding of RGB for color television, and is a very important model for color image processing. The importance of luminance was discussed . The conversion from RGB to YIQ is given by: The luminance (Y) component contains all the information required for black and white television, and captures our perception of the relative brightness of particular colors. That we perceive green as much lighter than red, and red lighter than blue, is indicated by their respective weights of 0.587, 0.299 and 0.114 in the first row of the conversion matrix above. These weights should be used when converting a color image to greyscale if you want the perception of brightness to remain the same.

The YIQ Model Figure: Image (a) shows a color test pattern, consisting of horizontal stripes of black, blue, green, cyan, red, magenta and yellow, a color ramp with constant intensity, maximal saturation, and hue changing linearly from red through green to blue, and a greyscale ramp from black to white. Image (b) shows the intensity for image (a). Note how much detail is lost. Image (c) shows the luminance. This third image accurately reflects the brightness variations perceived in the original image

The HSI Model As mentioned above, color may be specified by the three quantities hue, saturation and intensity. This is the HSI model, and the entire space of colors that may be specified in this way is shown in figure .

The HSI Model Figure : The HSI model, showing the HSI solid on the left, and the HSI triangle on the right, formed by taking a horizontal slice through the HSI solid at a particular intensity. Hue is measured from red, and saturation is given by distance from the axis. Colors on the surface of the solid are fully saturated, i.e. pure colors, and the greyscale spectrum is on the axis of the solid. For these colors, hue is undefined.

Conversion between the RGB model and the HSI model is quite complicated. See HSICalc.java See ShowColors2.java

Comparison of Three Color Gamuts The gamut of colors is all colors that can be reproduced using the three primaries The Lab gamut covers all colors in visible spectrum The RGB gamut is smaller, hence certain visible colors (e.g. pure yellow, pure cyan) cannot be seen on monitors The CMYK gamut is the smallest (but not a straight subset of the RGB gamut)

True-Color Frame Buffers Each pixel requires at least 3 bytes. One byte for each primary color. Sometimes combined with a look-up table per primary Each pixel can be one of 2^24 colors

Indexed-Color Frame Buffers Each pixel uses one byte Each byte is an index into a color map If the color map is not updated synchronously then Color-map flashing may occurs. Color-map Animations Each pixel may be one of 2^24 colors, but only 256 color be displayed at a time

High-Color Frame Buffers Popular PC/(SVGA) standard Each pixel can be one of 2^15 colors Can exhibit worse quantization effects than Indexed-color Specialty Frame Buffers Non-RGB color models (YUV) or 4-2-2 True color plus an Overlay Older 4-bit per pixel models [I,R,G,B] True-color with a lookup-per-color component

Conclusions color - in computer graphics we use an additive color model * colors are represented using Red, Green, and Blue components * the CRT has a mechanism for displaying these three components * a 24-bit RGB color model uses 8 bits for each of red, green, and blue * the human eye processes color similarly - there are three kinds of cones * RGB color model combines color and intensity information in each component * HSI color model separates intensity from color information * java.awt.Color provides a method to do conversion * HSICalc.java * documentation for RGBtoHSB( ) is online