MULTIMEDIA TECHNOLOGIES LECTURE 07 COLORS IN IMAGES & VIDEO IMRAN IHSAN ASSISTANT PROFESSOR
LIGHT AND SPECTRA Visible light is an electromagnetic wave in the 400nm 700 nm range. The eye is basically similar to a camera Human eyes have two types of sensor cells: Rods Cones Sensitive to intensity Insensitive to colour Respond to colours Three types (red, green and blue) respond to different wavelengths of light. 2
CONES AND PERCEPTION Cones come in 3 types: red, green and blue. This leads to tri-stimulus theory that any color can be specified by 3 values. The following figure shows the spectral sensitivity functions of the cones and the luminousefficiency function of the human eye. 3
COLOR MODELS A color model (or color space) is a way of representing colors and their relationship to each other. Example: How do you call/describe the following green colours? Is one model (RGB) enough? Why do we need different models? 4
COLOR SPACE Different image processing systems use different color models for different reasons. The color picture publishing industry uses the CMYK color model (explained later). Color CRT monitors and most computer graphics systems use the RGB color model. The range of colors that can be represented by a color model is known as a color space. 5
RGB MODEL (RED, GREEN, BLUE) The RGB color space consists of the three additive primaries: red, green, and blue. Mixing of different coloured lights gives different colours : Red + green produces yellow. Green + blue produces cyan. Red + blue produces magenta. 6
RGB MODEL (RED, GREEN, BLUE) The RGB model is represented by a 3-dimensional cube with red green and blue at the corners on each axis. Black is at the origin. White is at the opposite end of the cube. Typical color scheme used in graphics programming, image files, HTML etc. In a 24-bit color graphics system with 8 bits per color channel, R, G, B values typically all from 0-255 (so stored in 1 byte) Examples: orange is R=255 G=135 B=75 or (255, 135, 75) red is (255,0,0). 7
COLOUR DEPTH Color depth refers to number of bits used to represent a color value. 8-bit : 256 colours 24-bit colour depth 8
GRAYSCALE A grayscale image is formed by only using points in the RGB color space where R=G=B; i.e. diagonal in the RGB color cube from black to white. To convert an image from RGB color to grayscale, use grayscale intensity = (0.299R + 0.587G + 0.114B) / 3. 9
CMYK MODEL CMYK stands for Cyan, Magenta, Yellow, black -- the four colors that make up the standard printing process. The CMYK color model is a subtractive model. 10
CMYK MODEL Why the fourth color black is needed? Three primary colors, cyan, magenta, and yellow cannot produce a rich black, only a brownish color, so black ink is added as a fourth colour. Original full color photograph CMYK inks printed in a dot structure 11
HSV MODEL HSV stands for Hue, Saturation, and Value, and it uses these three concepts to describe a color. HSV is also HSB called (B for Brightness). You'll encounter it most often in illustration and image editing programs. Hue Hue is what most people think of when we say "color". Saturation Saturation is the "purity" of the color. It refers to the amount of gray paint mixed with the hue. Fully saturated colors are rich and bright. Less saturated colors look muddier, or less pure. 12
HSV MODEL Value (Brightness) Value refers to the intensity of light present. When light is at its fullest intensity, colors will become bright, at its least intensity, colors become dim. Unlike saturation, there isn't necessarily "less" of the color -- it is just not as intense. Varying saturation, with brightness held constant Varying brightness, with saturation held constant 13
HSV MODEL Artists sometimes prefer to use the HSV color model over alternative models such as RGB or CMYK, because of its similarities to the way humans tend to perceive color. What color is it? How intense is it? How light or dark is it? Example - PowerPoint 14
THE COLOUR WHEEL Colour wheel - a popular representation of choosing colours. All the colours (hues) arranged in a circle Primaries equally spaced. Colours 180º apart complement each other Colours at 90º clash - don t use them Can use this to specify HSV. Hue = angle round the circle Saturation = distance from centre Brightness (V) = Gradation of centre grey shade Note: The artist color wheel uses RYB model. For computer display and printing, our discussion will base on the RGB model. 15
FOUR COLOR-HARMONY SCHEMES The harmonious color combinations are called color schemes. There are 4 classic color schemes: Monochromatic Complementary Analogous Triadic 16
MONOCHROMATIC COLOR SCHEME Monochromatic: colors of same or similar hue, differing in brightness and/or saturation The monochromatic scheme is easy to manage, and always looks balanced and visually appealing. 17
COMPLEMENTARY COLOR SCHEME Complementary: colors approximately opposite each other on a color wheel The complementary color scheme offers stronger contrast than any other color scheme, and draws maximum attention. 18
ANALOGOUS COLOR SCHEME Analogous: colors adjacent to each other, from any segment of a color wheel The analogous color scheme is as easy to create as the monochromatic, but looks richer. 19
TRIADIC COLOR SCHEME Triadic: three colors approximately equally spaced around a color wheel The triadic color scheme offers high contrast while retaining harmony. 20
CIE DIAGRAM The CIE's chromaticity diagram (shown below), developed in 1931. CIE diagram is still used as a standard reference for defining colors and as a reference for other color spaces. The CIE diagram is a plot of X vs. Y for all visible colors. 21
COMPARISON OF COLOR GAMUTS The gamut is the set of possible colors within a color system. No one system can reproduce all possible colors in the spectrum. 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) 22
COLORS IN VIDEO - YUV MODEL YUV refers to a color model that has one luminance (i.e. brightness) component (Y) and two chrominance (i.e., color) components (U = blue-y and V = red-y). YUV is a color model appropriate to color TV Why separate the color information separate from the luminance information? So that signals for black and white vs color TV are easily separated. YUV is also a good representation for compression, because some of the chrominance (color) information can be thrown out without loss of quality in the picture. The Y axis is obtained from Y = 0.299R + 0.587G + 0.114B, signifying that green color contributes more to brightness. Digital Television uses different weights, and its format is called Y CBCR 23
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. I is the orange-blue axis, Q is the purple-green axis. 24