20 #include "boost/functional/hash.hpp" 34 gettimeofday(&start, NULL);
35 std::vector<RecognitionResultPtr> results =
mRecognizer->recognizePattern(testSet);
36 gettimeofday(&end, NULL);
38 double recognitionRuntime, seconds, useconds;
39 seconds = end.tv_sec - start.tv_sec;
40 useconds = end.tv_usec - start.tv_usec;
41 recognitionRuntime = seconds + useconds / 1000000;
43 for (
size_t i = 0; i < results.size(); ++i)
45 if (results[i]->patternName == patternName)
48 return std::make_pair(isValid, recognitionRuntime);
52 return std::make_pair(
false, recognitionRuntime);
58 this->
mRecognizer->setVoteSpecifiersPerObject(ism->voteSpecifiersPerObject);
59 this->
mRecognizer->setObjectTypes(ism->objectTypes);
60 this->
mRecognizer->setPatternDefinitions(ism->patternDefinitions);
61 this->
mRecognizer->arrangePatternsAccordingToTreeHeight();
ISM::RecognizerPtr mRecognizer
double mConfidenceThreshold
boost::shared_ptr< ImplicitShapeModel > IsmPtr
std::pair< bool, double > isSetValid(const ObjectSetPtr &testSet, const std::string &patternName)
boost::shared_ptr< ObjectSet > ObjectSetPtr
this namespace contains all generally usable classes.
void setISM(const IsmPtr ism)