March 2019
Intermediate to advanced
538 pages
13h 38m
English
Both the Eigenfaces and Fisherfaces algorithms first calculate the average face that is the mathematical average of all the training images, so they can subtract the average image from each facial image to have better face recognition results. So, let's view the average face from our training set. The average face is named mean in the Eigenfaces and Fisherfaces implementations, shown as follows:
Mat averageFace = model->get<Mat>("mean"); printMatInfo(averageFace, "averageFace (row)"); // Convert a 1D float row matrix to a regular 8-bit image. averageFace = getImageFrom1DFloatMat(averageFace, faceHeight); printMatInfo(averageFace, "averageFace"); imshow("averageFace", averageFace);
You should now see an average face image ...