Open Detection  1.0
od::g2d::ODFaceRecognizer Class Reference

A facerecognizer based on EigenFace and FischerFace algorithms. More...

#include <ODFaceRecognizer.h>

Inheritance diagram for od::g2d::ODFaceRecognizer:
Collaboration diagram for od::g2d::ODFaceRecognizer:

Public Member Functions

 OD_DEFINE_ENUM_WITH_STRING_CONVERSIONS (FaceRecogType,(OD_FACE_FISCHER)(OD_FACE_EIGEN)) ODFaceRecognizer(FaceRecogType recogtype
 
void initTrainer ()
 
void initDetector ()
 
int train ()
 
ODDetectionsdetect (ODSceneImage *scene)
 
FaceRecogType const & getRecogtype () const
 
void setRecogtype (FaceRecogType const &recogtype_)
 
int getThreshold () const
 
void setThreshold (int threshold_)
 
int getNumComponents () const
 
void setNumComponents (int num_components_)
 
- Public Member Functions inherited from od::ObjectDetector
 ObjectDetector ()
 
DetectionMethod const & getMethod () const
 
void setDetectionMethod (DetectionMethod const &detection_method_)
 
bool getAlwaysTrain () const
 
void setAlwaysTrain (bool always_train_)
 
std::string getTrainingInputLocation () const
 
void setTrainingInputLocation (std::string training_input_location_)
 
std::string getTrainingDataLocation () const
 
void setTrainingDataLocation (std::string training_data_location_)
 
std::string getSpecificTrainingDataLocation ()
 
virtual void init ()=0
 
virtual int detect (ODScene *scene, std::vector< ODDetection * > detections)
 
virtual ODDetectiondetect (ODScene *scene)
 
virtual ODDetectionsdetectOmni (ODScene *scene)
 

Public Attributes

int num_components = 0
 
int double threshold
 

Protected Attributes

cv::Ptr< cv::face::FaceRecognizer > cvrecognizer_
 
FaceRecogType recogtype_
 
int im_width_
 
int im_height_
 
int num_components_
 
double threshold_
 
- Protected Attributes inherited from od::ObjectDetector
DetectionMethod method_
 
bool always_train_
 
bool trained_
 
std::string training_input_location_
 
std::string training_data_location_
 
std::string TRAINED_DATA_EXT_
 
std::string TRAINED_DATA_IDENTIFIER_
 

Detailed Description

A facerecognizer based on EigenFace and FischerFace algorithms.

Currently it just supports detection on fixed scene (detect()) and does not support multiscale detection. This is due to the fact that class for cascade classifier - ODCascadeDetector supports multiscale detection and can be easily integrated with this recognizer - first by finding face using the Cascade and then applying this recognizer on that detected window. This is faster than trying to perform recognition on each multiscale window.

Author
Kripasindhu Sarkar
Examples:
objectdetector/od_image_facerecog.cpp.

Definition at line 61 of file ODFaceRecognizer.h.

Member Function Documentation

ODDetections* od::g2d::ODFaceRecognizer::detect ( ODSceneImage scene)
int od::g2d::ODFaceRecognizer::getNumComponents ( ) const
inline

Definition at line 105 of file ODFaceRecognizer.h.

References num_components_.

FaceRecogType const& od::g2d::ODFaceRecognizer::getRecogtype ( ) const
inline

Definition at line 85 of file ODFaceRecognizer.h.

References recogtype_.

int od::g2d::ODFaceRecognizer::getThreshold ( ) const
inline

Definition at line 95 of file ODFaceRecognizer.h.

References threshold_.

void od::g2d::ODFaceRecognizer::initDetector ( )
virtual
void od::g2d::ODFaceRecognizer::initTrainer ( )
virtual
od::g2d::ODFaceRecognizer::OD_DEFINE_ENUM_WITH_STRING_CONVERSIONS ( FaceRecogType  ,
(OD_FACE_FISCHER)(OD_FACE_EIGEN)   
)
void od::g2d::ODFaceRecognizer::setNumComponents ( int  num_components_)
inline

Definition at line 110 of file ODFaceRecognizer.h.

References num_components_.

void od::g2d::ODFaceRecognizer::setRecogtype ( FaceRecogType const &  recogtype_)
inline
Examples:
objectdetector/od_image_facerecog.cpp.

Definition at line 90 of file ODFaceRecognizer.h.

References recogtype_.

void od::g2d::ODFaceRecognizer::setThreshold ( int  threshold_)
inline

Definition at line 100 of file ODFaceRecognizer.h.

References threshold_.

int od::g2d::ODFaceRecognizer::train ( )
virtual

Member Data Documentation

cv::Ptr<cv::face::FaceRecognizer> od::g2d::ODFaceRecognizer::cvrecognizer_
protected

Definition at line 116 of file ODFaceRecognizer.h.

int od::g2d::ODFaceRecognizer::im_height_
protected

Definition at line 120 of file ODFaceRecognizer.h.

int od::g2d::ODFaceRecognizer::im_width_
protected

Definition at line 119 of file ODFaceRecognizer.h.

int od::g2d::ODFaceRecognizer::num_components = 0

Definition at line 67 of file ODFaceRecognizer.h.

int od::g2d::ODFaceRecognizer::num_components_
protected

Definition at line 121 of file ODFaceRecognizer.h.

Referenced by getNumComponents(), and setNumComponents().

FaceRecogType od::g2d::ODFaceRecognizer::recogtype_
protected

Definition at line 117 of file ODFaceRecognizer.h.

Referenced by getRecogtype(), and setRecogtype().

int double od::g2d::ODFaceRecognizer::threshold
Initial value:
= DBL_MAX)
{
TRAINED_DATA_IDENTIFIER_ = "FACERECOG";
TRAINED_DATA_EXT_ = "facerec.xml";
}
void init()

Definition at line 67 of file ODFaceRecognizer.h.

double od::g2d::ODFaceRecognizer::threshold_
protected

Definition at line 122 of file ODFaceRecognizer.h.

Referenced by getThreshold(), and setThreshold().


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