430 likes | 618 Views
CGMB 324: Multimedia System design. Chapter 07: Multimedia Element V – Video Part I – Color Models. Objectives. Upon completing this chapter, you should be able to: understand the characteristics of color describe the color models used in still images, video and animation.
E N D
CGMB 324: Multimedia System design Chapter 07: Multimedia Element V – Video Part I – Color Models
Objectives Upon completing this chapter, you should be able to: • understand the characteristics of color • describe the color models used in still images, video and animation
Introduction To Color • Color is an extremely important part of most visualizations. • Choosing good colors for your visualizations involves understanding their properties and the perceptual characteristics of human vision. • It is also important to understand how computer software assigns colors and various hardware devices interpret those assignments.
The Spectral Basis for Color • Visible light, ultraviolet light, x-rays, TV and radio waves, etc are all forms of electromagnetic energy which travels in waves. • The wavelength of these waves is measured in a tiny unit called the Angstrom, equal to 1 ten billionth of a meter. • Another unit sometimes used to measure wavelength of light waves is nanometers (nm) which are equal to 1 billionth of a meter. • Visible light is an electromagnetic wave in the 700 nm (infrared) and 400 nm (ultraviolet) range
The Spectral Basis for Color • Most light we see is not one wavelength, it's a combination of many wavelengths. • The colors are, from shortest to longest; violet, indigo, blue, green, yellow, orange, red (easily remembered using the word, “vibgyor”). The colors of the wavelengths of visible light
The Human Visual System • Visible light corresponds to an electromagnetic wave that falls into the wavelength range of 380 to 825 nanometers • Human cannot see whatever that is outside this range (the spectrum) • The spectrum is divided into various spectral bands, each band is defined by a range of the wavelengths (or frequency)
The Human Visual System near-infrared Gamma rays ultraviolet microwaves radio waves X-rays visible infrared Wavelength, meters violet blue green yellow orange red Wavelength, nanometers
Human Visual Perception Gamma-ray X-ray
Human Visual Perception infrared ultraviolet
The Electromagnetic Spectrum http://www.ncsu.edu/scivis/lessons/colormodels/color_models2.html
Human Color Perception • Human color recognition depends upon light, objects that reflect light, and the viewer's eyes and brain. • Light entering the eye is converted to neural signals in the retina and sent to the brain via the optic nerve. • The eye reacts to the three additive primary colors of red, green, and blue, and the brain perceives color as a combination of these three signals As with taste, sound, smell, and the other senses, the perception of color also varies from one individual to another. We might perceive a color to be warm, cold, heavy, light, soft, strong, exciting, relaxing, brilliant, or subdued
Human Color Perception • The Human Retina • The eye functions like a camera • Each neuron is either a rod or a cone. Rods are not sensitive to color, but the cones are!
Color Perception • A color can be specified as the sum of three colors. • So colors form a 3 dimensional vector space. • A color image is a 2-D array of (R,G,B) integer triplets. • These triplets encode how much the corresponding phosphor should be excited in devices such as a monitor. Each pixel on the computer monitor is made up of a triad of red, green, and blue phosphors.
Color Characteristics • Colors can be described with: • Hue = color sensation (i.e. the quality of a color as determined by its dominant wavelength) • Saturation = measure of color intensity • Luminance = brightness of lights emitted or reflected by an object
HSL Colour Model white Lightness (shades of grey) saturation GREEN hue zero full RED BLUE black
HSL Colour Model - HUEs • Each individual color in the color wheel is a hue. Hue is the name of the color for instance red, green, navy blue, orange, purple, lavender, turquoise. • When you opened that brand new box of 128 Crayola crayons and read the name on the wrapper of each new color, you were deciding what hue you wanted to use. • It doesn't matter if it is red, maroon, a shade of red, or pink, each one of those names is a hue.
HSL Colour Model - Saturation • Saturation is a measure of a color's pureness and brilliance. The first parrot on the left is at 100% saturation, all colors are brilliant. The middle parrot has a saturation of 50%; the colors are very dull. The third parrot has no saturation, creating a black and white image.
HSL Colour Model • Example of using HSL is “a deep, bright orange” – large intensity (“bright”), a hue of “orange”, and a high value of saturation (“deep”) • Use the example by using RGB, we get R=245, G=110, B=20, which is harder to picture • Because HSL is created based on human perception, various methods are available to transform RGB pixel values into the HSL color space
Color Characteristics • Playing with the hue does strange things to images and video. However, creative use of this function can be beneficial on more than just a technical or aesthetic level, to the overall system. For example, if you really needed a person’s skin to be green.
Color Models • Various Color models: • Chromacity model – produced by CIE (Commission Internationale de l'Eclairage), using 3 dimensional space • RGB model – Red, Green and Blue components • HIS model – Hue, intensity and saturation • CMYKmodel – Cyan, Magenta, Yellow, Black color model is used mainly in printing devices • YUV model – developed by NTSC, • Y = luminance • U,V = chrominance.
RGB Colour Model IR (r,c) IG (r,c) IB (r,c) a. A typical RGB color image can be thought of as three separate images (IR (r,c), (IG (r,c) and (IB (r,c) Blue An (R,G,B) color pixel vector b. A color pixel vector consists of the red, green and blue pixel values (R,G,B) at one given row/column pixel coordinate (r,c) Green Red
RGB Color Model For CRT • RGB color Model For CRT Displays • CRT displays have three phosphors (RGB) which produce a combination of wavelengths when excited with electrons.
RGB Color Model For CRT • The primary colors of pigment are red, yellow and blue • However, different systems apply to the colors that we see on computer screens and the colors that we see in printed media and photographs. • The primary colors of light are red, green (not yellow) and blue, commonly referred to as RGB. • The pigment color system does not apply to computer monitors because colors are created on monitors by adding light.
RGB Color Model For CRT • RGB is an additivecolor system, which means that color is added to a black background. • Black is the absence of light and therefore the absence of color. • Secondary colors, such as cyan, magenta and yellow, are created by combining the primary colors. • The color white is achieved by adding the three primary colors together in equal amounts.
L*a*b (Lab) Color Model • A refined CIE (Commission Internationale de l'Eclairage) model, named CIE L*a*b in 1976 • Luminance:LChrominance: • a-- ranges from greentored, • b -- ranges fromblue to yellow • Used by Photoshop, MS Office etc.
CMYK Color Model • Cyan, Magenta, and Yellow (CMY) are complementary colors of RGB. • They can be used as Subtractive Primaries. • CMYK model is mostly used in printing devices where the color pigments on the paper absorb certain colors • Unlike the additive system, which begins with black and adds color, the subtractive system begins with white and subtracts color. • CMYK is commonly used in printing as most print begins with a white page that reflects white (RGB) light
CMYK Color Model • To reproduce color on the paper, transparent pigments (cyan, magenta and yellow) are used to filter out the RGB wavelengths in various combinations. • In theory, the combination of these three colors should produce black, but the fourth color, black in CMYK, is needed to produce true black. • The secondary colors of the subtractive system are red, green and blue, which happen to be the primary colors of the additive system.
Additive and Subtractive CMYK subtractive primaries RGB Additive primaries
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 the visible spectrum • The RGBgamut 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)
YUV Color Model • YIQ and YUV are the two commonly used color models in video • Initially, for PAL analogue video, it is now also used in the CCIR 601 standard for digital video • YUV uses properties of the human eye to prioritize information
YUV Color Model • Y (luminance) is the CIE Y primary. • Chrominance is defined as the difference between a color and a reference while at the same luminance. • Y is the black and white (luminance) image, • U and V are the color difference (chrominance) images. • YIQ uses similar idea.
Y U V Sample YUV Decomposition The eye is most sensitive to Y. Luminance The color difference images Chrominance
YCbCr Color Model • The YCbCr model is closely related to the YUV, it is a scaled and shifted YUV. • The chrominance values in YCbCr are always in the range of 0 to 1. • YCbCr is used in JPEG and MPEG.
Sample YCbCr Decomposition Cb Luminance Y Cr A color image and the Y, Cb and Cr elements of it. Note that the Y image is essentially a greyscale copy of the main image; that the white snow is represented as a middle value in both Cr and Cb; that the brown barn is represented by weak Cb and strong Cr; that the green grass is represented by weak Cb and weak Cr; and that the blue sky is represented by strong Cb and weak Cr.
YIQ Color Model • YIQ is used in NTSC color TV broadcasting, it is downward compatible with B/W TV where only Y is used. • Although U and V nicely define the color differences, they do not align with the desired human perceptual color sensitivities. • In NTSC, I and Q are used instead.
Sample YIQ Decomposition I Luminance Y Q
Summary • Color images are encoded as triplets of values. • RGB is an additive color model that is used for light-emitting devices, e.g., CRT displays • CMYK is a subtractive color model that is used often for printers • Two common color models in imaging are RGB and CMYK, two common color models in video are YUV and YIQ.
Summary • Besides the hardware-oriented color models (i.e., RGB, CMYK, YUV, YIQ), others, such as HSB (Hue, Saturation, and Brightness) and HLS (Hue, Lightness, and Saturation) are alsoused commonly and can be adjusted using software
References • http://www.experience.epson.com.au/help/understandingcolour/COL_G/ • http://www.ncsu.edu/scivis/lessons/colormodels/color_models2.html