Beruflich Dokumente
Kultur Dokumente
byGlebV.Tcheslavski:gleb@ee.lamar.edu http://ee.lamar.edu/gleb/dip/index.htm
Spring2008 ELEN4304/5365DIP 1
Preliminaries
Color image processing is motivated by two main factors: 1. Color is a powerful descriptor simplifying object recognition. 2. We can distinquish between thousands of color shades and intensities, compared to about 20-30 values of gray. There are two major areas of color image processing: 1. Full-color processing images are acquired with a full-color sensor (TV camera, color scanner); 2. 2 Pseudocolor processing colors are assigned to a particular monochrome intensity or intensity range. Many methods discussed for processing of monochrome images are applicable to color images; other methods need reformulation.
Spring2008 ELEN4304/5365DIP 2
4/28/2008
Fundamentals of color
Mechanisms of color processing by human brain are not completely understood. However, the physical nature of color can be formally expressed and modeled.
1666: Sir Isaac Newton managed to pass a beam of white light through a glass prism and got a rainbow on the other side where each color blends smoothly into the next.
Spring2008 ELEN4304/5365DIP 3
Fundamentals of color
Particular colors of the object as human perceive them are determined by the nature of light reflection properties of the object. A body reflecting light that is balanced in all visible wavelengths appears as white. A body reflecting more light in a particular range of wavelengths and absorbing light in other bands appears as colored. Note: creatures other than humans may (and do!) perceive colors in a completely different way than we do
Spring2008 ELEN4304/5365DIP 4
4/28/2008
Fundamentals of color
If the light is achromatic (no colors), its only attribute is its intensity (amount). Examples of achromatic light: images produced by a b&w TV set, monochrome pictures (not necessary b&w!) Our discussion set b&w!). so far was limited to achromatic images. Chromatic light spans the EM spectrum from approximately 400 to 700 nm. The three basic quantities used to describe a chromatic light source are radiance (the total amount of energy from the source, W), luminance (energy an observer perceives from the source, lm: for example, an observer might barely perceive any light from a source l b i h b l i li h f radiating in an infrared region), and brightness (a subjective descriptor practically impossible to measure since it is associated to both the intensity and color sensation).
Spring2008 ELEN4304/5365DIP 5
Fundamentals of color
Color sensitive sensors of human retina are cones. The total of 6-7 million of cones in a human eye can be associated 1965 with one of three groups: red (~575 nm) sensitive (about 65 % of all ) g cones), green (~535 nm 33%), and blue (~445 nm 2%) sensitive. Blue cones are the most sensitive.
Spring2008 ELEN4304/5365DIP 6
4/28/2008
Fundamentals of color
Due to the absorption characteristics of the human eye, we see colors as variable combinations of so-called primary colors of light: red (R), green (G), blue (B). The following wavelengths are designated to them in 1931: 700 nm, 546.1 nm, and 435.8 nm. A common misconception is that it is possible to get any desired visible color by properly mixing the primary colors! Note: this selection of primary colors is rather arbitrary: about every three colors whose wavelengths are far enough apart, can serve as colors, apart primary.
Spring2008
ELEN4304/5365DIP
Fundamentals of color
Speaking of arbitrary selection of primary colors count number of colors in two rainbows:
Western version
Spring2008
4/28/2008
Fundamentals of color
Adding primary colors of light produces secondary colors: magenta (red + blue), cyan (green + blue), and yellow (green + red). Mixing the three primary colors of light (or a secondary with its opposite primary color) in the right intensities produces white light. Mixing together the three secondary colors of light, black (no light) can be produced. A primary color of pigment is a color that subtracts (or absorbs) a primary color of light and reflects (or transmits) the other two. Therefore, the primary colors of pigments are CMY.
Spring2008 ELEN4304/5365DIP 9
Fundamentals of color
CRT or LCD monitors are good examples of mixing light colors where three primary colors (RGB) are mixed (added) to form light of the particular color (either via the three gloving dots of different luminophore or via the three light beams of different color). Color printers are examples of mixing (adding) light pigments. Colors are usually distinguished from each other through the three characteristics: brightness, hue, and saturation. As mentioned before, before brightness embodies achromatic intensity. Hue represents the intensity dominant color as perceived by an observer (red, yellow, blue). Saturation is the amount of white added to a hue (purity of the color). For example, we need to specify saturation to characterize pink (red + white).
Spring2008 ELEN4304/5365DIP 10
4/28/2008
Fundamentals of color
Hue and saturation together are called chromaticity. A color may also be characterized by its brightness and chromaticity. The amounts of red, green, and blue needed to form any particular color are called the tristimulus values and are denoted as X, Y, Z. therefore, a color is specified by its trichromatic coefficients:
x=
X Y Z , y= , z= X +Y + Z X +Y + Z X +Y + Z
We notice that
x + y + z =1
The tristimulus values needed to produce a color of particular wavelength can be obtained from the tables.
Spring2008 ELEN4304/5365DIP 11
Fundamentals of color
Another way to specify colors is by using the CIE (chromaticity diagram), which shows a color composition as a function of x (red) and y (green). For any values of x and y, the corresponding value of z (blue) can be found as
z = 1 x y
Spring2008
ELEN4304/5365DIP
12
4/28/2008
Fundamentals of color
The point marked as green has approximately 62 % green and 25 % red. Therefore, it has about 13 % of blue. The positions of different colors (from violet at 380 nm to red at 700 nm) are indicated by the wavelengths around the boundary of the chromaticity diagram. They are the pure colors. Any point not on the boundary represent some mixture of spectrum colors.
Spring2008 ELEN4304/5365DIP 13
Fundamentals of color
The white point in the middle of CIE is called the point of equal energy h equal fractions of the has lf i f h three primary colors: CIE standard for white light. Any point along the boundary is fully saturated. When leaving the boundary, some amount of white light is added to form the color. The saturation at the point of equal energy is zero.
Spring2008
ELEN4304/5365DIP
14
4/28/2008
Fundamentals of color
A straight line joining any two points in the diagram defines all the diff h different color variations that l i i h can be obtained by combining these two colors additively. A line drawn from the point of equal energy to any point on the boundary defines all the shades of that particular color.
Spring2008
ELEN4304/5365DIP
15
Fundamentals of color
Extending this procedure to the three (primary) colors, we need to f form a triangle, whose apexes i l h are the three primary colors. Any color at the boundary or inside the triangle can be produced by various combinations of the three initial colors. colors Therefore, not all colors can be obtained from three fixed primaries.
Spring2008 ELEN4304/5365DIP 16
4/28/2008
Fundamentals of color
A typical range of colors (color gamut) produced by RGB monitors. i The irregular region inside the triangle represents the color gamut of the high-quality color printers. The region is irregular since color printing involves a combination of additive and subtractive color mixing.
Spring2008
ELEN4304/5365DIP
17
Fundamentals of color
CRT
monitor i
Spring2008
ELEN4304/5365DIP
18
4/28/2008
Fundamentals of color
LCD
Monitor M i (projector)
Spring2008
ELEN4304/5365DIP
19
Color models
A color model (color space or color system) is a specification of a coordinate system and a subspace within that system where each y p y color is represented by a single point. Most contemporary color models are oriented either toward hardware (color monitors and printers) or toward applications where color manipulation is used (color graphics for animation). The most commonly used in Image Processing practice models are RGB (monitors, most of cameras), CMY and CMYK (printers), and ( it t f ) d ( i t ) d HIS (closely correspond to the human visual system.
Spring2008
ELEN4304/5365DIP
20
10
4/28/2008
(2 )
8 3
= 16 777 216
ELEN4304/5365DIP 22
Spring2008
11
4/28/2008
Spring2008
ELEN4304/5365DIP
24
12
4/28/2008
Spring2008
ELEN4304/5365DIP
25
Spring2008
ELEN4304/5365DIP
26
13
4/28/2008
C 1 R M = 1 G Y 1 B
Equal amount of three pigments must produce black. This approach q pg p pp is not very practical and leads to a muddy-looking black. To produce a true black (predominant color in printing), a fourth color black is added to the color model to make a CMYK model.
Spring2008
ELEN4304/5365DIP
28
14
4/28/2008
I=
Spring2008
R+G+ B 3
ELEN4304/5365DIP 29
H = 360
Where
= cos 1
if B G if B > G
2 2 ( R G ) + ( R B )( G B )
30
( R G) + ( R B)
A small number often is added to the denominator to avoid dividing by zero. Zero angle corresponds to red here. If RGB values are normalized, hue is divided by 3600.
Spring2008 ELEN4304/5365DIP
15
4/28/2008
S = 1
The important components of the HSI model are the vertical intensity axis, the length of the vector to the color point, and the angle of that vector. HSI planes are defined as hexagons, triangles, or circles. The shape does not matter!
Spring2008 ELEN4304/5365DIP 32
16
4/28/2008
S cos H R = I 1 + cos ( 60 H ) G = 3I ( R + B ) B = I (1 S )
Spring2008 ELEN4304/5365DIP 33
Spring2008
ELEN4304/5365DIP
34
17
4/28/2008
Spring2008
ELEN4304/5365DIP
35
18
4/28/2008
Spring2008
ELEN4304/5365DIP
37
Spring2008
ELEN4304/5365DIP
38
19
4/28/2008
Modified saturation component t image: cyan region is reduced by half Resultant RGB image
39
20