fractallabeler.h
Go to the documentation of this file.
1 #include "../markerlabeler.h"
2 #include "fractalposetracker.h"
3 
4 namespace aruco
5 {
7 {
8 public:
9  static cv::Ptr<FractalMarkerLabeler> create(std::string params)
10  {
11  FractalMarkerSet fractalMarkerSet = FractalMarkerSet::load(params);
13  fml->setConfiguration(fractalMarkerSet);
14  return fml;
15  }
16 
17  static cv::Ptr<FractalMarkerLabeler> create(FractalMarkerSet::CONF_TYPES conf)
18  {
19  FractalMarkerSet fractalMarkerSet = FractalMarkerSet::loadPredefined(conf);
21  fml->setConfiguration(fractalMarkerSet);
22  return fml;
23  }
24 
25  void setConfiguration(const FractalMarkerSet& fractMarkerSet);
26 
27  static bool isFractalDictionaryFile(const std::string& path);
28 
30  {
31  }
32 
33  bool load(const std::string& path);
34 
35  // returns the configuration name
36  std::string getName() const;
37 
38  // main virtual class to o detection
39  bool detect(const cv::Mat& in, int& marker_id, int& nRotations, std::string& additionalInfo);
40 
41  int getNSubdivisions() const
42  {
43  return (sqrt(_fractalMarkerSet.nBits()) + 2);
44  }
45 
47 
48 private:
49  bool getInnerCode(const cv::Mat& thres_img, int total_nbits, std::vector<cv::Mat>& ids);
50  cv::Mat rotate(const cv::Mat& in);
51 };
52 } // namespace aruco
void setConfiguration(const FractalMarkerSet &fractMarkerSet)
bool getInnerCode(const cv::Mat &thres_img, int total_nbits, std::vector< cv::Mat > &ids)
bool detect(const cv::Mat &in, int &marker_id, int &nRotations, std::string &additionalInfo)
cv::Mat rotate(const cv::Mat &in)
static cv::Ptr< FractalMarkerLabeler > create(FractalMarkerSet::CONF_TYPES conf)
static cv::Ptr< FractalMarkerLabeler > create(std::string params)
Definition: fractallabeler.h:9
FractalMarkerSet _fractalMarkerSet
static bool isFractalDictionaryFile(const std::string &path)
bool load(const std::string &path)
std::string getName() const
static FractalMarkerSet loadPredefined(std::string info)
int getNSubdivisions() const
getNSubdivisions returns the number of subdivisions in each axis that the iamge will be subject to...
static FractalMarkerSet load(std::string info)


aruco
Author(s): Rafael Muñoz Salinas , Bence Magyar
autogenerated on Fri Nov 25 2022 04:02:23