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::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::CObservation::Ptr 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 |
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::utils::CTimeLogger | m_timeLog |
std::vector< double > | m_meanHist |
CFaceDetection::CFaceDetection | ( | ) |
Definition at line 44 of file CFaceDetection.cpp.
References mrpt::utils::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 57 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 866 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, mrpt::math::distance(), mrpt::math::TPoint3D::distanceTo(), mrpt::utils::CTimeLogger::enter(), mrpt::detectors::CFaceDetection::TMeasurement::faceNum, mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::utils::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 1137 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, mrpt::math::distance(), mrpt::math::TPoint3D::distanceTo(), mrpt::utils::CTimeLogger::enter(), experimental_segmentFace(), mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::utils::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 323 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 375 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, mrpt::math::cov(), mrpt::utils::CTimeLogger::enter(), experimental_segmentFace(), experimental_viewFacePointsAndEigenVects(), mrpt::detectors::CFaceDetection::TMeasurement::faceNum, mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::utils::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 504 of file CFaceDetection.cpp.
References checkRelativePosition(), mrpt::detectors::CFaceDetection::TOptions::confidenceThreshold, mrpt::math::TPoint3D::distanceTo(), mrpt::utils::CTimeLogger::enter(), experimental_calcHist(), experimental_segmentFace(), mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::math::CMatrixTemplate< T >::getColCount(), mrpt::math::CMatrixTemplate< T >::getRowCount(), mrpt::utils::CTimeLogger::leave(), m_measure, m_options, m_timeLog, MRPT_END, MRPT_START, 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 809 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 | ||
) |
Definition at line 2023 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TMeasurement::deletedRegions, mrpt::detectors::CFaceDetection::TMeasurement::faceNum, and m_measure.
|
inlineinherited |
Definition at line 39 of file CObjectDetection.h.
References mrpt::detectors::CObjectDetection::detectObjects_Impl().
Referenced by detectObjects_Impl().
|
inlineinherited |
Definition at line 46 of file CObjectDetection.h.
References mrpt::detectors::CObjectDetection::detectObjects_Impl().
|
inherited |
Definition at line 24 of file CObjectDetection.cpp.
References mrpt::obs::CObservationImage::image, mrpt::system::now(), mrpt::utils::CImage::setFromImageReadOnly(), and mrpt::obs::CObservation::timestamp.
|
virtual |
Implements mrpt::detectors::CObjectDetection.
Definition at line 131 of file CFaceDetection.cpp.
References cascadeClassifier, checkIfDiagonalSurface(), checkIfFacePlaneCov(), checkIfFaceRegions(), mrpt::detectors::CFaceDetection::TMeasurement::deletedRegions, mrpt::detectors::CObjectDetection::detectObjects(), mrpt::utils::CTimeLogger::enter(), mrpt::detectors::CFaceDetection::TMeasurement::faceNum, mrpt::obs::CObservation3DRangeScan::getZoneAsObs(), mrpt::obs::CObservation3DRangeScan::hasPoints3D, IS_CLASS, mrpt::utils::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::detectors::CDetectable2D::m_y, 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 841 of file CFaceDetection.cpp.
Referenced by init().
|
staticprivate |
Definition at line 352 of file CFaceDetection.cpp.
Referenced by init().
|
staticprivate |
Definition at line 480 of file CFaceDetection.cpp.
Referenced by init().
|
private |
Definition at line 1862 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 1692 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 mrpt::gui::CDisplayWindow::showImage().
Referenced by checkIfDiagonalSurface2(), checkIfFacePlaneCov(), and checkIfFaceRegions().
void CFaceDetection::experimental_showMeasurements | ( | ) |
Definition at line 1882 of file CFaceDetection.cpp.
References mrpt::detectors::CFaceDetection::TMeasurement::errorEstimations, mrpt::utils::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 1484 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 1414 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 1364 of file CFaceDetection.cpp.
References experimental_viewFacePointsScanned().
|
private |
Definition at line 1389 of file CFaceDetection.cpp.
References experimental_viewFacePointsScanned().
|
private |
Definition at line 1594 of file CFaceDetection.cpp.
References 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().
|
inlineinherited |
Initialize the object with parameters loaded from the given config file.
Definition at line 29 of file CObjectDetection.h.
|
virtual |
Initialize the object with parameters loaded from the given config source.
Implements mrpt::detectors::CObjectDetection.
Definition at line 75 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::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.
|
private |
Definition at line 846 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 357 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 485 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 90 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), init(), and thread_checkIfDiagonalSurface().
|
private |
Save result of checkIfFacePlaneCov filter.
Definition at line 88 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), init(), and thread_checkIfFacePlaneCov().
|
private |
Save result of checkIfFaceRegions filter.
Definition at line 86 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 93 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 103 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 100 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 97 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), thread_checkIfFaceRegions(), and ~CFaceDetection().
|
private |
Last face detected.
Definition at line 116 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 113 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 110 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 107 of file CFaceDetection.h.
Referenced by detectObjects_Impl(), and thread_checkIfFaceRegions().
|
private |
Definition at line 142 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 83 of file CFaceDetection.h.
Referenced by init(), and ~CFaceDetection().
|
private |
Thread that execute checkIfFacePlaneCov filter.
Definition at line 81 of file CFaceDetection.h.
Referenced by init(), and ~CFaceDetection().
|
private |
Thread that execute checkIfFaceRegions filter.
Definition at line 79 of file CFaceDetection.h.
Referenced by init(), and ~CFaceDetection().
|
private |
Definition at line 140 of file CFaceDetection.h.
Referenced by CFaceDetection(), checkIfDiagonalSurface(), checkIfDiagonalSurface2(), checkIfFacePlaneCov(), checkIfFaceRegions(), detectObjects_Impl(), and experimental_showMeasurements().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |