Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
ipa_PeopleDetector::FaceRecognizerBaseClass Class Reference

#include <face_recognizer_algorithms.h>

Inheritance diagram for ipa_PeopleDetector::FaceRecognizerBaseClass:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void activate_unknown_treshold ()
 Method to activate usage of "unknown" threshold.
virtual void classifyImage (cv::Mat &probe_mat, int &max_prob_index)=0
 Abstract method for classification.
virtual void classifyImage (cv::Mat &probe_mat, int &max_prob_index, cv::Mat &classification_probabilities)=0
 Abstract method for classification.
 FaceRecognizerBaseClass ()
 Constructor.
virtual bool loadModel (boost::filesystem::path &model_file)=0
 Abstract method to load recognition model.
virtual bool saveModel (boost::filesystem::path &model_file)=0
 Abstract method to save recognition model.
virtual bool trainModel (std::vector< cv::Mat > &img_vec, std::vector< int > &label_vec, int &target_dim)=0
 Abstract method for model training.
virtual ~FaceRecognizerBaseClass ()
 Destructor.

Public Attributes

bool trained_
 Flag indicates whether model is trained and ready for recognition.

Protected Member Functions

virtual void calc_threshold (cv::Mat &data, double &thresh)=0
 Calculation of unknown threshold.
virtual void calc_threshold (std::vector< cv::Mat > &data, double &thresh)=0
 Calculation of unknown threshold.
virtual void calcDIFS (cv::Mat &probe_mat, int &minDIFSindex, double &minDIFS, cv::Mat &probabilities)=0
 Abstract method for DIFS calculation.
virtual void extractFeatures (std::vector< cv::Mat > &src_vec, cv::Mat &proj_mat, std::vector< cv::Mat > &coeff_vec)=0
 Abstract method feature extraction.
virtual void extractFeatures (cv::Mat &src_mat, cv::Mat &proj_mat, cv::Mat &coeff_mat)=0
 Abstract method feature extraction.
virtual bool input_param_check (std::vector< cv::Mat > &imgs, std::vector< int > &labels, int &target_dim)
bool is_known (double &distance, double &threshold)
 Check whether the unknown threshold is exceeded.

Protected Attributes

cv::Mat eigenvalues_
 Eigenvalues from Eigenvalue decomposition of training set.
std::vector< int > model_label_vec_
 Vector containing labels of training set.
int num_classes_
 Number of classes.
cv::Mat projection_mat_
 Linear projection matrix (Eigenvectors) for transition from image space to features space.
cv::Size source_dim_
 Dimensions of the images the model is trained with.
int target_dim_
 Subspace dimension that is used for the facespace.
double unknown_thresh_
 Unknown threshold. When it is exceeded face is classified as unknown.
bool use_unknown_thresh_
 When true unknown idendities are considered.

Detailed Description

Definition at line 27 of file face_recognizer_algorithms.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 31 of file face_recognizer_algorithms.h.

Destructor.

Definition at line 38 of file face_recognizer_algorithms.h.


Member Function Documentation

Method to activate usage of "unknown" threshold.

Definition at line 74 of file face_recognizer_algorithms.h.

virtual void ipa_PeopleDetector::FaceRecognizerBaseClass::calc_threshold ( cv::Mat &  data,
double &  thresh 
) [protected, pure virtual]

Calculation of unknown threshold.

Abstract method for the calculation of the "unknown" threshold

Parameters:
[in]dataMatrix containing model features as matrix-rows.
[out]threshValue for "unknown" threshold.

Implemented in ipa_PeopleDetector::FaceRecognizer2D, and ipa_PeopleDetector::FaceRecognizer1D.

virtual void ipa_PeopleDetector::FaceRecognizerBaseClass::calc_threshold ( std::vector< cv::Mat > &  data,
double &  thresh 
) [protected, pure virtual]

Calculation of unknown threshold.

Abstract method for the calculation of the "unknown" threshold

Parameters:
[in]dataVector containing model features as matrices.
[out]threshValue for "unknown" threshold.

Implemented in ipa_PeopleDetector::FaceRecognizer2D, and ipa_PeopleDetector::FaceRecognizer1D.

virtual void ipa_PeopleDetector::FaceRecognizerBaseClass::calcDIFS ( cv::Mat &  probe_mat,
int &  minDIFSindex,
double &  minDIFS,
cv::Mat &  probabilities 
) [protected, pure virtual]

Abstract method for DIFS calculation.

Abstract method to calculate the minimal distance in face space (DIFS) for a given probe image.

Parameters:
[in]probe_matImage which is compared to the model features
[out]minDIFSindexIndex of the minimal distance
[out]minDIFSMinimal distance
[out]probabilitiesClassification probabilities for all classes in dataset

Implemented in ipa_PeopleDetector::FaceRecognizer2D, and ipa_PeopleDetector::FaceRecognizer1D.

virtual void ipa_PeopleDetector::FaceRecognizerBaseClass::classifyImage ( cv::Mat &  probe_mat,
int &  max_prob_index 
) [pure virtual]

Abstract method for classification.

Abstract method to classifiy image.

Parameters:
[in]src_vecVector of image matrices
[in]probe_matImage that is classified
[out]max_prob_indexIndex of most probable label

Implemented in ipa_PeopleDetector::FaceRecognizer2D, and ipa_PeopleDetector::FaceRecognizer1D.

virtual void ipa_PeopleDetector::FaceRecognizerBaseClass::classifyImage ( cv::Mat &  probe_mat,
int &  max_prob_index,
cv::Mat &  classification_probabilities 
) [pure virtual]

Abstract method for classification.

Abstract method to classifiy image and recieve classification probabilities for all possible classes.

Parameters:
[in]probe_matImage that is classified
[out]max_prob_indexIndex of most probable label
[out]Classification probabilities for all classes in dataset

Implemented in ipa_PeopleDetector::FaceRecognizer2D, and ipa_PeopleDetector::FaceRecognizer1D.

virtual void ipa_PeopleDetector::FaceRecognizerBaseClass::extractFeatures ( std::vector< cv::Mat > &  src_vec,
cv::Mat &  proj_mat,
std::vector< cv::Mat > &  coeff_vec 
) [protected, pure virtual]

Abstract method feature extraction.

Abstract method to extract features from image matrix using a linear projection matrix.

Parameters:
[in]src_vecVector of image matrices
[in]proj_matLinear projection matrix
[out]coeff_vecVector with feature matrices

Implemented in ipa_PeopleDetector::FaceRecognizer2D, and ipa_PeopleDetector::FaceRecognizer1D.

virtual void ipa_PeopleDetector::FaceRecognizerBaseClass::extractFeatures ( cv::Mat &  src_mat,
cv::Mat &  proj_mat,
cv::Mat &  coeff_mat 
) [protected, pure virtual]

Abstract method feature extraction.

Abstract method to extract features from image matrix using a linear projection matrix.

Parameters:
[in]src_vecVector of image matrices
[in]src_matImage matrix
[in]proj_matLinear projection matrix
[out]coeff_vecFeature matrix

Implemented in ipa_PeopleDetector::FaceRecognizer2D, and ipa_PeopleDetector::FaceRecognizer1D.

bool ipa_PeopleDetector::FaceRecognizerBaseClass::input_param_check ( std::vector< cv::Mat > &  imgs,
std::vector< int > &  labels,
int &  target_dim 
) [protected, virtual]

Method that checks input parameters for filetype and usable dimensions

Returns:
False when input parameter check detects invalid parameters

Definition at line 3 of file face_recognizer_algorithms.cpp.

bool ipa_PeopleDetector::FaceRecognizerBaseClass::is_known ( double &  distance,
double &  threshold 
) [inline, protected]

Check whether the unknown threshold is exceeded.

Method is used to check whether the unknown threshold is exceeded.

Parameters:
[in]distanceDistance in faces space
[in]threshold"unknown" threshold
Returns:
Returns false, when threshold is exceeded.

Definition at line 128 of file face_recognizer_algorithms.h.

virtual bool ipa_PeopleDetector::FaceRecognizerBaseClass::loadModel ( boost::filesystem::path &  model_file) [pure virtual]

Abstract method to load recognition model.

Implemented in ipa_PeopleDetector::FaceRecognizer2D, and ipa_PeopleDetector::FaceRecognizer1D.

virtual bool ipa_PeopleDetector::FaceRecognizerBaseClass::saveModel ( boost::filesystem::path &  model_file) [pure virtual]

Abstract method to save recognition model.

Implemented in ipa_PeopleDetector::FaceRecognizer2D, and ipa_PeopleDetector::FaceRecognizer1D.

virtual bool ipa_PeopleDetector::FaceRecognizerBaseClass::trainModel ( std::vector< cv::Mat > &  img_vec,
std::vector< int > &  label_vec,
int &  target_dim 
) [pure virtual]

Abstract method for model training.

Abstract method to train recognition model.

Parameters:
[in]img_vecVector of image matrices
[in]label_vecVector of labels
[in]target_dimSubspace dimension
Returns:
True when training was successful

Implemented in ipa_PeopleDetector::FaceRecognizer_PCA2D, ipa_PeopleDetector::FaceRecognizer_LDA2D, ipa_PeopleDetector::FaceRecognizer_Fisherfaces, and ipa_PeopleDetector::FaceRecognizer_Eigenfaces.


Member Data Documentation

Eigenvalues from Eigenvalue decomposition of training set.

Definition at line 141 of file face_recognizer_algorithms.h.

Vector containing labels of training set.

Definition at line 142 of file face_recognizer_algorithms.h.

Number of classes.

Definition at line 139 of file face_recognizer_algorithms.h.

Linear projection matrix (Eigenvectors) for transition from image space to features space.

Definition at line 140 of file face_recognizer_algorithms.h.

Dimensions of the images the model is trained with.

Definition at line 137 of file face_recognizer_algorithms.h.

Subspace dimension that is used for the facespace.

Definition at line 138 of file face_recognizer_algorithms.h.

Flag indicates whether model is trained and ready for recognition.

Definition at line 78 of file face_recognizer_algorithms.h.

Unknown threshold. When it is exceeded face is classified as unknown.

Definition at line 134 of file face_recognizer_algorithms.h.

When true unknown idendities are considered.

Definition at line 143 of file face_recognizer_algorithms.h.


The documentation for this class was generated from the following files:


cob_people_detection
Author(s): Richard Bormann , Thomas Zwölfer
autogenerated on Fri Aug 28 2015 10:24:13