3. Practice

A classifier was constructed to detect each of the following images (figure 5) under any combination of translation, rotation and scaling.

The classifier is designed around a simple object-oriented framework
for calculating moments developed explicitly for this project. To
facilitate the design, an object-oriented `Image` class and a
number of image processing functions programmed by the author under
various prior grants were employed: a 3x3 Sobel edge operator, a 2D
smooth scaling routine, and a 2D smooth in-plane rotation algorithm.

As an initial verification step, translation independence was
verified. Testing on 444 translations of the image of the knife
within a 128x128 image,
were found to remain
quite constant. As a measure, the difference in the order of
magnitudes of the standard deviation for each *M* to the mean for each
*M* (
)
is presented in table
1.

Having established translation independence, Hu's seven invariant functions were tested for rotation independence. Data sets containing images of the knife, cleaver and scissors rotated at every from to were constructed. The first twenty five entries in the data set for the knife are shown below in figure 6.

Although the results indicated wider distributions, a histogram of the
results for the *M*_{1} moment invariant function indicates that a
classifier is easily constructed for this data using *only* the
*M*_{1} evaluation (figure 7).

From left to right, the peaks in figure 7 correspond to the
knife, the pair of scissors, and the cleaver. By simply placing two
boundaries, one midway between 22,000 and 26,000 and another between
26,000 and 48,000, a classifier is constructed that has no probability
of error for this training data, using only *M*_{1}!

As a final test, we seek to use expressions to obtain translation, rotation and scale independence. A large training set for each of the three target images was constructed to have ten scale variations from 1.0 to 0.1 for each of the angles represented in the prior training data, a total of 72 angles times 10 scale factors = 720 images for each target.

Figure 8 shows the results for the *M*_{2}' invariant
function, indicating that although the separation is reduced between
target classes, a zero probability of error classifier could still
easily be constructed.

1999-04-09