MRPT  1.9.9
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:

Classes

struct  TMeasurement
 
struct  TOptions
 
struct  TTestsOptions
 

Public Member Functions

 CFaceDetection ()
 
 ~CFaceDetection ()
 
void init (const mrpt::config::CConfigFileBase &cfg) override
 Initialize the object with parameters loaded from the given config source. More...
 
void detectObjects_Impl (const mrpt::obs::CObservation &obs, vector_detectable_object &detected) override
 
void experimental_showMeasurements ()
 
void debug_returnResults (const std::vector< uint32_t > &falsePositives, const std::vector< uint32_t > &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::CObservation::Ptr obs, vector_detectable_object &detected)
 
void detectObjects (const mrpt::obs::CObservation &obs, vector_detectable_object &detected)
 
void detectObjects (const mrpt::img::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::CVectorFixedDouble< 3 >> &pointsVector, const mrpt::math::CMatrixDouble &eigenVect, const std::vector< double > &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::CMatrixDynamic< bool > &region)
 
void experimental_calcHist (const mrpt::img::CImage &face, size_t c1, size_t r1, size_t c2, size_t r2, mrpt::math::CMatrixDynamic< 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

std::thread m_thread_checkIfFaceRegions
 Thread that execute checkIfFaceRegions filter. More...
 
std::thread m_thread_checkIfFacePlaneCov
 Thread that execute checkIfFacePlaneCov filter. More...
 
std::thread 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 {false}
 Indicates to all threads that must finish their execution. More...
 
std::promise< voidm_enter_checkIfFaceRegions
 Indicates to thread_checkIfFaceRegions that exist a new face to analyze. More...
 
std::promise< voidm_enter_checkIfFacePlaneCov
 Indicates to thread_checkIfFacePlaneCov that exist a new face to analyze. More...
 
std::promise< voidm_enter_checkIfDiagonalSurface
 Indicates to thread_checkIfDiagonalSurface that exist a new face to analyze. More...
 
std::promise< voidm_leave_checkIfFaceRegions
 Indicates to main thread that thread_checkIfFaceRegions has been completed analisis of the last face detected. More...
 
std::promise< voidm_leave_checkIfFacePlaneCov
 Indicates to main thread that thread_checkIfFacePlaneCov has been completed analisis of the last face detected. More...
 
std::promise< voidm_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::system::CTimeLogger m_timeLog
 
std::vector< double > m_meanHist
 

Constructor & Destructor Documentation

◆ CFaceDetection()

CFaceDetection::CFaceDetection ( )

Definition at line 44 of file CFaceDetection.cpp.

◆ ~CFaceDetection()

CFaceDetection::~CFaceDetection ( )

Definition at line 57 of file CFaceDetection.cpp.

Member Function Documentation

◆ checkIfDiagonalSurface()

bool CFaceDetection::checkIfDiagonalSurface ( mrpt::obs::CObservation3DRangeScan face)
private

Definition at line 849 of file CFaceDetection.cpp.

References mrpt::math::distance(), mrpt::math::TPoint3D::distanceTo(), MRPT_END, MRPT_START, and mrpt::math::CMatrixDynamic< T >::setSize().

Here is the call graph for this function:

◆ checkIfDiagonalSurface2()

bool CFaceDetection::checkIfDiagonalSurface2 ( mrpt::obs::CObservation3DRangeScan face)
private

Definition at line 1116 of file CFaceDetection.cpp.

References mrpt::math::distance(), mrpt::math::TPoint3D::distanceTo(), MRPT_END, and MRPT_START.

Here is the call graph for this function:

◆ checkIfFacePlane()

bool CFaceDetection::checkIfFacePlane ( mrpt::obs::CObservation3DRangeScan face)
private

Definition at line 321 of file CFaceDetection.cpp.

References mrpt::math::getRegressionPlane().

Here is the call graph for this function:

◆ checkIfFacePlaneCov()

bool CFaceDetection::checkIfFacePlaneCov ( mrpt::obs::CObservation3DRangeScan face)
private

Definition at line 373 of file CFaceDetection.cpp.

References mrpt::math::cov(), mrpt::math::MatrixBase< Scalar, Derived >::eig(), MRPT_TRY_END, and MRPT_TRY_START.

Here is the call graph for this function:

◆ checkIfFaceRegions()

bool CFaceDetection::checkIfFaceRegions ( mrpt::obs::CObservation3DRangeScan face)
private

Definition at line 500 of file CFaceDetection.cpp.

References mrpt::math::CMatrixDynamic< T >::cols(), mrpt::math::TPoint3D::distanceTo(), MRPT_END, MRPT_START, mrpt::math::CMatrixDynamic< T >::rows(), mrpt::math::CMatrixDynamic< T >::setSize(), mrpt::math::sum(), and mrpt::math::TPoint3D_data::x.

Here is the call graph for this function:

◆ checkRelativePosition()

size_t CFaceDetection::checkRelativePosition ( const mrpt::math::TPoint3D p1,
const mrpt::math::TPoint3D p2,
const mrpt::math::TPoint3D p,
double &  dist 
)
private

◆ debug_returnResults()

void CFaceDetection::debug_returnResults ( const std::vector< uint32_t > &  falsePositives,
const std::vector< uint32_t > &  ignore,
unsigned int &  falsePositivesDeleted,
unsigned int &  realFacesDeleted 
)

Definition at line 1946 of file CFaceDetection.cpp.

References falsePositives.

◆ detectObjects() [1/3]

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

Definition at line 36 of file CObjectDetection.h.

References mrpt::detectors::CObjectDetection::detectObjects_Impl().

Here is the call graph for this function:

◆ detectObjects() [2/3]

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

Definition at line 43 of file CObjectDetection.h.

References mrpt::detectors::CObjectDetection::detectObjects_Impl().

Here is the call graph for this function:

◆ detectObjects() [3/3]

void CObjectDetection::detectObjects ( const mrpt::img::CImage img,
vector_detectable_object detected 
)
inherited

Definition at line 22 of file CObjectDetection.cpp.

References mrpt::detectors::CObjectDetection::detectObjects_Impl(), mrpt::obs::CObservationImage::image, mrpt::img::CImage::makeShallowCopy(), mrpt::system::now(), and mrpt::obs::CObservation::timestamp.

Here is the call graph for this function:

◆ detectObjects_Impl()

void CFaceDetection::detectObjects_Impl ( const mrpt::obs::CObservation obs,
vector_detectable_object detected 
)
overridevirtual

Implements mrpt::detectors::CObjectDetection.

Definition at line 131 of file CFaceDetection.cpp.

References IS_CLASS, MRPT_END, and MRPT_START.

◆ dummy_checkIfDiagonalSurface()

void CFaceDetection::dummy_checkIfDiagonalSurface ( CFaceDetection obj)
staticprivate

Definition at line 824 of file CFaceDetection.cpp.

◆ dummy_checkIfFacePlaneCov()

void CFaceDetection::dummy_checkIfFacePlaneCov ( CFaceDetection obj)
staticprivate

Definition at line 350 of file CFaceDetection.cpp.

◆ dummy_checkIfFaceRegions()

void CFaceDetection::dummy_checkIfFaceRegions ( CFaceDetection obj)
staticprivate

Definition at line 476 of file CFaceDetection.cpp.

◆ experimental_calcHist()

void CFaceDetection::experimental_calcHist ( const mrpt::img::CImage face,
size_t  c1,
size_t  r1,
size_t  c2,
size_t  r2,
mrpt::math::CMatrixDynamic< unsigned int > &  hist 
)
private

Definition at line 1786 of file CFaceDetection.cpp.

◆ experimental_segmentFace()

void CFaceDetection::experimental_segmentFace ( const mrpt::obs::CObservation3DRangeScan face,
mrpt::math::CMatrixDynamic< bool > &  region 
)
private

Definition at line 1653 of file CFaceDetection.cpp.

References mrpt::system::pause(), mrpt::math::CMatrixDynamic< T >::setSize(), and win.

Here is the call graph for this function:

◆ experimental_showMeasurements()

void CFaceDetection::experimental_showMeasurements ( )

Definition at line 1805 of file CFaceDetection.cpp.

References mrpt::math::meanAndStd(), and mrpt::system::pause().

Here is the call graph for this function:

◆ experimental_viewFacePointsAndEigenVects()

void CFaceDetection::experimental_viewFacePointsAndEigenVects ( const std::vector< mrpt::math::CVectorFixedDouble< 3 >> &  pointsVector,
const mrpt::math::CMatrixDouble eigenVect,
const std::vector< double > &  eigenVal 
)
private

◆ experimental_viewFacePointsScanned() [1/3]

void CFaceDetection::experimental_viewFacePointsScanned ( const std::vector< float > &  xs,
const std::vector< float > &  ys,
const std::vector< float > &  zs 
)
private

◆ experimental_viewFacePointsScanned() [2/3]

void CFaceDetection::experimental_viewFacePointsScanned ( const mrpt::obs::CObservation3DRangeScan face)
private

Definition at line 1340 of file CFaceDetection.cpp.

◆ experimental_viewFacePointsScanned() [3/3]

void CFaceDetection::experimental_viewFacePointsScanned ( const std::vector< mrpt::math::TPoint3D > &  points)
private

Definition at line 1365 of file CFaceDetection.cpp.

◆ experimental_viewRegions()

void CFaceDetection::experimental_viewRegions ( const std::vector< mrpt::math::TPoint3D regions[9],
const mrpt::math::TPoint3D  meanPos[3][3] 
)
private

◆ init() [1/2]

void mrpt::detectors::CObjectDetection::init ( const std::string configFile)
inlineinherited

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

Definition at line 26 of file CObjectDetection.h.

◆ init() [2/2]

void CFaceDetection::init ( const mrpt::config::CConfigFileBase cfg)
overridevirtual

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

Implements mrpt::detectors::CObjectDetection.

Definition at line 75 of file CFaceDetection.cpp.

References mrpt::config::CConfigFileBase::read_bool(), mrpt::config::CConfigFileBase::read_double(), and mrpt::config::CConfigFileBase::read_int().

Here is the call graph for this function:

◆ thread_checkIfDiagonalSurface()

void CFaceDetection::thread_checkIfDiagonalSurface ( )
private

Definition at line 829 of file CFaceDetection.cpp.

◆ thread_checkIfFacePlaneCov()

void CFaceDetection::thread_checkIfFacePlaneCov ( )
private

Definition at line 355 of file CFaceDetection.cpp.

◆ thread_checkIfFaceRegions()

void CFaceDetection::thread_checkIfFaceRegions ( )
private

Definition at line 481 of file CFaceDetection.cpp.

Member Data Documentation

◆ cascadeClassifier

CCascadeClassifierDetection mrpt::detectors::CFaceDetection::cascadeClassifier

Definition at line 34 of file CFaceDetection.h.

◆ m_checkIfDiagonalSurface_res

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

Save result of checkIfDiagonalSurface filter.

Definition at line 91 of file CFaceDetection.h.

◆ m_checkIfFacePlaneCov_res

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

Save result of checkIfFacePlaneCov filter.

Definition at line 89 of file CFaceDetection.h.

◆ m_checkIfFaceRegions_res

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

Save result of checkIfFaceRegions filter.

Definition at line 87 of file CFaceDetection.h.

◆ m_end_threads

bool mrpt::detectors::CFaceDetection::m_end_threads {false}
private

Indicates to all threads that must finish their execution.

Definition at line 94 of file CFaceDetection.h.

◆ m_enter_checkIfDiagonalSurface

std::promise<void> mrpt::detectors::CFaceDetection::m_enter_checkIfDiagonalSurface
private

Indicates to thread_checkIfDiagonalSurface that exist a new face to analyze.

Definition at line 104 of file CFaceDetection.h.

◆ m_enter_checkIfFacePlaneCov

std::promise<void> mrpt::detectors::CFaceDetection::m_enter_checkIfFacePlaneCov
private

Indicates to thread_checkIfFacePlaneCov that exist a new face to analyze.

Definition at line 101 of file CFaceDetection.h.

◆ m_enter_checkIfFaceRegions

std::promise<void> mrpt::detectors::CFaceDetection::m_enter_checkIfFaceRegions
private

Indicates to thread_checkIfFaceRegions that exist a new face to analyze.

Definition at line 98 of file CFaceDetection.h.

◆ m_lastFaceDetected

mrpt::obs::CObservation3DRangeScan mrpt::detectors::CFaceDetection::m_lastFaceDetected
private

Last face detected.

Definition at line 117 of file CFaceDetection.h.

◆ m_leave_checkIfDiagonalSurface

std::promise<void> 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 114 of file CFaceDetection.h.

◆ m_leave_checkIfFacePlaneCov

std::promise<void> 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 111 of file CFaceDetection.h.

◆ m_leave_checkIfFaceRegions

std::promise<void> 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 108 of file CFaceDetection.h.

◆ m_meanHist

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

Definition at line 143 of file CFaceDetection.h.

◆ m_measure

struct mrpt::detectors::CFaceDetection::TMeasurement mrpt::detectors::CFaceDetection::m_measure
private

◆ m_options

struct mrpt::detectors::CFaceDetection::TOptions mrpt::detectors::CFaceDetection::m_options

◆ m_testsOptions

struct mrpt::detectors::CFaceDetection::TTestsOptions mrpt::detectors::CFaceDetection::m_testsOptions

◆ m_thread_checkIfDiagonalSurface

std::thread mrpt::detectors::CFaceDetection::m_thread_checkIfDiagonalSurface
private

Thread that execute checkIfDiagonalSurface filter.

Definition at line 84 of file CFaceDetection.h.

◆ m_thread_checkIfFacePlaneCov

std::thread mrpt::detectors::CFaceDetection::m_thread_checkIfFacePlaneCov
private

Thread that execute checkIfFacePlaneCov filter.

Definition at line 82 of file CFaceDetection.h.

◆ m_thread_checkIfFaceRegions

std::thread mrpt::detectors::CFaceDetection::m_thread_checkIfFaceRegions
private

Thread that execute checkIfFaceRegions filter.

Definition at line 80 of file CFaceDetection.h.

◆ m_timeLog

mrpt::system::CTimeLogger mrpt::detectors::CFaceDetection::m_timeLog
private

Definition at line 141 of file CFaceDetection.h.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: cb8dd5fc8 Sat Dec 7 21:55:39 2019 +0100 at sáb dic 7 22:00:13 CET 2019