## 4 Scenarios
### Extract Features with Handcrafted Methods  
In this scenario, we extract the image features with the LBP and HOG methods and feed the SVM classifier. In each method, we investigate the cell size and, therefore, the corresponding feature size, which gives the highest classification accuracy for each database. Both algorithms convert images to grayscale. First, we export the features from the images at their original sizes. For these dimensions, we use square cells with dimensions of power of two, ranging from 2 \(\times\) 2 to 64 \(\times\) 64. Tables 2 and 3 show the results for the cell sizes \(8\times 8,\ 16\times 16\), and \(32\times 32\) since the results for cell sizes smaller or larger are inferior. The feature size in both cases results from Formulas (1) and (2), respectively. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**LBP** & **KDEF** & \multicolumn{2}{c}{**JAFFE**} & \multicolumn{2}{c}{**RaFD**} \\ \hline
**Cell Size** & **Feature Size** & **CA (\%)** & **Feature Size** & **CA (\%)** & **Feature Size** & **CA (\%)** \\ \hline
8 \(\times\) 8 & 392,352 & 68.84 & 60,416 & 78.57 & 641,920 & 88.50 \\
16 \(\times\) 16 & 97,055 & 73.65 & 15,104 & 76.16 & 158,592 & 92.66 \\
32 \(\times\) 32 & 23,069 & 72.32 & 3776 & 50.00 & 39,648 & 94.40 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Classification accuracy and feature size with LBP method applied to the original image dimensions. Figure 2: Illustration of the workflow. For KDEF and RaFD, the two methods give the maximum classification accuracy for the same cell size (\(16\times 16\) for KDEF and \(32\times 32\) for RaFD). The cell size should give sufficient information with the smallest possible size of a feature vector. However, the texture information method (LPB) yields significantly higher success rates, namely by 14% and 18% for KDEF and RaFD, respectively, compared to the HOG method. JAFFE is an exception to these observations by showing slightly better classification accuracy with HOG features. While both methods use the gradient of the intensity (magnitude and direction) as information around each pixel, the LBP method uses the eight neighboring pixels to detect local patterns, while the HOG method uses one direction for each pixel. This difference makes the LBP method more efficient on the databases with multiple face angles (KDEF and RaFD), while the HOG method on the database with frontal pose images only (JAFFE). We then divide the dimensions of the image by two, keeping the original aspect ratio to check the role of the resolution in classification accuracy and the correlation between cell size and image dimensions. According to Formulas (1) and (2), when the dimensions of the images are subdivided, the same feature size is obtained for also subdivided cell size, i.e., the size of the feature with the original dimensions of the image for cell size, e.g., \(8\times 8\) is equal to that obtained for an image downsized by two for a cell size of \(4\times 4\). Therefore, to include the feature with the size that results with cell \(8\times 8\), when we subdivide the dimensions of the images, we include the cell size \(4\times 4\) and omit the cell size \(32\times 32\). Table 4 contains classification accuracy results for both methods for downsized by two images of the databases. The reduction in the images by two positively affects the classification accuracy for KDEF images; it is increased by 6.3% with the LBP method and by 3.3% with the HOG method on average. The same is true for the JAFFE, with a corresponding improvement of 3.1% and 9.5%. Reducing the images by two seems to increase the classification accuracy by 3.1% on average only with the HOG method for the RaFD images, while with the LBP method, we have a reduction in the classification accuracy by 1.1% on average. The same results were also examined, with the images downsized by four. The classification accuracy, in this case, appeared to be about 2% lower than in the case of downsizing by two, so they are omitted.