1: There are n faces in total. Each face is calculated from left to right based on pixels, from top to bottom, and the number of pixels in each face is m, which forms the face matrix m * n, then, a new matrix is formed for the values of each row in this matrix minus the mean value, and then its covariance matrix is obtained for this matrix, continue to find the feature vector with the largest M values on the covariance matrix (feature vector is M * 1), and then form feature vectures (M * m. The Matrix is.
2: perform projection on the faces of each person in the face database (a person may have multiple faces) on a separately. This projection forms a (1 * m ), if a person has multiple faces, perform the average operation to form the weight matrix (1 * m). There are n faces in the graphic library, then there will be n 1 * m Weight matrices (here we will add the computation of ball matrix projection: the formula for calculating the projection of multi-dimensional vectors A and B is ).
3: Calculate the weight matrix of the new image, and then calculate the distance from the weight matrix of N 1 * m to determine the face closest to it.