OpenCV  4.2.0
Open Source Computer Vision
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
cv::face::StandardCollector Class Reference

Default predict collector. More...

#include <opencv2/face/predict_collector.hpp>

Inheritance diagram for cv::face::StandardCollector:
cv::face::PredictCollector

Classes

struct  PredictResult
 

Public Member Functions

 StandardCollector (double threshold_=DBL_MAX)
 Constructor. More...
 
bool collect (int label, double dist) CV_OVERRIDE
 overloaded interface method More...
 
double getMinDist () const
 Returns minimal distance value. More...
 
int getMinLabel () const
 Returns label with minimal distance. More...
 
std::vector< std::pair< int, double > > getResults (bool sorted=false) const
 Return results as vector. More...
 
std::map< int, double > getResultsMap () const
 Return results as map Labels are keys, values are minimal distances. More...
 
void init (size_t size) CV_OVERRIDE
 overloaded interface method More...
 
- Public Member Functions inherited from cv::face::PredictCollector
virtual ~PredictCollector ()
 

Static Public Member Functions

static Ptr< StandardCollectorcreate (double threshold=DBL_MAX)
 Static constructor. More...
 

Protected Attributes

std::vector< PredictResultdata
 
PredictResult minRes
 
double threshold
 

Detailed Description

Default predict collector.

Trace minimal distance with treshhold checking (that is default behavior for most predict logic)

Constructor & Destructor Documentation

◆ StandardCollector()

cv::face::StandardCollector::StandardCollector ( double  threshold_ = DBL_MAX)

Constructor.

Parameters
threshold_set threshold

Member Function Documentation

◆ collect()

bool cv::face::StandardCollector::collect ( int  label,
double  dist 
)
virtual

overloaded interface method

Implements cv::face::PredictCollector.

◆ create()

static Ptr<StandardCollector> cv::face::StandardCollector::create ( double  threshold = DBL_MAX)
static
Python:
retval=cv.face.StandardCollector_create([, threshold])

Static constructor.

Parameters
thresholdset threshold

◆ getMinDist()

double cv::face::StandardCollector::getMinDist ( ) const
Python:
retval=cv.face_StandardCollector.getMinDist()

Returns minimal distance value.

◆ getMinLabel()

int cv::face::StandardCollector::getMinLabel ( ) const
Python:
retval=cv.face_StandardCollector.getMinLabel()

Returns label with minimal distance.

◆ getResults()

std::vector< std::pair<int, double> > cv::face::StandardCollector::getResults ( bool  sorted = false) const
Python:
retval=cv.face_StandardCollector.getResults([, sorted])

Return results as vector.

Parameters
sortedIf set, results will be sorted by distance Each values is a pair of label and distance.

◆ getResultsMap()

std::map<int, double> cv::face::StandardCollector::getResultsMap ( ) const

Return results as map Labels are keys, values are minimal distances.

◆ init()

void cv::face::StandardCollector::init ( size_t  size)
virtual

overloaded interface method

Reimplemented from cv::face::PredictCollector.

Member Data Documentation

◆ data

std::vector<PredictResult> cv::face::StandardCollector::data
protected

◆ minRes

PredictResult cv::face::StandardCollector::minRes
protected

◆ threshold

double cv::face::StandardCollector::threshold
protected

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