Here I presented my presentation slide about color image processing.
In color image processing, an abstract mathematical model known as color space is used to characterize the colors in terms of intensity values. This color space uses a three-dimensional coordinate system. For different types of applications, a number of different color spaces exists. The saturation is determined by the excitation purity, and depends on the amount of white light mixed with the hue. A pure hue is fully saturated, i.e. no white light mixed in. Hue and saturation together determine the chromaticity for a given colour. Finally, the intensity is determined by the actual amount of light, with more light corresponding to more intense colours[1].
Achromatic light has no colour - its only attribute is quantity or intensity. Greylevel is a measure of intensity. The intensity is determined by the energy, and is therefore a physical quantity. On the other hand, brightness or luminance is determined by the perception of the colour, and is therefore psychological. Given equally intense blue and green, the blue is perceived as much darker than the green. Note also that our perception of intensity is nonlinear, with changes of normalised intensity from 0.1 to 0.11 and from 0.5 to 0.55 being perceived as equal changes in brightness[2].
Colour depends primarily on the reflectance properties of an object. We see those rays that are reflected, while others are absorbed. However, we also must consider the colour of the light source, and the nature of human visual system. For example, an object that reflects both red and green will appear green when there is green but no red light illuminating it, and conversely it will appear red in the absence of green light. In pure white light, it will appear yellow (= red + green).
2. Contents
The CMY and CMYK Colors Models
The HSI Color Model
Converting colors from RGB to HSI
Converting colors from HSI to RGB
1.
Color Image sharpening
2.
a.
b.
Basics of Full Color Image Processing
Color Transformations
Histogram Processing
Color Image smoothing
Formulations
3.
4.
a.
b.
5.
6.
3. The CMY and CMYK Colors Models
The CMY color model is a subtractive color model, mainly used in color printing.
In the CMY model we begin with white and take away the appropriate primary components to achieve the
desired color. For example, if we subtract red from white, we get green and blue, which is cyan.
Figure 1. shows a coordinate system using the three primaries' complementary colors: C (cyan), M (magenta), and
Y (yellow). The corner of the CMY color cube that is at (0,0,0) corresponds to white, whereas the corner of the cube
that is at (1,1,1) represents black. This conversion is performed using the simple operation:
Figure 1. The CMY color space.
4. According to Figure 1, equal amounts of the pigment primaries, cyan, magenta, and
yellow should produce black.
In practice, combining these colors for printing produces a muddy-looking black. So, in
order to produce true black, a fourth color, black, is added, giving rise to the CMYK color
model.
Why CMYK?
5. The HSI Color Model
Creating colors in the RGB and CMY models and changing from one model to the other is a straightforward
process.
The RGB, CMY, and other similar color models are not well suited for describing colors in terms that are
practical for human interpretation.
WHY HSI:
For example, one does not refer to the color of an automobile by giving the percentage of each of the
primaries composing its color.
These color systems are ideally suited for hardware implementations.
6. The HSI (hue, saturation, intensity) color model, decouples the intensity component from the color
carrying information (hue and saturation) in a color image.
the HSI model is an ideal tool for developing image processing algorithms based on color descriptions
that are natural and intuitive to humans.
Basics of HSI:
The HSI model uses three measures to describe colors:
Saturation: Saturation gives a measure of how much a pure color is diluted with white light.
Hue: Hue is a color Component that describes a pure color (pure yellow, orange, or red).
Intensity: Intensity is the chromatic notation of brightness of black & white range.
7. An RGB color image can be viewed as three monochrome intensity images (representing red, green, and
blue), so we could extract intensity from an RGB image.
In the arrangement shown in Fig. 2(a), the line (intensity axis) joining the black and white vertices is
vertical.
Conceptual relationships between the RGB and HSI color models:
To determine the intensity component of any color point in Fig. 2, we would simply pass a plane
perpendicular to the intensity axis and containing the color point.
The intersection of the plane with the intensity axis would give us a point with intensity value in the range
[0, 1].
Figure 2(a)(b):
Conceptual relationships between
the RGB and HSI color models
8. Hue can be determined also from a given RGB point, consider Fig. 2(b), which shows a plane defined by
three points (black, white, and cyan).
All points contained in the plane must have the same hue (cyan in this case), because the black and white
components cannot change the hue.
By rotating the shaded plane about the vertical intensity axis, we would obtain different hues.
9. In Fig. 3(a), this plane we see that the primary colors are separated by 120°. The secondary colors are
60° from the primaries.
Fig. 3(b) shows the same hexagonal shape and an arbitrary color point (shown as a dot).
Hue and saturation in the HSI color model:
The saturation is the length of the vector from the origin to the point.
The hue of the point is determined by an angle from some reference point (red).
Figure 3(a)(b)(c)(d):
Hue and saturation in the
HSI color model.
It makes no difference which shape is picked because a geometric transformation may transform any of these
shapes into one of the other two Fig. 3(c)(d).
10. Example: HSI Model of a Color Triangle and Circle:
Figure 4. The HSI color
model based on (a)
triangular and (b) circular
color planes. The
triangles and circles are
perpendicular to the vertical
intensity axis.
11. Converting colors from RGB to HSI
Step 1. Read a RGB image.
Step 2. Represent the RGB image in the range [0,1].
Step 3. Find HSI components:
Hue as H:
The angle:
Saturation as S:
Intensity as I:
12. Converting colors from HSI TO RGB
Step 1. If the values of HIS given in the interval [0,1], we need to find corresponding
RGB values in the same range.
Step 2. R, G, B values calculated as follows:
13.
14. Basics of Full Color Image Processing
Full color image processing fall into 2 categories: 1. per-color-component. 2.vector-based
processing to be equivalent
In 1st category we process each component image individually and then form a composite
processed color image from the individually processed component.
In 2nd category we work with color pixels directly. Because full color images have at least
three components, color pixels are really vectors.
Let c represent an arbitrary vector in RGB color space:
15. Color components are the function of co-ordinates(x, y) so we can write it as:
For an image of size MxN there are MN such vectors, c(x,y), for x=0,1,2,…,M-1; y=0,1,2,…,N-1.
It is important to keep in mind that this equation depicts a vector whose components are spatial
variables in x and y.
16. As an illustration, Fig. 5 shows neighborhood spatial processing of gray-scale and full-color images.
Figure 5. Spatial masks for gray-scale and RGB color images.
In order for per-color-component and vector-based processing to be equivalent, two conditions have to be
satisfied:
First, the process has to be applicable to both vectors and scalars.
Second, the operation on each component of a vector must be independent of the other components.
Neighborhood average:
Can’t satisfy the two conditions,
results of two full color processing
approaches are different.
17. Color Transformation
Color Transformations deal with processing the components of color image within the context of a single color model.
The image below shows a high resolution color image of a bowl of strawberries
and a cup of coffee.
Follows component of the initial CMYK scan.
Black represent 0 and white represent 1.
Formulation
As with the gray-level transformation, we model
color transformations using the expression
g(x,y) = T[f(x,y)]
Where f(x,y) is the color image, g(x,y) is the
transformed or processed color output image,
and T is an operator on f over a spatial
neighborhood of (x,y)
The pixel value are triplets or quartets from the
color space chosen to represent the images.
We will restrict our attention to color
transformations of the form
Si = Ti(r1,r2,…,n), where i=1,2,…,n
Si and ri are variables denoting the color
components of f(x,y) and g(x,y) at any point
(x,y).
n is the number of color components.
(T1,T2,…,Tn) is a set of transformation or color
mapping functions that operate on ri to produce
Si.
Example: Color Image and its Various Components
Full color image Cyan Magenta Yellow
Note the strawberries are composed of a large amount of magenta and
yellow because the image corresponding to these two CMYK components
are the brightest.
Black is used sparingly and is generally confined to the coffee and shadows
within the bowl of strawberries.
Black
18. Converting the CMYK to RGB component
image.
The strawberries contains a large amount
of red and very little green and blue.
The stem of the strawberries shows some
green.
Red Blue
Green
Computing the HSI component, the strawberries are relatively pure in
color; they poses the highest saturation or least dilution by white light
of any of the hues in the image.
Hue Intensity
Saturation
We note some difficulties in interpreting the hue component
There is a discontinuity in the HSI model where 0o and 360o
HUE is undefined for a saturation of 0.
The discontinuity of the model is most apparent around the
strawberries, which are depict in gray level values near the both black
(0) and white (1).
The result is an unexpected mixture of highly contrasting gray level to
represent a single color – red.
19. Example: Modify the intensity of the image on Figure using g(x,y)=k*f(x,y), where k=0.7.
In HSI color space, this can be
done with Hue: s1=r1, Saturation:
s2=r2, Intensity: s3=k*r3 (Only
intensity component must be
transformed)
In RGB space, this can be done
with three components,
si=k*ri (i=1,2,3.)
In CMY space, it requires a set of
linear transformations
si=k*ri + (1-k) (i=1,2,3.)
Original picture
Result of decreasing its
intensity by 30% (k=0.7)
20. Histogram Processing
Histogram equalization automatically determines a
transformation that seeks to produce an image with a uniform
histogram of intensity values.
Since color images are composed of multiple components,
however, consideration must be given to adapting the gray
scale technique to more than one component and/or
histogram.
It is generally unwise to histogram equalize the components
of a color image independently.
A more logical approach is to spread the color intensities
uniformly, leaving the hues (colors) unchanged.
The following example shows a color image of a caster
stand containing cruets and shakers whose intensity
component spans the entire (normalized) ranged of possible
values [0,1].
The image intensity before processing contains a large
number of dark colors that reduces the median intensity to
0.36.
Example: Histogram Equalization in the HSI Color Space
Original image Image HSI components
Histogram equalize the
intensity component without
altering the hue and
saturation. The image is
significantly brighter and
several grain of the wooden
table are now visible
Correcting by partially
increasing the image’s
saturation. Note the color
of oil and vinegar before
and after the saturation
change.
21. Color Image smoothing
can be carried out on a per-color-plane basis
Smooth only the intensity component of the HSI
representation and convert the processed result to
an RGB image for display
Let Sxy denote the set of coordinates defining a
neighborhood centered at (x,y) in an RGB color
image.
The average of the RGB component vectors in this
neighborhood is:
It’s follows from previous equations and the
properties of vector addition that,
Example: Color Image Smoothing by neighborhood averaging
The following example shows a color image with its RGB component
and its HSI component.
Applying a 5 X 5 smoothing filters to the RGB component independently
In the HSI components, we only smooth the intensity component
leaving the hue and saturation components unchanged.
RGB image Red Green
Hue Saturation Intensity
RGB corrected HSI corrected
Difference
between both
corrections
Blue
22. Color Image sharpening
We consider sharpening an image using Laplacian.
Laplacian of a vector is defined as a vector whose components
are equal to the Laplacian of the individual scalar components of
the input vector.
In an RGB color system, the Laplacian of vector c is
The following example takes an RGB color image and apply the
Laplacian to its RGB components.
It shows a sharpened image based on its HSI components by
combining the Laplacian of the intensity component with the
unchanged hue and saturation components.
Example: Sharpening with the Laplacian
RGB
image
Red
components
Blue
components
Green
components
Hue Saturation Intensity
RGB sharpened HSI sharpened
Difference
between both
corrections