Main MRPT website > C++ reference for MRPT 1.5.5
List of all members | Classes | Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes
mrpt::detectors::CFaceDetection Class Reference

Detailed Description

Specific class for face detection.

Methods and variables labeled as experimentals are temporals (for debug or testing purposes) and may disappear in future versions.

Definition at line 31 of file CFaceDetection.h.

#include <mrpt/detectors/CFaceDetection.h>

Inheritance diagram for mrpt::detectors::CFaceDetection:
Inheritance graph

Classes

struct  TMeasurement
 
struct  TOptions
 
struct  TTestsOptions
 

Public Member Functions

 CFaceDetection ()
 
 ~CFaceDetection ()
 
virtual void init (const mrpt::utils::CConfigFileBase &cfg)
 Initialize the object with parameters loaded from the given config source. More...
 
virtual void detectObjects_Impl (const mrpt::obs::CObservation *obs, vector_detectable_object &detected)
 
void experimental_showMeasurements ()
 
void debug_returnResults (const vector_uint &falsePositives, const vector_uint &ignore, unsigned int &falsePositivesDeleted, unsigned int &realFacesDeleted)
 
void init (const std::string &configFile)
 Initialize the object with parameters loaded from the given config file. More...
 
void detectObjects (const mrpt::obs::CObservationPtr obs, vector_detectable_object &detected)
 
void detectObjects (const mrpt::obs::CObservation *obs, vector_detectable_object &detected)
 
void detectObjects (const mrpt::utils::CImage *img, vector_detectable_object &detected)
 

Public Attributes

CCascadeClassifierDetection cascadeClassifier
 
struct
mrpt::detectors::CFaceDetection::TOptions 
m_options
 
struct
mrpt::detectors::CFaceDetection::TTestsOptions 
m_testsOptions
 

Private Member Functions

bool checkIfFacePlane (mrpt::obs::CObservation3DRangeScan *face)
 
bool checkIfFacePlaneCov (mrpt::obs::CObservation3DRangeScan *face)
 
void thread_checkIfFacePlaneCov ()
 
bool checkIfFaceRegions (mrpt::obs::CObservation3DRangeScan *face)
 
void thread_checkIfFaceRegions ()
 
size_t checkRelativePosition (const mrpt::math::TPoint3D &p1, const mrpt::math::TPoint3D &p2, const mrpt::math::TPoint3D &p, double &dist)
 
void thread_checkIfDiagonalSurface ()
 
bool checkIfDiagonalSurface (mrpt::obs::CObservation3DRangeScan *face)
 
bool checkIfDiagonalSurface2 (mrpt::obs::CObservation3DRangeScan *face)
 
void experimental_viewFacePointsScanned (const std::vector< float > &xs, const std::vector< float > &ys, const std::vector< float > &zs)
 
void experimental_viewFacePointsScanned (const mrpt::obs::CObservation3DRangeScan &face)
 
void experimental_viewFacePointsScanned (const std::vector< mrpt::math::TPoint3D > &points)
 
void experimental_viewFacePointsAndEigenVects (const std::vector< mrpt::math::CArrayDouble< 3 > > &pointsVector, const mrpt::math::CMatrixDouble &eigenVect, const mrpt::math::CVectorDouble &eigenVal)
 
void experimental_viewRegions (const std::vector< mrpt::math::TPoint3D > regions[9], const mrpt::math::TPoint3D meanPos[3][3])
 
void experimental_segmentFace (const mrpt::obs::CObservation3DRangeScan &face, mrpt::math::CMatrixTemplate< bool > &region)
 
void experimental_calcHist (const mrpt::utils::CImage &face, const size_t &c1, const size_t &r1, const size_t &c2, const size_t &r2, mrpt::math::CMatrixTemplate< unsigned int > &hist)
 

Static Private Member Functions

static void dummy_checkIfFacePlaneCov (CFaceDetection *obj)
 
static void dummy_checkIfFaceRegions (CFaceDetection *obj)
 
static void dummy_checkIfDiagonalSurface (CFaceDetection *obj)
 

Private Attributes

mrpt::system::TThreadHandle m_thread_checkIfFaceRegions
 Thread that execute checkIfFaceRegions filter. More...
 
mrpt::system::TThreadHandle m_thread_checkIfFacePlaneCov
 Thread that execute checkIfFacePlaneCov filter. More...
 
mrpt::system::TThreadHandle m_thread_checkIfDiagonalSurface
 Thread that execute checkIfDiagonalSurface filter. More...
 
bool m_checkIfFaceRegions_res
 Save result of checkIfFaceRegions filter. More...
 
bool m_checkIfFacePlaneCov_res
 Save result of checkIfFacePlaneCov filter. More...
 
bool m_checkIfDiagonalSurface_res
 Save result of checkIfDiagonalSurface filter. More...
 
bool m_end_threads
 Indicates to all threads that must finish their execution. More...
 
mrpt::synch::CSemaphore m_enter_checkIfFaceRegions
 Indicates to thread_checkIfFaceRegions that exist a new face to analyze. More...
 
mrpt::synch::CSemaphore m_enter_checkIfFacePlaneCov
 Indicates to thread_checkIfFacePlaneCov that exist a new face to analyze. More...
 
mrpt::synch::CSemaphore m_enter_checkIfDiagonalSurface
 Indicates to thread_checkIfDiagonalSurface that exist a new face to analyze. More...
 
mrpt::synch::CSemaphore m_leave_checkIfFaceRegions
 Indicates to main thread that thread_checkIfFaceRegions has been completed analisis of the last face detected. More...
 
mrpt::synch::CSemaphore m_leave_checkIfFacePlaneCov
 Indicates to main thread that thread_checkIfFacePlaneCov has been completed analisis of the last face detected. More...
 
mrpt::synch::CSemaphore m_leave_checkIfDiagonalSurface
 Indicates to main thread that thread_checkIfDiagonalSurface has been completed analisis of the last face detected. More...
 
mrpt::obs::CObservation3DRangeScan m_lastFaceDetected
 Last face detected. More...
 
struct
mrpt::detectors::CFaceDetection::TMeasurement 
m_measure
 
mrpt::utils::CTimeLogger m_timeLog
 
std::vector< double > m_meanHist
 

Constructor & Destructor Documentation

CFaceDetection::CFaceDetection ( )
CFaceDetection::~CFaceDetection ( )

Member Function Documentation

bool CFaceDetection::checkIfDiagonalSurface ( mrpt::obs::CObservation3DRangeScan face)
private
bool CFaceDetection::checkIfDiagonalSurface2 ( mrpt::obs::CObservation3DRangeScan face)
private
bool CFaceDetection::checkIfFacePlane ( mrpt::obs::CObservation3DRangeScan face)
private
bool CFaceDetection::checkIfFacePlaneCov ( mrpt::obs::CObservation3DRangeScan face)
private
bool CFaceDetection::checkIfFaceRegions ( mrpt::obs::CObservation3DRangeScan face)
private
size_t CFaceDetection::checkRelativePosition ( const mrpt::math::TPoint3D p1,
const mrpt::math::TPoint3D p2,
const mrpt::math::TPoint3D p,
double &  dist 
)
private

Definition at line 761 of file CFaceDetection.cpp.

References mrpt::math::TPoint3D::x, and mrpt::math::TPoint3D::y.

Referenced by checkIfFaceRegions().

void CFaceDetection::debug_returnResults ( const vector_uint falsePositives,
const vector_uint ignore,
unsigned int falsePositivesDeleted,
unsigned int realFacesDeleted 
)
void mrpt::detectors::CObjectDetection::detectObjects ( const mrpt::obs::CObservationPtr  obs,
vector_detectable_object detected 
)
inlineinherited

Definition at line 38 of file CObjectDetection.h.

Referenced by detectObjects_Impl().

void mrpt::detectors::CObjectDetection::detectObjects ( const mrpt::obs::CObservation obs,
vector_detectable_object detected 
)
inlineinherited

Definition at line 43 of file CObjectDetection.h.

void CObjectDetection::detectObjects ( const mrpt::utils::CImage img,
vector_detectable_object detected 
)
inherited
void CFaceDetection::detectObjects_Impl ( const mrpt::obs::CObservation obs,
vector_detectable_object detected 
)
virtual
void CFaceDetection::dummy_checkIfDiagonalSurface ( CFaceDetection obj)
staticprivate

Definition at line 792 of file CFaceDetection.cpp.

References thread_checkIfDiagonalSurface().

Referenced by init().

void CFaceDetection::dummy_checkIfFacePlaneCov ( CFaceDetection obj)
staticprivate

Definition at line 340 of file CFaceDetection.cpp.

References thread_checkIfFacePlaneCov().

Referenced by init().

void CFaceDetection::dummy_checkIfFaceRegions ( CFaceDetection obj)
staticprivate

Definition at line 468 of file CFaceDetection.cpp.

References thread_checkIfFaceRegions().

Referenced by init().

void CFaceDetection::experimental_calcHist ( const mrpt::utils::CImage face,
const size_t &  c1,
const size_t &  r1,
const size_t &  c2,
const size_t &  r2,
mrpt::math::CMatrixTemplate< unsigned int > &  hist 
)
private
void CFaceDetection::experimental_segmentFace ( const mrpt::obs::CObservation3DRangeScan face,
mrpt::math::CMatrixTemplate< bool > &  region 
)
private
void CFaceDetection::experimental_showMeasurements ( )
void CFaceDetection::experimental_viewFacePointsAndEigenVects ( const std::vector< mrpt::math::CArrayDouble< 3 > > &  pointsVector,
const mrpt::math::CMatrixDouble eigenVect,
const mrpt::math::CVectorDouble eigenVal 
)
private
void CFaceDetection::experimental_viewFacePointsScanned ( const std::vector< float > &  xs,
const std::vector< float > &  ys,
const std::vector< float > &  zs 
)
private
void CFaceDetection::experimental_viewFacePointsScanned ( const mrpt::obs::CObservation3DRangeScan face)
private
void CFaceDetection::experimental_viewFacePointsScanned ( const std::vector< mrpt::math::TPoint3D > &  points)
private

Definition at line 1309 of file CFaceDetection.cpp.

References experimental_viewFacePointsScanned().

void CFaceDetection::experimental_viewRegions ( const std::vector< mrpt::math::TPoint3D regions[9],
const mrpt::math::TPoint3D  meanPos[3][3] 
)
private
void mrpt::detectors::CObjectDetection::init ( const std::string configFile)
inlineinherited

Initialize the object with parameters loaded from the given config file.

Definition at line 29 of file CObjectDetection.h.

void CFaceDetection::init ( const mrpt::utils::CConfigFileBase cfg)
virtual

Initialize the object with parameters loaded from the given config source.

Implements mrpt::detectors::CObjectDetection.

Definition at line 85 of file CFaceDetection.cpp.

References cascadeClassifier, mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, mrpt::system::createThread(), dummy_checkIfDiagonalSurface(), dummy_checkIfFacePlaneCov(), dummy_checkIfFaceRegions(), mrpt::detectors::CCascadeClassifierDetection::init(), m_checkIfDiagonalSurface_res, m_checkIfFacePlaneCov_res, m_checkIfFaceRegions_res, m_measure, m_options, m_testsOptions, m_thread_checkIfDiagonalSurface, m_thread_checkIfFacePlaneCov, m_thread_checkIfFaceRegions, mrpt::detectors::CFaceDetection::TOptions::multithread, mrpt::detectors::CFaceDetection::TTestsOptions::planeTest_eigenVal_bottom, mrpt::detectors::CFaceDetection::TTestsOptions::planeTest_eigenVal_top, mrpt::detectors::CFaceDetection::TTestsOptions::planeThreshold, mrpt::utils::CConfigFileBase::read_bool(), mrpt::utils::CConfigFileBase::read_double(), mrpt::utils::CConfigFileBase::read_int(), mrpt::detectors::CFaceDetection::TTestsOptions::regionsTest_sumDistThreshold_bottom, mrpt::detectors::CFaceDetection::TTestsOptions::regionsTest_sumDistThreshold_top, mrpt::detectors::CFaceDetection::TMeasurement::saveMeasurementsToFile, mrpt::detectors::CFaceDetection::TMeasurement::takeMeasures, mrpt::detectors::CFaceDetection::TMeasurement::takeTime, mrpt::detectors::CFaceDetection::TOptions::useCovFilter, mrpt::detectors::CFaceDetection::TOptions::useDiagonalDistanceFilter, mrpt::detectors::CFaceDetection::TOptions::useRegionsFilter, and mrpt::detectors::CFaceDetection::TOptions::useSizeDistanceRelationFilter.

void CFaceDetection::thread_checkIfDiagonalSurface ( )
private
void CFaceDetection::thread_checkIfFacePlaneCov ( )
private
void CFaceDetection::thread_checkIfFaceRegions ( )
private

Member Data Documentation

CCascadeClassifierDetection mrpt::detectors::CFaceDetection::cascadeClassifier

Definition at line 35 of file CFaceDetection.h.

Referenced by detectObjects_Impl(), and init().

bool mrpt::detectors::CFaceDetection::m_checkIfDiagonalSurface_res
private

Save result of checkIfDiagonalSurface filter.

Definition at line 82 of file CFaceDetection.h.

Referenced by detectObjects_Impl(), init(), and thread_checkIfDiagonalSurface().

bool mrpt::detectors::CFaceDetection::m_checkIfFacePlaneCov_res
private

Save result of checkIfFacePlaneCov filter.

Definition at line 81 of file CFaceDetection.h.

Referenced by detectObjects_Impl(), init(), and thread_checkIfFacePlaneCov().

bool mrpt::detectors::CFaceDetection::m_checkIfFaceRegions_res
private

Save result of checkIfFaceRegions filter.

Definition at line 80 of file CFaceDetection.h.

Referenced by detectObjects_Impl(), init(), and thread_checkIfFaceRegions().

bool mrpt::detectors::CFaceDetection::m_end_threads
private

Indicates to all threads that must finish their execution.

Definition at line 84 of file CFaceDetection.h.

Referenced by thread_checkIfDiagonalSurface(), thread_checkIfFacePlaneCov(), thread_checkIfFaceRegions(), and ~CFaceDetection().

mrpt::synch::CSemaphore mrpt::detectors::CFaceDetection::m_enter_checkIfDiagonalSurface
private

Indicates to thread_checkIfDiagonalSurface that exist a new face to analyze.

Definition at line 88 of file CFaceDetection.h.

Referenced by detectObjects_Impl(), thread_checkIfDiagonalSurface(), and ~CFaceDetection().

mrpt::synch::CSemaphore mrpt::detectors::CFaceDetection::m_enter_checkIfFacePlaneCov
private

Indicates to thread_checkIfFacePlaneCov that exist a new face to analyze.

Definition at line 87 of file CFaceDetection.h.

Referenced by detectObjects_Impl(), thread_checkIfFacePlaneCov(), and ~CFaceDetection().

mrpt::synch::CSemaphore mrpt::detectors::CFaceDetection::m_enter_checkIfFaceRegions
private

Indicates to thread_checkIfFaceRegions that exist a new face to analyze.

Definition at line 86 of file CFaceDetection.h.

Referenced by detectObjects_Impl(), thread_checkIfFaceRegions(), and ~CFaceDetection().

mrpt::obs::CObservation3DRangeScan mrpt::detectors::CFaceDetection::m_lastFaceDetected
private
mrpt::synch::CSemaphore mrpt::detectors::CFaceDetection::m_leave_checkIfDiagonalSurface
private

Indicates to main thread that thread_checkIfDiagonalSurface has been completed analisis of the last face detected.

Definition at line 92 of file CFaceDetection.h.

Referenced by detectObjects_Impl(), and thread_checkIfDiagonalSurface().

mrpt::synch::CSemaphore mrpt::detectors::CFaceDetection::m_leave_checkIfFacePlaneCov
private

Indicates to main thread that thread_checkIfFacePlaneCov has been completed analisis of the last face detected.

Definition at line 91 of file CFaceDetection.h.

Referenced by detectObjects_Impl(), and thread_checkIfFacePlaneCov().

mrpt::synch::CSemaphore mrpt::detectors::CFaceDetection::m_leave_checkIfFaceRegions
private

Indicates to main thread that thread_checkIfFaceRegions has been completed analisis of the last face detected.

Definition at line 90 of file CFaceDetection.h.

Referenced by detectObjects_Impl(), and thread_checkIfFaceRegions().

std::vector<double> mrpt::detectors::CFaceDetection::m_meanHist
private

Definition at line 120 of file CFaceDetection.h.

Referenced by experimental_showMeasurements().

struct mrpt::detectors::CFaceDetection::TMeasurement mrpt::detectors::CFaceDetection::m_measure
private
struct mrpt::detectors::CFaceDetection::TOptions mrpt::detectors::CFaceDetection::m_options
struct mrpt::detectors::CFaceDetection::TTestsOptions mrpt::detectors::CFaceDetection::m_testsOptions

Referenced by checkIfFacePlane(), and init().

mrpt::system::TThreadHandle mrpt::detectors::CFaceDetection::m_thread_checkIfDiagonalSurface
private

Thread that execute checkIfDiagonalSurface filter.

Definition at line 78 of file CFaceDetection.h.

Referenced by init(), and ~CFaceDetection().

mrpt::system::TThreadHandle mrpt::detectors::CFaceDetection::m_thread_checkIfFacePlaneCov
private

Thread that execute checkIfFacePlaneCov filter.

Definition at line 77 of file CFaceDetection.h.

Referenced by init(), and ~CFaceDetection().

mrpt::system::TThreadHandle mrpt::detectors::CFaceDetection::m_thread_checkIfFaceRegions
private

Thread that execute checkIfFaceRegions filter.

Definition at line 76 of file CFaceDetection.h.

Referenced by init(), and ~CFaceDetection().

mrpt::utils::CTimeLogger mrpt::detectors::CFaceDetection::m_timeLog
private



Page generated by Doxygen 1.8.6 for MRPT 1.5.5 Git: e06b63d Fri Dec 1 14:41:11 2017 +0100 at sáb dic 2 13:00:21 CET 2017