Renesas GR-PEACH OpenCV Development / gr-peach-opencv-project-sd-card_update

Fork of gr-peach-opencv-project-sd-card by the do

Embed: (wiki syntax)

« Back to documentation index

StandardCollector Class Reference

Default predict collector. More...

#include <predict_collector.hpp>

Inherits cv::face::PredictCollector.

Public Member Functions

 StandardCollector (double threshold_=DBL_MAX)
 Constructor.
void init (size_t size)
 overloaded interface method
bool collect (int label, double dist)
 overloaded interface method
CV_WRAP int getMinLabel () const
 Returns label with minimal distance.
CV_WRAP double getMinDist () const
 Returns minimal distance value.
CV_WRAP std::vector< std::pair
< int, double > > 
getResults (bool sorted=false) const
 Return results as vector.
std::map< int, double > getResultsMap () const
 Return results as map Labels are keys, values are minimal distances.

Static Public Member Functions

static CV_WRAP Ptr
< StandardCollector
create (double threshold=DBL_MAX)
 Static constructor.

Detailed Description

Default predict collector.

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

Definition at line 82 of file predict_collector.hpp.


Constructor & Destructor Documentation

StandardCollector ( double  threshold_ = DBL_MAX )

Constructor.

Parameters:
threshold_set threshold

Definition at line 58 of file predict_collector.cpp.


Member Function Documentation

bool collect ( int  label,
double  dist 
) [virtual]

overloaded interface method

Implements PredictCollector.

Definition at line 68 of file predict_collector.cpp.

Ptr< StandardCollector > create ( double  threshold = DBL_MAX ) [static]

Static constructor.

Parameters:
thresholdset threshold

Definition at line 110 of file predict_collector.cpp.

double getMinDist (  ) const

Returns minimal distance value.

Definition at line 83 of file predict_collector.cpp.

int getMinLabel (  ) const

Returns label with minimal distance.

Definition at line 79 of file predict_collector.cpp.

std::vector< std::pair< int, double > > getResults ( bool  sorted = false ) const

Return results as vector.

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

Definition at line 87 of file predict_collector.cpp.

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

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

Definition at line 97 of file predict_collector.cpp.

void init ( size_t  size ) [virtual]

overloaded interface method

Reimplemented from PredictCollector.

Definition at line 62 of file predict_collector.cpp.