libface 0.2
|
Classes | |
class | EigenfacesPriv |
Public Member Functions | |
Eigenfaces (const std::string &dir=".") | |
~Eigenfaces () | |
int | count () const |
std::map< std::string, std::string > | getConfig () |
int | loadConfig (const std::map< std::string, std::string > &config) |
int | loadConfig (const std::string &dir) |
std::pair< int, float > | recognize (IplImage *input) |
int | saveConfig (const std::string &dir) |
int | update (std::vector< Face > &) |
libface::Eigenfaces::Eigenfaces | ( | const std::string & | dir = "." | ) |
Constructor for Eigenfaces. Takes a directory string as argument to determine the location of config xml file.
dir | The directory in which the DB is to be found/created |
libface::Eigenfaces::~Eigenfaces | ( | ) |
Deconstructor that frees the data variables.
int libface::Eigenfaces::count | ( | ) | const [virtual] |
Returns the number of unique faces in the database.
Implements libface::LibFaceRecognitionCore.
map< string, string > libface::Eigenfaces::getConfig | ( | ) | [virtual] |
Get the mapping between config variables and the data. This can be stored and then loaded back into config.
Implements libface::LibFaceRecognitionCore.
int libface::Eigenfaces::loadConfig | ( | const std::string & | dir | ) | [virtual] |
Attempts to load config from specified directory.
dir | A directory to look for libface-config.xml file. |
Implements libface::LibFaceRecognitionCore.
int libface::Eigenfaces::loadConfig | ( | const std::map< std::string, std::string > & | config | ) | [virtual] |
Method for loading the mapping of config variables and the data back into libface.
config | A std::map config returned by getConfig() method. |
Implements libface::LibFaceRecognitionCore.
pair< int, float > libface::Eigenfaces::recognize | ( | IplImage * | input | ) | [virtual] |
Method to attempt to compare images with the known projected images. Uses a specified type of distance to see how far away they are from each of the images in the projection.
input | The pointer to IplImage * image, which is to be recognized. |
Implements libface::LibFaceRecognitionCore.
int libface::Eigenfaces::saveConfig | ( | const std::string & | dir | ) | [virtual] |
Saves the config is a given directory.
dir | A std::string path to directory where config should be stored. |
Implements libface::LibFaceRecognitionCore.
int libface::Eigenfaces::update | ( | std::vector< Face > & | ) | [virtual] |
Updates the config with a vector of input training faces. If id of the face is -1, then face is added to the end of the faces vector.
If id is not -1 and a new id, then face is added to the end of the faces vector.
If id is not -1 and it already exist, then given the given faces is projected together with the known face at that position using eigen decomposition and the projected face is stored in it's place.
newFaceArr | The vector of input Face objects |
Implements libface::LibFaceRecognitionCore.