Page 18 -
P. 18
4 1 Basic Notions
In order to obtain a numeric representation of the colour feature we may start by
splitting the image of the objects into the red-green-blue components. Next we
may, for instance, select a central region of interest in the image and compute, for
that region, the ratio of the maximum histogram locations for the red and green
components in the respective ranges (usually [O, 2551; O=no colour, 255=fuII
colour). Figure 1.3 shows the grey image corresponding to the green component of
the apple and the light intensity histogram for a rectangular region of interest. The
maximum of the histogram corresponds to 186. This means that the green intensity
value occurring most often is 186. For the red component we would obtain the
value 150. The ratio of these values is 1.24 revealing the predominance of the
green colour vs. the red colour.
In order to obtain a numeric representation of the shape feature we may, for
instance, measure the distance. away from the top, of the maximum width of the
object and normalize this distance by the height, i.e., computing xlh, with x, h
shown in Figure 1.3a. In this case, x/h=0.37. Note that we are assuming that the
objects are in a standard upright position.
Figure 1.3. (a) Grey image of the green component of the apple image; (b)
Histogram of light intensities for the rectangular region of interest shown in (a).
If we have made a sensible choice of prototypes we expect that representative
samples of green apples and ornngcs correspond to clusters of points around the
prototypes in the 2-dimensional feature space, as shown in Figure 1.4a by the
curves representing the cluster boundaries. Also, if we made a good choice of the
features, it is expected that the mentioned clusters are reasonably separated,
therefore allowing discrimination of the two classes of fruits.
The PR task of assigning an object to a class is said to be a classification task.
From a mathematical point of view it is convenient in classification tasks to
represent a pattern by a vector, which is 2-dimensional in the present case: