# Classification of Objects by Shape Applied to Amber Gemstone Classification
## 3 Experiments and Results
### Experimental Results for the SPD and CDF Approaches  
The decision was made to test the SPD approach by allowing some tolerance of the parameters. During the experiments, different tolerance limits were tested, from 5% to 15%, to classify the objects when checking the ratio of the corresponding dimensions. It appeared that the classification results greatly depended on the value of the selected tolerance, which directly affected the distribution of the analyzed objects to the form classes. Lower tolerance values allowed more objects to be assigned to the triangle shape, which was not approved by the human expert. Therefore, the tolerance parameter needed to be adapted by performing additional experiments. At higher tolerance values, the analyzed objects were assigned more to the asymmetric form, since the conditions of this particular class were met. When the tolerance value was chosen to be approximately 10%, then the more complex forms were distinguished and this provided the most acceptable results in comparison to the human expert assessment (see Table 1). During the experiment, it was determined that different tolerance values should be used to evaluate the ratio of the real and rectangular limited areas. Figure 6: Gemstone image before and after rotation operations. Figure 7: Required dimensions to determine the shape of the object. By applying the SPD approach, the average accuracy of the classification algorithm reached 78.4% of the expert's (human) decisions. There were cases where the form of an amber piece was difficult to identify unambiguously even for human eyes due to the uncertainty of the shape; for example, when one side of an amber stone was similar to a circle and the other half to a square or the like. Using the same set of photographs taken during the real-time experiment, the method mentioned in [12; 13] (i.e., classification by the form using centroid distance function (CDF)) was tested and compared. The results of the method are presented in Table 2.  
The experiments showed that the proposed SPD method provided better accuracy results than CDF. One of the main differences between these methods was the speed of the object class identification. The class identification time using the CDF method took 0.33 s on average, while classification using the proposed SPD took an average of 0.03 s. Thus, the SPD method was up to 11 times faster than the CDF method. Since the form of amber could not be defined unambiguously in some cases, the decision was made to carry out additional tests using a well-known set of three basic shapes. The set consisted of a circle (set of 3720 samples), a square (set of 3765 shapes), and a triangle (set of 3720 shapes). Table 3 shows examples of these basic forms. The size of the images analyzed was 200 \(\times\) 200 pixels. Each form was individually tested for classification. Table 4 shows the results of the classification of the basic form data set. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Class** & **Correct** & **Incorrect** & **Accuracy** \\ \hline
1. Oval & 1437 & 305 & 82.5\% \\
2. Circle & 563 & 138 & 80.3\% \\
3. Rectangle & 185 & 80 & 69.8\% \\
4. Square & 173 & 74 & 70.0\% \\
5. Triangle & 321 & 104 & 75.5\% \\
6. Asymmetrical & 780 & 251 & 75.7\% \\ Total & 3459 & 952 & 78.4\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Classification by form using the shape parametric description (SPD) approach. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Class** & **Correct** & **Incorrect** & **Accuracy** \\ \hline
1. Oval & 1437 & 305 & 82.5\% \\
2. Circle & 503 & 198 & 71.8\% \\
3. Rectangle & 176 & 89 & 66.4\% \\
4. Square & 155 & 92 & 62.8\% \\
5. Triangle & 303 & 122 & 71.3\% \\
6. Asymmetrical & 753 & 278 & 73.0\% \\ Total & 3267 & 1084 & 74.1\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Classification by form using the centroid distance function (CDF) approach.