## 4 Evaluation
### Feature Extraction  
We focus on four ways to extract feature sets, namely the scaled region of interest (ROI), ROI histogram, contour features, and moments. For each, we also test different implementations and combinations of preprocessing algorithms and the combination of different feature sets for classification. **Scaled ROI**: We created the first feature set the same way as in the preliminary proof of concept by first extracting the ROI and then scaling the image segment down to less than 256 pixels before flattening the segment row by row. As a way of preprocessing the data, we focused on normalization, as our preliminary tests showed that other contrast enhancement methods, such as histogram equalization and contrast-limited adaptive histogram equalization (CLAHE), yielded worse results. First, we examined the difference between global and local normalization of the ROI while keeping the final segment size of 16 \(\times\) 16 pixels. The result was a slightly better performance of the local normalization, as shown in Table 3. The second series of tests focused on the size and aspect ratio of the extracted image segment. We performed three tests with sizes of 10 \(\times\) 20, 13 \(\times\) 19, and 12 \(\times\) 19 pixels. Then, the sizes of 13 \(\times\) 19 and 12 \(\times\) 19 pixels were chosen because they were close to the median aspect ratio of all objects in the dataset, while 10 \(\times\) 20 pixels was chosen as an example in which neither aspect ratio was ideal, nor was the whole feature vector used. The results show that all feature sets performed similar and that local normalization was slightly better than global normalization. **ROI histogram**: The second series of feature sets was created using the histogram of the pixel values in the ROI. The histogram was defined to have 256 bins, and the sizes of the bins were defined dynamically for each image. We examined the performance of two approaches for how to handle bins that contain more than 255 elements. The first one was normalizing all histograms between 0 and 255, and the second approach was limiting the size of a bin to 255. The results in Table 4 show that limiting the bins achieved better classification results. **Contour features**: The next set of features was not extracted from the image region itself but from the geometric attributes of the object's contour. The specific features used were the height, width, circumference, aspect ratio, area, extent, solidity, and orientation. The extent was calculated as the quotient of the contour area and bounding box area. Solidity is the ratio between the contour area and the area of a convex hull around the contour [14]. To use these features for classification, it is necessary to perform a transformation to fit the data into one byte of resolution available per feature. Each feature requires a specific transfer function, as the range of possible values differs greatly. An additional consideration is that not all possible values were actually present in the dataset. For example, the aspect ratio could be any value between 0 and 160 in theory, but the dataset contained no objects \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**Norm.**} & \multicolumn{2}{c}{**Limited**} \\ \cline{2-5}  & **RBF** & **KNN** & **RBF** & **KNN** \\ \hline Median & 52 & 59 & 59 & 66 \\ Sigma & 1.6 & 1.6 & 1.5 & 1.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: F1 score results of the test series with histograms. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**Global**} & \multicolumn{2}{c}{**Local**} & \multicolumn{2}{c}{**10 \(\times\) 20**} & \multicolumn{2}{c}{**12 \(\times\) 19**} & \multicolumn{2}{c}{**13 \(\times\) 19**} \\ \cline{2-11}  & **RBF** & **KNN** & **RBF** & **KNN** & **RBF** & **KNN** & **RBF** & **KNN** & **RBF** & **KNN** \\ \hline Median & 83 & 83 & 84 & 84 & 84 & 83 & 84 & 84 & 84 & 84 \\ Sigma & 1.2 & 1.5 & 1.0 & 1.4 & 0.8 & 1.2 & 1.0 & 1.6 & 0.9 & 1 \\ \hline \hline \end{tabular}
\end{table}