45#ifndef __OPENCV_PREDICT_COLLECTOR_HPP__ 
   46#define __OPENCV_PREDICT_COLLECTOR_HPP__ 
   53#include "opencv2/core/base.hpp" 
   69    virtual void init(
size_t size) { CV_UNUSED(size); }
 
   75    virtual bool collect(
int label, 
double dist) = 0;
 
   89        PredictResult(
int label_ = -1, 
double distance_ = DBL_MAX) : label(label_), distance(distance_) {}
 
   94    std::vector<PredictResult> data;
 
  101    void init(
size_t size) CV_OVERRIDE;
 
  103    bool collect(
int label, 
double dist) CV_OVERRIDE;
 
  105    CV_WRAP 
int getMinLabel() 
const;
 
  107    CV_WRAP 
double getMinDist() 
const;
 
  112    CV_WRAP std::vector< std::pair<int, double> > getResults(
bool sorted = 
false) 
const;
 
Abstract base class for all strategies of prediction result handling
Definition: predict_collector.hpp:62
 
virtual void init(size_t size)
Interface method called by face recognizer before results processing
Definition: predict_collector.hpp:69
 
virtual bool collect(int label, double dist)=0
Interface method called by face recognizer for each result
 
Default predict collector
Definition: predict_collector.hpp:83
 
StandardCollector(double threshold_=DBL_MAX)
Constructor
 
bool collect(int label, double dist) CV_OVERRIDE
overloaded interface method
 
std::map< int, double > getResultsMap() const
Return results as map Labels are keys, values are minimal distances
 
void init(size_t size) CV_OVERRIDE
overloaded interface method
 
CV_EXPORTS_W double threshold(InputArray src, OutputArray dst, double thresh, double maxval, int type)
Applies a fixed-level threshold to each array element.
 
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
 
Definition: cvstd_wrapper.hpp:74
 
Definition: predict_collector.hpp:86