<<

EEL – 5771-001 INTRODUCTION TO COMPUTER GRAPHICS Models

Team Leila: Sudarshan Sampathkumar - U18860148 Md Sadman Sakib - U13611582 Raja Aravind Pulagam - U54815598 Team Contributions

● Sudarshan Sampathkumar - Color, Spectral Color, Color Frequency band, , frequency, period, wavelength, Color of objects, color of light, Energy distribution of light, Energy distribution of dominant frequency, Primary and complementary , and color matching functions, Primary and , Color mixing and color matching functions, Generating and Artist’s ● Raja Aravind Pulagam - CIE Color Models, Math and Charts, Diagram, Displayable colors, RGB - Tristimulus theory of vision, Color cube, RGB color ● Md. Sadman Sakib - YIQ Color Model, Conversion between RGB and YIQ, CMY Color Model, Conversion to RGB, CMYK color model, conversion to RGB, HSV Color Model, Generating tones with , value and saturation, Conversion to other models, HLS Color Model Properties Of Light

● A color is a property possessed by an object of producing different sensations on the eye as a result of the way the object reflects or emits light. ● A spectral color is a color that is evoked in a typical human by a single wavelength of light in the , or by a relatively narrow band of wavelengths, also known as monochromatic light. Properties Of Light

● As a form of electromagnetic radiation, light has properties in common with both waves and particles. ● Any given beam of light has specific values of frequency, wavelength, and energy associated with it. ● Frequency, which is the number of waves passing a fixed point in space in a unit of time, is commonly expressed in units of hertz (1 Hz = 1 cycle per second). ● Wavelength is the distance between corresponding points of two consecutive waves and is often expressed in units of metres—for instance, nanometres (1 nm = 10−9 metre). Properties Of Light - Frequency

● The frequency is the number of waves that pass a point in space during any time interval, usually one second. We measure it in units of cycles (waves) per second, or hertz ● The frequency of visible light is referred to as color, and ranges from 430 trillion hertz, seen as , to 750 trillion hertz, seen as . ● Frequency = Speed of Light/ Wavelength ● Frequency is always denoted by `f`. Properties of Light - Wavelength

● Wavelength is defined as the property of a wave in which the distance between the identical points between the two successive waves are calculated. ● It is denoted by the Greek letter lambda (λ). Therefore, the distance between either one crest or trough of one wave and the next wave is known as wavelength. Color of an Object

● The ‘colour’ of an object is the wavelengths of light that it reflects. This is determined by the arrangement of electrons in the atoms of that substance that will absorb and re-emit photons of particular energies according to complicated quantum laws. ● So tomatoes are red because the atoms in the skin absorb photons of all energies except those that correspond to red wavelengths of light, which they reflect back to one’s eye. Color of Light

● Visible light may be a tiny part of the , but there are still many variations of wavelengths. ● On one end of the spectrum is red light, with the longest wavelength. or violet light has the shortest wavelength. ● White light is a combination of all colors in the color spectrum. It has all the colors of the . Combining primary colors of light like red, blue, and creates secondary colors: , , and . Energy distribution of Light

● In radiometry, photometry, and color science, a spectral power distribution (SPD) measurement describes the power per unit area per unit wavelength of an illumination (radiant exitance). ● The spectral power distribution over the visible spectrum from a source can have varying concentrations of relative SPDs. The interactions between light and matter affect the absorption and reflectance properties of materials and subsequently produces a color that varies with source illumination. Energy distribution of Light

● A light beam never has exactly one frequency. Even a single bit of light (a photon) never has exactly one frequency. It is fundamentally impossible for a photon to have exactly one frequency. ● Certain beams of light, such as laser beams, can get very close to having one frequency, but can never have exactly one frequency. ● Even a monochromatic wave contains a spread of frequencies because of its finite lifetime. Color Model

● Primary colors include red, blue and green. Primary colors cannot be mixed from other colors. They are the source of all other colors ● For subtractive combination of colors, as in mixing of or for printing, the CMYK of primaries is often used. In this system the primary colors are cyan, magenta,and yellow. ● For additive combination of colors, as in overlapping projected or in television and computer screens, the primary colors normally used are red, green, and blue. Color Model

● A is a color made by mixing of two primary colors in a given . ● , green, and violet ()—are created by mixing two of the primary colors together in equal measure. Orange consists of red plus yellow. Green consists of yellow plus blue. Purple consists of red plus blue. Color Model

● Complementary colors are pairs of colors which, when combined or mixed, cancel each other out (lose hue) by producing a color like white or . ● At the heart of , complementary colors are the opposite on the . In their most basic form, they are one and the secondary color that is created by mixing the other two primaries. For instance, the complementary color to yellow is purple, which is a mix of blue and red. ● One other thing you will notice is that a pair of complementary colors is made up of one cool color and one warm color. Orange, , and are the warm colors, while , , and are the cool colors. Color Models - Color Mixing

, or "additive mixing", is a property of a color model that predicts the appearance of colors made by coincident component lights, i.e. the perceived color can be predicted by summing the numeric representations of the component colors. ● Additive color models are applied in the design and testing of electronic displays that are used to render realistic images containing diverse sets of color using phosphors that emit light of a limited set of primary colors. Color Models - Color Mixing

, or "subtractive color mixing", predicts the spectral power distribution of light after it passes through successive layers of partially absorbing media. ● This idealized model is the essential principle of how dyes and inks are used in and where the of color is elicited after white light passes through microscopic "stacks" of partially absorbing media allowing some wavelengths of light to reach the eye and not others. Color Models - Color Matching

● The CIE 1931 color spaces are the first defined quantitative links between distributions of wavelengths in the electromagnetic visible spectrum, and physiologically perceived colors in human . ● The mathematical relationships that define these color spaces are essential tools for , important when dealing with color inks, illuminated displays, and recording devices such as digital . ● The CIE 1931 RGB color space and CIE 1931 XYZ color space were created by the International Commission on Illumination (CIE) in 1931. Color Matching functions

● The CIE's color matching functions x(̄ ƛ), ȳ(ƛ) and z(̅ ƛ) are the numerical description of the chromatic response of the observer (described above). They can be of as the curves of three linear light detectors yielding the CIE tristimulus values X, Y and Z. Collectively, these three functions describe the CIE standard observer. ● Table lookup can become impractical for some computational tasks. Instead of referring to the published table, the CIE XYZ color matching functions can be approximated by a sum of Gaussian functions as follows: Analytical Approximation

Let g(x) denote a piecewise-Gaussian function, defined by

That is, g(x) resembles a bell curve with its peak at x = μ, a spread/standard deviation of σ1 to the left of the mean, spread of σ2 to the right of the mean, and scaling parameter α. With the wavelength λ measured in angstroms, we then approximate the 1931 color matching functions as follows: Tints

● A tint is created when you add white to a color and lighten it. It is also sometimes called a color. Tints can range from nearly the full saturation of the hue to practically white. ● Tinting a color also desaturates the hue, making it less intense. Red when tinted becomes . Blue when tinted becomes "." Tints, or pastels, are often thought of as calmer and quieter colors and are often used for newborn apparel and accessories. ● Tints, or pastels, are often thought of as calmer and quieter colors and are often used for newborn apparel and accessories. Shades

● A shade is created when you add black to a color and darken it. Just as with tints, you can add black to any of the twelve hues of the color wheel or to any combination of hues of the color wheel to create shades of that hue by adding various amounts of black. ● Shades can range from a barely shaded pure hue to a deep black color that is in the color family of the original hue. ● A chromatic black, or black made by mixing other colors together, can generally be made by mixing together the darkest hues of complementary colors. Color Schemes

● A color scheme is used to describe the overall selection of colors in an artwork. The major color schemes in art are analogous, complementary, split-complementary, triadic, rectangular and monochromatic. ● These color schemes utilize colors at certain locations on the color wheel. ● Color is not so simple that you can just apply a color scheme and everything will work out. Analogous Color Schemes

● An analogous color scheme uses colors which are next to each other on the color wheel. For example, blues and greens, or oranges and yellows. These colors have a close relationship with each other. ● While neutrals can be added in as well, two of the shades involved will be a primary color (red, blue, and yellow, for those who need a refresher) and the third will be a mix of the two. Complementary Color Schemes

● Complementary colors are opposite each other on the color wheel. When placed next to each other, there is an extremely strong contrasting and vibrant effect. ● If overused, an art may become jarring and uncomfortable to look at. Split Complementary Color Scheme

● A split-complementary color scheme utilizes a base color and two secondary colors. It is similar to the complementary color scheme, but one of the complements is split. ● In this case, blue is matched up with yellow and orange red. Orange is the direct complement to blue and orange red and yellow are the analogs to orange. Triadic Color Scheme

● A triadic color scheme utilizes colors which are evenly spaced on the color wheel. ● All three colors are distributed evenly around the color wheel, causing there is no clear dominance of one color. ● The scheme is always vibrant and colorful, designers should use it and balance very carefully to maintain the desired effects and color meaning. Rectangular Color Scheme

● A rectangular color scheme utilizes four colors positioned around the color wheel in the shape of a rectangle. This is a tricky color scheme to manage, as there are four colors involved. ● This scheme works best if one color is dominant. Warm and cool colors should also be balanced in the design. Scheme

● A monochromatic color scheme utilizes just one color with varying levels of saturation and value. ● These color strategies are formed with various color shades, complexion and tones of a particular shade of color. ● These schemes are quite easy to design and since these colors are of the same shades, at times it creates a harsh scheme. CIE Color Model

● The CIE color model is a mapping system that uses tristimulus (a combination of 3 color values that are close to red/green/blue) values, which are plotted on a 3D space. ● When these values are combined, they can reproduce any color that a can perceive. ● The CIE specification is supposed to be able to accurately represent every single color the human eye can perceive. The XYZ Color Model

● The set of CIE primaries is generally referred to as the XYZ color model, where parameters X, Y, and Z represent the amount of each CIE primary needed to produce a selected color. ● Thus, a color is described with the XYZ model in the same way that we described a color using the RGB model. The XYZ Color Model

● The XYZ Color Model

● The XYZ Color Model

Normalized XYZ Values ● In discussing color properties, it is convenient to normalize the amounts in Equations in the last slide against the sum X + Y + Z, which represents the total light energy. Normalized amounts are thus calculated as

● Because x+ y+z = 1, any color can be represented with just the x and y amounts. Also, we have normalized against total energy, so parameters x and y depend only on hue and purity and are called the chromaticity values. Chromaticity Diagram

● When we plot the normalized amounts x and y for colors in the visible spectrum, we obtain the tongue- shaped curve shown in Figure. ● This curve is called the CIE chromaticity diagram. Points along the curve are the spectral colors (pure colors). The line joining the red and violet spectral points, referred to as the purple line, is not part of the spectrum. Interior points represent all possible visible color combinations. Point C in the diagram corresponds to the white-light position. Actually, this point is plotted for a white light source known as illuminant C, which is used as a standard approximation for average daylight. Chromaticity Diagram

● The CIE 1931 color space chromaticity diagram. The outer curved boundary is the spectral (or monochromatic) locus, with wavelengths shown in nanometers. ● Since the human eye has three types of color sensors that respond to different ranges of wavelengths, a full plot of all visible colors is a three-dimensional figure. However, the concept of color can be divided into two parts: and chromaticity. Color

● We identify color gamuts on the chromaticity diagram as straight-line segments or polygon regions. All colors along the straight line joining points C1 and C2 in the Figure can be obtained by mixing appropriate amounts of the colors C1 and C2. ● If a greater proportion of C1 is used, the resultant color is closer to C1 than to C2 . The color gamut for three points, such C3, C4, and C5 in the Figure, is a triangle with vertices at the three color positions. These three primaries can generate only the colors inside or on the bounding edges of the triangle. Color Gamuts

● Thus, the chromaticity diagram helps us to understand why no set of three primaries can be additively combined to generate all colors, because no triangle within the diagram can encompass all colors. ● Color gamuts for video monitors and hard-copy devices are compared conveniently on the chromaticity diagram. ● No three primaries can reproduce human vision Complementary Colors

● Colors that can be mixed to produce white light (e.g red and cyan) ● Because the color gamut for two points is a straight line, complementary colors must be represented on the chromaticity diagram as two points on opposite sides of C and collinear with C, as shown in Figure ● The distances of the two colors C1 and C2 to C determine the amounts of each needed to produce white light. Complementary Colors

● We can also say if a C1 + (1 − a ) C2 = white, then C1 and C2 are complementary colors, i.e. they lie on the opposite sides of white.

● For example, In the figure we can say that D and E are complementary colors Color Purity

● Color Purity

● For a color point such as C1 in this Figure, we determine the purity as the relative distance of C1 from C along the straight line joining C to Cs. ● If dc1 denotes the distance from C to C1 and dcs is the distance from C to Cs, we can represent purity as the ratio dc1/dcs. ● Color C1 in this figure is about 25 percent pure, because it is situated at about one-fourth the total distance from C to Cs. ● At position Cs, the color point would be 100 percent pure. RGB Model

● According to the tristimulus theory of vision, our eyes perceive color through the stimulation of three visual pigments in the cones of the retina. One of the pigments is most sensitive to light with a wavelength of about 630 nm (red), another has its peak sensitivity at about 530 nm (green), and the third pigment is most receptive to light with a wavelength of about 450 nm (blue). By comparing intensities in a light source, we perceive the color of the light. This theory of vision is the basis for displaying color output on a video monitor using the three primaries red, green, and blue, which is referred to as the RGB color model. RGB Model

● We can represent this model using the unit cube defined on R, G, and B axes. The origin represents black and the diagonally opposite vertex, with coordinates (1, 1, 1), is white. Vertices of the cube on the axes represent the primary colors, and the remaining vertices are the complementary color points for each of the primary colors.

● Diagram: The RGB color model. Any color within the unit cube can be described as an additive combination of the three primary colors. RGB Model YIQ color model

● Used for US color-TV broadcasting

● A recoding of RGB for transmission efficiency and for downward compatibility with black-and-white television

● The primary goals of the system were to provide a signal that could be directly displayed by TVs, while also providing easy coding and decoding of RGB signals.

● YIQ ○ Y: ○ I, Q: chromaticity

● Only Y shown in black-and-white TV

● Y is said to convey the luminance information and is transmitted on a separate carrier signal from the chromaticity components, I and Q. Conversion between YIQ and RGB

RGB to YIQ

YIQ to RGB CMY color model

● C: Cyan, M: Magenta, Y: Yellow

● Used for hardcopy devices such as color printers

● CMY is arranged in a 3D Cartesian coordinate system

● All colors that can be generated are represented by the unit cube in the 3D Cartesian coordinate system

● Color specified by what is subtracted from white light

● Cyan absorbs red, magenta absorbs green, and yellow absorbs blue Conversion between CMY and RGB CMYK color model

● The abbreviation CMYK represents Cyan-Magenta-Yellow plus the black component Key.

● This four-colour basis forms the foundation of four-colour-printing. Cyan-yellow produces green, red comes from magenta-yellow, cyan-magenta leads to blue. The resulting secondary colour is darker, brightness is reduced.

● CMY only produce an impure black, K introduces contrast and ensures a pure black.

● Given C, M, and Y K = min(C, M, Y) C = C – K M = M – K Y = Y – K CMYK applications Conversion from RGB to CMYK Conversion from CMYK to RGB HSV color model

● While RGB, YIQ and CMY color models have their application in hardware implementations, the HSV color model is based on properties of human perception. Its application is for human interfaces.

● The HSV color model also consists of 3 channels:

○ H: When perceiving a color, we perceive the . This is represented by the hue (H).

○ S: The purity of a color is measured by the amount of frequencies in the light. The smaller the frequency spectrum, the purer the color. This is represented by the saturation (S).

○ V: The maximum amplitude of the light is given at its dominant wavelength. It represents the energy of the light given in form of its value (V).

● Also known as HSB, where B is brightness HSV color model

● Cylinder coordinate system

● (h, s, v), where h ∈ [0, 360) and s, v ∈ [0, 1] ○ hue: angle round the hexagon ○ saturation: distance from the center ○ value: axis through the center Conversion from RGB to HSV Conversion from HSV to RGB HSL color model

● HSL: Hue, Saturation and

● Graphically, the HSV model is represented by a cone while the HSL model is represented by a double cone (bi-cone).

● The main advantage of HSL is that it makes it easy to select a color quickly – otherwise, users would have to painstakingly adjust and tweak RGB sliders until they get the color just right. HSL example Conversion from RGB to HSL Conversion from HSL to RGB