22 #ifndef _OBJECT_CLASSIFIER_WRAPPER_H
23 #define _OBJECT_CLASSIFIER_WRAPPER_H
28 #include "Traits/IntegralChannelFeature.h"
29 #include "Traits/HaarFeature.h"
37 #include "detail/IntegralChannelImage.h"
38 #include "detail/IntegralImage.h"
47 template<
class _Instance,
class _Preprocessor>
69 std::ifstream fin(pth_cls);
78 if (code != _Instance::signature())
80 std::cerr <<
"error in loading " << pth_cls <<
": incompatible classifier" << std::endl;
96 pHelper->GetConf(pconf);
98 pHelper->Configure(fin);
100 pHelper->GetConf(conf);
102 if(strcmp(pconf,conf)!=0)
104 pHelper->Configure(pconf);
105 std::cerr <<
"error in loading " << pth_cls <<
": incompatible preprocessor" << std::endl;
112 pHelper->m_classifs.push_back(ogg);
113 pHelper->m_clsparams.push_back(params);
114 pHelper->m_clsparams.back().sz = geom;
116 return pHelper->m_clsparams.size() - 1;
119 std::cerr <<
"error open "<<pth_cls<<std::endl;
125 static std::string signature() {
126 return _Instance::signature();
131 return _Instance::signature();
135 pHelper->setParams(params);
138 return pHelper->getParams();
143 pHelper->setClassifierParams(index, params);
147 return pHelper->getClassifierParams(index);
152 pHelper->detect(out, src);
const ObjectDetectorParams & getClassifierParams(int index)
get per-classifier params
Definition: ObjectDetectorWrapper.h:146
Types involved in boosting.
virtual int addClassifier(const char *pth_cls, const ObjectDetectorParams ¶ms)
Definition: ObjectDetectorWrapper.h:68
Implement a local maxima search algorithm.
std::string getSignature() const
virtual
Definition: ObjectDetectorWrapper.h:130
Over-Classifier params.
Definition: ObjectDetector.h:68
Cross Platform High Performance timer.
image/size TODO namespace
Definition: Types.h:39
void setParams(const ObjectDetectorGlobalParams ¶ms)
Set the Global Params.
Definition: ObjectDetectorWrapper.h:134
method to convert an image sample in integral image preprocessors
void setClassifierParams(int index, const ObjectDetectorParams ¶ms)
set per-classifier params
Definition: ObjectDetectorWrapper.h:142
virtual classes to work on classifier. ObjectDetector exploits all the performance of classifier...
Definition: ObjectDetector.h:42
method to convert an image sample in integral Channels Image
Definition: ObjectDetectorWrapper.h:50
Definition: ObjectDetector.h:82
virtual void Detect(std::vector< Candidate > &out, const ImageHandle &src)
detect object
Definition: ObjectDetectorWrapper.h:151