Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4: Color in Image and Video

Similar presentations


Presentation on theme: "Chapter 4: Color in Image and Video"— Presentation transcript:

1 Chapter 4: Color in Image and Video
SWE 423 – Multimedia System Chapter 4: Color in Image and Video Prepared by: Engr. Karla Malihan

2 Elements of Color

3 Color and Science Color is an essential element of multimedia, used in vector graphics, bitmapped images, video, animation and text. Color science attempts to relate the subjective sensation of color to measurable and reproducible physical phenomena.

4 Light and Spectra Light is an electromagnetic wave. Its color is characterized by the wavelength content of the light. Laser light consists of a single wavelength: e.g., a ruby laser produces a bright, scarlet-red beam. Most light sources produce contributions over many wavelengths. However, humans cannot detect all light, just contributions that fall in the “visible wavelengths”. Short wavelengths produce a blue sensation, long wavelengths produce a red one.

5 Light and Spectra Visible light is an electromagnetic wave in the 400 nm nm range. Most light we see is not one wavelength, it's a combination of many wavelengths. Spectrophotometer: device used to measure visible light, by reflecting light from a diffraction grating (a ruled surface) that spreads out the different wavelengths.

6 Tristimulus Value A spectral power distribution (SPD) is a description of how the intensity of light varies with its wavelength. The tristimulus theory of colour implies that any color can be produces by mixing suitable amounts of three additive primary colours.

7 Tristimulus Value Recommended by the international commission on color standards (Commission Internationale de l’Eclairage) aka CIE, are three monochromatic colors at wavelength 700nm (red), nm (green), and nm (blue). Let k be the amount of k-th primary and k the reference white color needed to produce a color C. Then, k / k is called the tristimulus values of color C.

8 Tristimulus Value Note that some colors have to be added in negative amounts to produce certain colors Which means that these primary sources cannot produce all possible colors!!! Since no set of three primaries can produce all colors, many color coordinate systems exist, each with their own advantages and disadvantages. Example Color Coordinate Systems CIE {X,Y,Z} system with hypothetical primary sources such that all the spectral tristimulum values are positive X: Supersaturated red Y: Green Z: Blue

9 Chromaticity Diagram Colors can be expressed in terms of chromaticity coordinates where X,Y, and Z represent the CIE system

10 A way of representing colors, usually three dimensional.
Color Models Color Space A way of representing colors, usually three dimensional. Examples: RGB, CMYK, HSB, HSL Color Models A way of defining colors mathematically. Examples: RGB, CMYK Color Gamut is a certain complete subset of colors.

11 Two Major Types of Color Models
Additive Color (adding light) describes the situation where color is created by mixing the visible light emitted from differently colored light sources. Computer monitors and televisions are the most common form of additive light Subtractive Color (subtracting light) where light is removed from various part of the visible spectrum to create colors. used in paints and pigments and color filters. Prepared by: Engr. Karla Malihan

12 The science of color measurement is known as colorimetry.
Color Matching The science of color measurement is known as colorimetry. Some laws for color matching Any color can be matched by mixing at most three colored lights The luminance of a color mixture = sum of the luminance of its components Color Addition: If colors A & B match with colors C & D, respectively, then color (A+B) matches color (C+D). Color Subtraction: If color (A+B) matches color (C+D), and color A matches color C, then color B matches color D.

13 Additive Color Mixing When colors combine by adding the color spectra (w.r.t. cones excited). Example color displays that follow this mixing rule: CRT phosphors, multiple projectors aimed at a screen, Polachrome slide film. nm red nm green RGB Model Black + Red = Red Black + Green = Green Black + Blue = Blue Black + Red + Green = Yellow Black + Red + Blue = Magenta Black + Blue + Green = Cyan Black + Red + Green + Blue = White Red and green make… yellow Yellow! nm

14 Additive Color Mixing

15 Subtractive color mixing
When colors combine by multiplying the color spectra (occurs when “mixing paints”). Examples that follow this mixing rule: most photographic films, paint, cascaded optical filters, crayons. nm cyan nm yellow Cyan and yellow (in crayons, called “blue” and yellow) make… Green! green nm

16 Subtractive Color Mixing
Note that blue and yellow is green and not white, as in the additive color mixing White - Red = Cyan White - Green = Magenta White - Blue = Yellow White - Red - Green = Blue White - Red - Blue = Green White - Blue - Green = Red White - Red - Green - Blue = Black

17 RGB Color The RGB color model is an additive primaries in which red, green, and blue light is added together in various ways to reproduce a broad array of colors. In RGB colour, the three primaries are standard shades of red, green and blue. Only colours in the RGB gamut can be represented in this way.

18 RGB Color Any colour is specified as three values (R, G, B) giving the relative proportions of the three primaries. This is often written as a 6-digit hexadecimal number, with R, G and B each being between 0 and 255, so a colour value occupies 24 bits.

19 Perceptual Attributes of Color
Brightness Perceived luminance Hue Attribute we commonly describe as “blue”, “red”, “yellow”, etc. Saturation Human’s impression of how different the color is from an achromatic (white or gray) color. Pastels: dry drawing medium executed with fragile, finger-size sticks.

20 Hue In an RGB color space, hue can be thought of as an angle φ in standard position. To calculate φ, let R, G, B be the color coordinates in RGB space, defined on a scale from zero to one. Then, after obtaining the brightness μ and the saturation σ, the hue could be obtained from Using this formula, φ = 0° [0c] would corresponds to red, while φ = 120° [2π/3c] would correspond to blue, and φ = 240° [4π/3c] would correspond to green.

21 Spectral colors are of high saturation
Pastel colors are of low saturation, whereas spectral colors are of high saturation From Encyclopedia Britannica Online Spectral colors are of high saturation

22 Three-Receptor Model Designing a system that can individually display thousands of colors is very difficult Instead, colors can be reproduced by mixing an appropriate set of three primary colors It has been discovered that there are three different types of cone cells in the human retina. When light falls on the retina, it excites the cone cells. The excitation of different types of cone cells determines the color seen by the observer See for more information on color-blindness the special properties of the human visual system, HVS, make it possible for engineers to design a simplified color display system The cones, each contain a light sensitive pigment which is sensitive over a range of wavelengths (each visible color is a different wavelength from approximately 400 to 700 nm). Color-Blindness: Monchromatic (have rod cells [seeing at night] but one type of cone cells), Dichromatic (have only two types of cones)

23 RGB Color In indexed color, instead of storing 24-bit color value for each pixel, we use an 8-bit value which serves as an index into a color table. The color table contains the palette of colors used in the image.

24 RGB Color Some colors from the original image may be missing from the palette. Dithering can be used to reduce the resulting posterization.

25 CYMK Color Model A subtractive color model, used in color printing,
CMYK refers to the four inks used in some color printing: cyan, magenta, yellow, and key (black). The "K" in CMYK stands for key since in four-color printing cyan, magenta, and yellow printing plates are carefully keyed or aligned with the key of the black key plate The CYM color space is related to the RGB color space by being the inverse of it. The origin of this color space is white and the primary axes of the coordinate system are cyan, yellow, and magenta. The color red in this space is a combination of yellow and magenta, while green is composed of yellow and cyan. Blue is made up of cyan and magenta.

26 CYMK 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).

27 CYMK The CMYK colour gamut, corresponding to easily printable colours, is smaller than the RGB gamut, but some CMYK colours lie outside the RGB gamut.

28 HSL A color can be identified by its hue, saturation and lightness.
HUE – the pure color of light Adding increasing amounts of white creates a sequence of progressively lighter tints of the hue; Adding black creates a sequence of progressively darker shades. Adding different proportions of both creates a range of intermediate tones tending to grey. Tones of a single hue can be arranged two-dimensionally, with lightness increasing upwards, and saturation increasing from left to right.

29 HSL

30 HSL and HSB Hue, saturation, and lightness can be combined into a three-dimensional double cone. Any color can be specified by its H, S and L components. HSB is a variant of HSL, where tones are arranged differently.

31 HSL and HSB Both HSL and HSB are normally distorted into a cylindrical shape, so that they can be presented as color pickers.

32 Channels and Color Correction
The R, G and B components of each pixel can be stored as separate values. The three arrays of values can be treated as greyscale images, called channels. An RGB colour image and its red, green and blue channels

33 Channels and Color Correction
Making adjustments to the channels alters the colors of the image.

34 Channels and Color Correction
The color balance, hue and saturation and color replacement adjustments change the color of the image as a whole. Alpha channels can be treated as additional color channels. Images using other color models can also be separated into channels, which can be processed independently.


Download ppt "Chapter 4: Color in Image and Video"

Similar presentations


Ads by Google