markerlabeler.cpp
Go to the documentation of this file.
1 #include "markerlabeler.h"
4 namespace aruco{
5 cv::Ptr<MarkerLabeler> MarkerLabeler::create(Dictionary::DICT_TYPES dict_type,float error_correction_rate)throw (cv::Exception)
6 {
9  db->setParams(dict,error_correction_rate);
10  return db;
11 
12 }
13 
14 
15 cv::Ptr<MarkerLabeler> MarkerLabeler::create(std::string detector,std::string params)throw (cv::Exception){
16 
17 
18  if (detector=="SVM"){
19  SVMMarkers *svm=new SVMMarkers;
20  if (!svm->load( params)) throw cv::Exception( -1,"Could not open svm file :"+params,"Detector::create"," ",-1 );
21  //*SVMmodel,dictsize, -1, 1, true);
22  return svm;
23  }
24  else{
27  db->setParams(dict,0);
28  return db;
29  }
30 
31  throw cv::Exception( -1,"No valid labeler indicated:"+detector,"Detector::create"," ",-1 );
32 
33 }
34 
35 
36 }
void setParams(const Dictionary &dic, float max_correction_rate)
bool load(std::string path="")
static cv::Ptr< MarkerLabeler > create(Dictionary::DICT_TYPES dict_type, float error_correction_rate=0)
static Dictionary loadPredefined(DICT_TYPES type)
Definition: dictionary.cpp:63


tuw_aruco
Author(s): Lukas Pfeifhofer
autogenerated on Mon Jun 10 2019 15:40:53