# Personal Identification Using Embedded Raspberry Pi-Based Face Recognition Systems
## 2 Materials and Methods
### Geometric Normalization and Classification of Facial Landmarks  
The general principle of operation of facial recognition programs valid in our system is presented in Figure 5. A significant challenge in the classification of biometric features arises from discrepancies in resolution and lighting between reference images and those under examination, as well as variations in head rotation angles. These factors negatively impact classification efficiency, thereby reducing the accuracy of recognition results. Most facial recognition algorithms are optimized for frontal facial images. However, real-world applications frequently involve tilted or non-frontal head positions, necessitating geometric normalization to mitigate these issues. One geometric normalization approach involves identifying specific facial landmarks, such as the centers of the eyes, and applying image rotation and scaling operations to align these points with their counterparts in the reference image. While effective, this method is limited in its ability to accommodate facial expression variability, which can result in differing positions for features such as the mouth, nose, or eyebrows across images of the same individual.  
Modern face recognition systems address these limitations by employing advanced geometric normalization techniques that incorporate facial expression analysis. These methods segment the detected facial region into smaller sub-areas, often centered around key landmarks, using a grid-based framework. Each sub-area undergoes independent scaling  
Figure 5: The general principle of operation of facial recognition programs.  
and rotation operations to align its features with the reference image, generating distinct feature vectors for each sub-area rather than a single generalized vector. Additionally, pixel neighborhood analysis is employed to capture local brightness variations. Each pixel is compared to the brightness levels of its eight neighboring pixels, assigning binary values of 1 or 0 based on whether the central pixel's brightness is higher or lower than its neighbors. This process yields an eight-bit binary code representing the local characteristics of the pixel, forming a robust descriptor for each sub-area.  
However, these advanced normalization methods increase computational complexity and memory requirements due to the need to store more extensive reference image data. They may also lead to oversized feature matrices, where the feature set of the examined face is substantially larger than that of the reference data, reducing the effectiveness of the classifier. To address this, dimensionality reduction algorithms are applied to optimize feature selection. Commonly used methods include the following:  
- Partial Least Squares Regression (PLSR) [63];  
- Random forest (RF) feature selection [64];  
- Principal Component Analysis (PCA) [65].  
The classification of facial biometric features often employs the support vector machine (SVM), recognized for its superior performance compared to algorithms such as logistic regression and decision trees. SVM is particularly effective in recognizing facial expressions and emotions.  
SVM works by segmenting the dataset based on margins, defined as the distances between the closest feature points of different classes. The algorithm identifies an optimal hyperplane with maximum margins, referred to as the boundary hyperplane, which ensures robust separation of classes. One of the key strengths of SVM is its ability to transform into a non-linear classifier using the \"kernel trick\". This technique involves defining a kernel function to map feature vectors x and y into a higher-dimensional space, enabling the classifier to operate effectively in non-linear domains while maintaining computational efficiency [65].