FaceRecognitionLib
Facebase.h
Go to the documentation of this file.
1 /* Copyright (C) 2016 Kristian Sloth Lauszus. All rights reserved.
2 
3  This software may be distributed and modified under the terms of the GNU
4  General Public License version 2 (GPL2) as published by the Free Software
5  Foundation and appearing in the file GPL2.TXT included in the packaging of
6  this file. Please note that GPL2 Section 2[b] requires that all works based
7  on this software must also be made publicly available under the terms of
8  the GPL2 ("Copyleft").
9 
10  Contact information
11  -------------------
12 
13  Kristian Sloth Lauszus
14  Web : http://www.lauszus.com
15  e-mail : lauszus@gmail.com
16 */
17 
18 #ifndef __facebase_h__
19 #define __facebase_h__
20 
21 #include <Eigen/Dense> // http://eigen.tuxfamily.org
22 
23 #include "PCA.h"
24 
25 using namespace Eigen;
26 
27 class Facebase : public PCA {
28 public:
34  MatrixXf project(const MatrixXi &X);
35 
41  VectorXf euclideanDist(const VectorXf &W);
42 
48  VectorXf reconstructFace(const VectorXf &W);
49 
56  float euclideanDistFace(const VectorXi &X, const VectorXf &face);
57 
58  MatrixXf V; // Eigenvector
59  int32_t numComponents; // Number of components
60 
61 protected:
62  MatrixXf W_all; // Total weights
63  size_t n_pixels;
64 };
65 
66 #endif
Definition: Facebase.h:27
size_t n_pixels
Definition: Facebase.h:63
Definition: PCA.h:25
int32_t numComponents
Definition: Facebase.h:59
MatrixXf W_all
Definition: Facebase.h:62
MatrixXf V
Definition: Facebase.h:58