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 32 of file CFaceDetection.h.
#include <mrpt/detectors/CFaceDetection.h>
Classes | |
struct | TMeasurement |
struct | TOptions |
struct | TTestsOptions |
Public Member Functions | |
CFaceDetection () | |
~CFaceDetection () | |
virtual void | init (const mrpt::config::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 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 |
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 |
Indicates to all threads that must finish their execution. More... | |
std::promise< void > | m_enter_checkIfFaceRegions |
Indicates to thread_checkIfFaceRegions that exist a new face to analyze. More... | |
std::promise< void > | m_enter_checkIfFacePlaneCov |
Indicates to thread_checkIfFacePlaneCov that exist a new face to analyze. More... | |
std::promise< void > | m_enter_checkIfDiagonalSurface |
Indicates to thread_checkIfDiagonalSurface that exist a new face to analyze. More... | |
std::promise< void > | m_leave_checkIfFaceRegions |
Indicates to main thread that thread_checkIfFaceRegions has been completed analisis of the last face detected. More... | |
std::promise< void > | m_leave_checkIfFacePlaneCov |
Indicates to main thread that thread_checkIfFacePlaneCov has been completed analisis of the last face detected. More... | |
std::promise< void > | 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::system::CTimeLogger | m_timeLog |
std::vector< double > | m_meanHist |
CFaceDetection::CFaceDetection | ( | ) |
Definition at line 47 of file CFaceDetection.cpp.
References mrpt::system::CTimeLogger::enable(), mrpt::detectors::CFaceDetection::TMeasurement::faceNum, m_measure, m_timeLog, mrpt::detectors::CFaceDetection::TMeasurement::numPossibleFacesDetected, and mrpt::detectors::CFaceDetection::TMeasurement::numRealFacesDetected.
CFaceDetection::~CFaceDetection | ( | ) |
Definition at line 60 of file CFaceDetection.cpp.
References m_end_threads, m_enter_checkIfDiagonalSurface, m_enter_checkIfFacePlaneCov, m_enter_checkIfFaceRegions, m_thread_checkIfDiagonalSurface, m_thread_checkIfFacePlaneCov, and m_thread_checkIfFaceRegions.
|
private |
Definition at line 858 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, mrpt::math::distance(), mrpt::math::TPoint3D::distanceTo(), mrpt::system::CTimeLogger::enter(), mrpt::detectors::CFaceDetection::TMeasurement::faceNum, mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::system::CTimeLogger::leave(), m_measure, m_options, m_timeLog, MRPT_END, MRPT_START, mrpt::math::CMatrixTemplate< T >::set_unsafe(), mrpt::math::CMatrixTemplate< T >::setSize(), mrpt::detectors::CFaceDetection::TMeasurement::sumDistances, mrpt::detectors::CFaceDetection::TMeasurement::takeMeasures, mrpt::detectors::CFaceDetection::TMeasurement::takeTime, mrpt::detectors::CFaceDetection::TOptions::useDiagonalDistanceFilter, and mrpt::detectors::CFaceDetection::TOptions::useSizeDistanceRelationFilter.
Referenced by detectObjects_Impl(), and thread_checkIfDiagonalSurface().
|
private |
Definition at line 1125 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, mrpt::math::distance(), mrpt::math::TPoint3D::distanceTo(), mrpt::system::CTimeLogger::enter(), experimental_segmentFace(), mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::system::CTimeLogger::leave(), m_measure, m_options, m_timeLog, MRPT_END, MRPT_START, mrpt::detectors::CFaceDetection::TMeasurement::sumDistances, mrpt::detectors::CFaceDetection::TMeasurement::takeMeasures, mrpt::detectors::CFaceDetection::TMeasurement::takeTime, mrpt::detectors::CFaceDetection::TOptions::useDiagonalDistanceFilter, and mrpt::detectors::CFaceDetection::TOptions::useSizeDistanceRelationFilter.
|
private |
Definition at line 324 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TMeasurement::errorEstimations, mrpt::math::getRegressionPlane(), m_measure, m_testsOptions, mrpt::detectors::CFaceDetection::TTestsOptions::planeThreshold, and mrpt::detectors::CFaceDetection::TMeasurement::takeMeasures.
|
private |
Definition at line 376 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, mrpt::math::cov(), mrpt::system::CTimeLogger::enter(), experimental_segmentFace(), experimental_viewFacePointsAndEigenVects(), mrpt::detectors::CFaceDetection::TMeasurement::faceNum, mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::system::CTimeLogger::leave(), mrpt::detectors::CFaceDetection::TMeasurement::lessEigenVals, m_measure, m_options, m_timeLog, MRPT_TRY_END, MRPT_TRY_START, mrpt::detectors::CFaceDetection::TMeasurement::takeMeasures, and mrpt::detectors::CFaceDetection::TMeasurement::takeTime.
Referenced by detectObjects_Impl(), and thread_checkIfFacePlaneCov().
|
private |
Definition at line 505 of file CFaceDetection.cpp.
References checkRelativePosition(), mrpt::math::CMatrixTemplate< T >::cols(), mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, mrpt::math::TPoint3D::distanceTo(), mrpt::system::CTimeLogger::enter(), experimental_calcHist(), experimental_segmentFace(), mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::system::CTimeLogger::leave(), m_measure, m_options, m_timeLog, MRPT_END, MRPT_START, mrpt::math::CMatrixTemplate< T >::rows(), mrpt::math::CMatrixTemplate< T >::setSize(), mrpt::math::sum(), mrpt::detectors::CFaceDetection::TMeasurement::takeTime, and mrpt::math::TPoint3D::x.
Referenced by detectObjects_Impl(), and thread_checkIfFaceRegions().
|
private |
Definition at line 801 of file CFaceDetection.cpp.
References mrpt::math::TPoint3D::x, and mrpt::math::TPoint3D::y.
Referenced by checkIfFaceRegions().
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 2007 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TMeasurement::deletedRegions, mrpt::detectors::CFaceDetection::TMeasurement::faceNum, falsePositives, and m_measure.
|
inherited |
Definition at line 23 of file CObjectDetection.cpp.
References mrpt::detectors::CObjectDetection::detectObjects_Impl(), mrpt::obs::CObservationImage::image, mrpt::system::now(), mrpt::img::CImage::setFromImageReadOnly(), and mrpt::obs::CObservation::timestamp.
|
inlineinherited |
Definition at line 46 of file CObjectDetection.h.
References mrpt::detectors::CObjectDetection::detectObjects_Impl().
|
inlineinherited |
Definition at line 39 of file CObjectDetection.h.
References mrpt::detectors::CObjectDetection::detectObjects_Impl().
Referenced by detectObjects_Impl().
|
virtual |
Implements mrpt::detectors::CObjectDetection.
Definition at line 134 of file CFaceDetection.cpp.
References cascadeClassifier, checkIfDiagonalSurface(), checkIfFacePlaneCov(), checkIfFaceRegions(), mrpt::detectors::CFaceDetection::TMeasurement::deletedRegions, mrpt::detectors::CObjectDetection::detectObjects(), mrpt::system::CTimeLogger::enter(), mrpt::detectors::CFaceDetection::TMeasurement::faceNum, mrpt::obs::CObservation3DRangeScan::getZoneAsObs(), mrpt::obs::CObservation3DRangeScan::hasPoints3D, IS_CLASS, mrpt::system::CTimeLogger::leave(), m_checkIfDiagonalSurface_res, m_checkIfFacePlaneCov_res, m_checkIfFaceRegions_res, m_enter_checkIfDiagonalSurface, m_enter_checkIfFacePlaneCov, m_enter_checkIfFaceRegions, m_lastFaceDetected, m_leave_checkIfDiagonalSurface, m_leave_checkIfFacePlaneCov, m_leave_checkIfFaceRegions, m_measure, m_options, m_timeLog, MRPT_END, MRPT_START, mrpt::detectors::CFaceDetection::TOptions::multithread, mrpt::detectors::CFaceDetection::TMeasurement::numPossibleFacesDetected, mrpt::detectors::CFaceDetection::TMeasurement::numRealFacesDetected, 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.
|
staticprivate |
Definition at line 833 of file CFaceDetection.cpp.
Referenced by init().
|
staticprivate |
Definition at line 353 of file CFaceDetection.cpp.
Referenced by init().
|
staticprivate |
Definition at line 481 of file CFaceDetection.cpp.
Referenced by init().
|
private |
Definition at line 1846 of file CFaceDetection.cpp.
References mrpt::math::CMatrixTemplate< T >::get_unsafe(), and mrpt::math::CMatrixTemplate< T >::set_unsafe().
Referenced by checkIfFaceRegions().
|
private |
Definition at line 1676 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, mrpt::detectors::CFaceDetection::TMeasurement::faceNum, mrpt::math::CMatrixTemplate< T >::get_unsafe(), m_lastFaceDetected, m_measure, m_options, mrpt::system::pause(), mrpt::obs::CObservation3DRangeScan::rangeImage, mrpt::math::CMatrixTemplate< T >::set_unsafe(), mrpt::math::CMatrixTemplate< T >::setSize(), and win.
Referenced by checkIfDiagonalSurface2(), checkIfFacePlaneCov(), and checkIfFaceRegions().
void CFaceDetection::experimental_showMeasurements | ( | ) |
Definition at line 1866 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TMeasurement::errorEstimations, mrpt::system::CTimeLogger::getStatsAsText(), mrpt::detectors::CFaceDetection::TMeasurement::lessEigenVals, m_meanHist, m_measure, m_timeLog, meanAndStd(), mrpt::detectors::CFaceDetection::TMeasurement::numPossibleFacesDetected, mrpt::detectors::CFaceDetection::TMeasurement::numRealFacesDetected, mrpt::system::pause(), mrpt::detectors::CFaceDetection::TMeasurement::saveMeasurementsToFile, mrpt::detectors::CFaceDetection::TMeasurement::sumDistances, and mrpt::detectors::CFaceDetection::TMeasurement::takeTime.
|
private |
Definition at line 1469 of file CFaceDetection.cpp.
References mrpt::gui::CDisplayWindow3D::get3DSceneAndLock(), mrpt::system::pause(), mrpt::gui::CDisplayWindow3D::repaint(), mrpt::gui::CDisplayWindow3D::resize(), mrpt::maps::CPointsMap::setAllPoints(), mrpt::gui::CDisplayWindow3D::setCameraAzimuthDeg(), mrpt::gui::CDisplayWindow3D::setCameraElevationDeg(), mrpt::gui::CDisplayWindow3D::setCameraPointingToPoint(), mrpt::gui::CDisplayWindow3D::setCameraZoom(), mrpt::gui::CDisplayWindow3D::setWindowTitle(), mrpt::math::sum(), mrpt::gui::CDisplayWindow3D::unlockAccess3DScene(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
Referenced by checkIfFacePlaneCov().
|
private |
Definition at line 1349 of file CFaceDetection.cpp.
References experimental_viewFacePointsScanned().
|
private |
Definition at line 1399 of file CFaceDetection.cpp.
References mrpt::gui::CDisplayWindow3D::get3DSceneAndLock(), mrpt::system::pause(), mrpt::gui::CDisplayWindow3D::repaint(), mrpt::gui::CDisplayWindow3D::resize(), mrpt::maps::CPointsMap::setAllPoints(), mrpt::gui::CDisplayWindow3D::setCameraAzimuthDeg(), mrpt::gui::CDisplayWindow3D::setCameraElevationDeg(), mrpt::gui::CDisplayWindow3D::setCameraPointingToPoint(), mrpt::gui::CDisplayWindow3D::setCameraZoom(), mrpt::gui::CDisplayWindow3D::setWindowTitle(), and mrpt::gui::CDisplayWindow3D::unlockAccess3DScene().
Referenced by experimental_viewFacePointsScanned().
|
private |
Definition at line 1374 of file CFaceDetection.cpp.
References experimental_viewFacePointsScanned().
|
private |
Definition at line 1579 of file CFaceDetection.cpp.
References G, mrpt::gui::CDisplayWindow3D::get3DSceneAndLock(), mrpt::system::pause(), R, mrpt::gui::CDisplayWindow3D::repaint(), mrpt::gui::CDisplayWindow3D::resize(), mrpt::maps::CPointsMap::setAllPoints(), mrpt::gui::CDisplayWindow3D::setCameraAzimuthDeg(), mrpt::gui::CDisplayWindow3D::setCameraElevationDeg(), mrpt::gui::CDisplayWindow3D::setCameraPointingToPoint(), mrpt::gui::CDisplayWindow3D::setCameraZoom(), mrpt::maps::CColouredPointsMap::setPointColor(), mrpt::gui::CDisplayWindow3D::setWindowTitle(), and mrpt::gui::CDisplayWindow3D::unlockAccess3DScene().
|
virtual |
Initialize the object with parameters loaded from the given config source.
Implements mrpt::detectors::CObjectDetection.
Definition at line 78 of file CFaceDetection.cpp.
References cascadeClassifier, mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, 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::config::CConfigFileBase::read_bool(), mrpt::config::CConfigFileBase::read_double(), mrpt::config::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.
|
inlineinherited |
Initialize the object with parameters loaded from the given config file.
Definition at line 29 of file CObjectDetection.h.
|
private |
Definition at line 838 of file CFaceDetection.cpp.
References checkIfDiagonalSurface(), m_checkIfDiagonalSurface_res, m_end_threads, m_enter_checkIfDiagonalSurface, m_lastFaceDetected, and m_leave_checkIfDiagonalSurface.
|
private |
Definition at line 358 of file CFaceDetection.cpp.
References checkIfFacePlaneCov(), m_checkIfFacePlaneCov_res, m_end_threads, m_enter_checkIfFacePlaneCov, m_lastFaceDetected, and m_leave_checkIfFacePlaneCov.
|
private |
Definition at line 486 of file CFaceDetection.cpp.
References checkIfFaceRegions(), m_checkIfFaceRegions_res, m_end_threads, m_enter_checkIfFaceRegions, m_lastFaceDetected, and m_leave_checkIfFaceRegions.
CCascadeClassifierDetection mrpt::detectors::CFaceDetection::cascadeClassifier |
Definition at line 35 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), and init().
|
private |
Save result of checkIfDiagonalSurface filter.
Definition at line 91 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), init(), and thread_checkIfDiagonalSurface().
|
private |
Save result of checkIfFacePlaneCov filter.
Definition at line 89 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), init(), and thread_checkIfFacePlaneCov().
|
private |
Save result of checkIfFaceRegions filter.
Definition at line 87 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), init(), and thread_checkIfFaceRegions().
|
private |
Indicates to all threads that must finish their execution.
Definition at line 94 of file CFaceDetection.h.
Referenced by thread_checkIfDiagonalSurface(), thread_checkIfFacePlaneCov(), thread_checkIfFaceRegions(), and ~CFaceDetection().
|
private |
Indicates to thread_checkIfDiagonalSurface that exist a new face to analyze.
Definition at line 104 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), thread_checkIfDiagonalSurface(), and ~CFaceDetection().
|
private |
Indicates to thread_checkIfFacePlaneCov that exist a new face to analyze.
Definition at line 101 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), thread_checkIfFacePlaneCov(), and ~CFaceDetection().
|
private |
Indicates to thread_checkIfFaceRegions that exist a new face to analyze.
Definition at line 98 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), thread_checkIfFaceRegions(), and ~CFaceDetection().
|
private |
Last face detected.
Definition at line 117 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), experimental_segmentFace(), thread_checkIfDiagonalSurface(), thread_checkIfFacePlaneCov(), and thread_checkIfFaceRegions().
|
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.
Referenced by detectObjects_Impl(), and thread_checkIfDiagonalSurface().
|
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.
Referenced by detectObjects_Impl(), and thread_checkIfFacePlaneCov().
|
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.
Referenced by detectObjects_Impl(), and thread_checkIfFaceRegions().
|
private |
Definition at line 143 of file CFaceDetection.h.
Referenced by experimental_showMeasurements().
|
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().
|
private |
Thread that execute checkIfDiagonalSurface filter.
Definition at line 84 of file CFaceDetection.h.
Referenced by init(), and ~CFaceDetection().
|
private |
Thread that execute checkIfFacePlaneCov filter.
Definition at line 82 of file CFaceDetection.h.
Referenced by init(), and ~CFaceDetection().
|
private |
Thread that execute checkIfFaceRegions filter.
Definition at line 80 of file CFaceDetection.h.
Referenced by init(), and ~CFaceDetection().
|
private |
Definition at line 141 of file CFaceDetection.h.
Referenced by CFaceDetection(), checkIfDiagonalSurface(), checkIfDiagonalSurface2(), checkIfFacePlaneCov(), checkIfFaceRegions(), detectObjects_Impl(), and experimental_showMeasurements().
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST |