Image Processing Reference
In-Depth Information
Fig. 3.3 The different
components influencing the
The opposite of subtractive colors is additive colors . This notion applies when
you create the wavelengths as opposed to manipulating white light. A good exam-
ple is a color monitor like a computer screen or a TV screen. Here each pixel is a
combination of emitted red, green and blue light. Meaning that a black pixel is gen-
erated by not emitting anything at all. White (or rather a shade of gray) is generated
by emitting the same amount of red, green, and blue. Red will be created by only
emitting red light etc. All other colors are created by a combination of red, green
and blue. For example yellow is created by emitting the same amount of red and
green, and no blue.
3.2
Representation of an RGB Color Image
A color camera is based on the same principle as the human eye. That is, it measures
the amount of incoming red light, green light and blue light, respectively. This is
done in one of two ways depending on the number of sensors in the camera. In the
case of three sensors, each sensor measures one of the three colors, respectively.
This is done by splitting the incoming light into the three wavelength ranges using
some optical filters and mirrors. So red light is only send to the “red-sensor” etc. The
result is three images each describing the amount of red, green and blue light per
pixel, respectively. In a color image, each pixel therefore consists of three values:
red, green and blue. The actual representation might be three images—one for each
color, as illustrated in Fig. 3.4 , but it can also be a 3-dimensional vector for each
pixel, hence an image of vectors. Such a vector looks like this:
Color pixel
=[
Red , Green , Blue
]=[
R , G , B
]
(3.1)
In terms of programming a color pixel is usually represented as a struct . Say we
want to set the RGB values of the pixel at position ( 2 , 4 ) to: Red
=
100, Green
=
42, and Blue
=
10, respectively. In C-code this can for example be written as
f [2][4].R = 100;
f [2][4].G = 42;
f [2][4].B = 10;
Search WWH ::

Custom Search