In this experiment we use the same images used in the Feature Extraction lesson.
![]() |
---|
![]() |
---|
The first invariant moment is extracted and plotted below. The background was made object 0 with feature value set to -1.
![]() |
---|
Picking one sample of each object and assigning a class to it:
class object object number feature value --------------------------------------------------------- 0 background 0 -1.00 1 nail 1 0.93 2 ring screw 2 0.30 3 tee-pin 5 1.92 4 small dot noise 18 0.00
The Minimum Distance Classify operator assigns to each object the closest class according to the feature distance. The distance metric commonly used is Euclidean distance.
The result of the classify is a table with the relationship of objects and its class. Using the same technique as in the Area Measurement and Display lesson, we can assign a class value to the pixels of each object. This enables to visualize the result of the classification.
![]() |
---|
It can be noted that there were 2 misclassifications corresponding to two tee-pin objects
object feature value -------------------- 3 1.01 12 1.41
This is consistent with the nearest distance classify method because these feature values are closer to the attribute of the nail (0.93) than of the tee-pin (1.92). There are several ways to solve this: by choosing a better sample value, or by choosing an additional feature value, etc.