Presentation is loading. Please wait.

Presentation is loading. Please wait.

EEL 5771-001 Introduction to Computer Graphics PPT12: Color models Yamini Bura – U66775501.

Similar presentations


Presentation on theme: "EEL 5771-001 Introduction to Computer Graphics PPT12: Color models Yamini Bura – U66775501."— Presentation transcript:

1 EEL 5771-001 Introduction to Computer Graphics PPT12: Color models Yamini Bura – U66775501

2 N OTHING CAN BE OVERLOOKED THE WAY THAT COLOR CAN !!!

3 Color Color has three essential elements must be present: light an illuminated object and an observer

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

5 W HITE 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.

6 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. Physical mix of opaque paints Primary: RYB Secondary: OGV Neutral: R + Y + B Hue paint Mixing

7 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. Saturation is the purity of the 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).

8 Physiology of Color 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.

9 Physiology of Color 3 cone response curves Luminance efficiency 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.

10 L IGHT AND THE 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

11 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.

12 C OLOR M ODELS 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).

13 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.

14 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.

15 CIE C HROMATICITY COORDINATES 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.

16 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.

17 CIE Color Cone

18 CIE Typical Display Gamut 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

19 CIE Lu * v * and Lab Perceptually Uniform Spaces Lu * v * rescales xyY Lab color opponents

20 CIE Color Matching Functions CIE RGB Matching Functions CIE XYZ Matching Functions

21 RGB Color Wheel Warm/Cool Complements Split Complement Analogous Show RGB Cube

22 T HE RGB C OLOR C UBE 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.

23 T HE RGB M ODEL 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 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 pair wise combinations to form red, green and blue, and finally black by subtracting all three primaries from white.

24 T HE RGB C OLOR C UBE The color cube sits within the CIE XYZ color space as follows.

25 RGB from Spectrum RGB = x d

26 XYZ from Spectrum XYZ = x d

27 RGB C OLOR M ODEL FOR CRT D ISPLAYS CRT displays have three phosphors (RGB) which produce a combination of wavelengths when excited with electrons.

28 CMY C OLOR M ODEL 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).

29 C ONVERSION 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.

30 C OLOR G AMUTS 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

31 C OLOR P RINTING 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 absorb s reflects cyanredblue and green magent a greenblue and red yellowbluered and green blackallnone 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.

32 C OLOR C ONVERSION 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

33 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.

34 T HE YIQ M ODEL 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

35 HSV Color Model HSV is a projection of the RGB space RGB cubeHSV top viewHSV cone

36 HSV Color Model Hue, an angular measure (0 … 360)

37 HSV Color Model Saturation, a fractional measure (0.0 … 1.0)

38 HSV Color Model Value, a fractional measure (0.0 … 1.0)

39 HSV C OLOR M ODEL This color model is based on polar coordinates, not Cartesian coordinates. HSV is a non-linearly transformed (skewed) version of RGB cube Hue: quantity that distinguishes color family, say red from yellow, green from blue Saturation (Chroma): color intensity (strong to weak). Intensity of distinctive hue, or degree of color sensation from that of white or grey Value (luminance): light color or dark color

40 T HE HSI M ODEL 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.

41 T HE HSI M ODEL 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.

42 color is a perceptual phenomenon


Download ppt "EEL 5771-001 Introduction to Computer Graphics PPT12: Color models Yamini Bura – U66775501."

Similar presentations


Ads by Google