dictionary_based.h
Go to the documentation of this file.
1 
17 #ifndef ArucoDictionaryBasedMarkerDetector_H
18 #define ArucoDictionaryBasedMarkerDetector_H
19 
20 #include "dictionary.h"
21 #include "markerlabeler.h"
22 
23 #include <opencv2/core/core.hpp>
24 namespace aruco
25 {
29 {
30 public:
31  virtual ~DictionaryBased()
32  {
33  }
34  // first, dictionary, second the maximum correction rate [0,1]. If 0,no correction, if
35  // 1, maximum allowed correction
36  void setParams(const Dictionary& dic, float max_correction_rate);
37 
38  // main virtual class to o detection
39  virtual bool detect(const cv::Mat& in, int& marker_id, int& nRotations,
40  std::string& additionalInfo);
41  // returns the dictionary name
42  virtual std::string getName() const;
43 
44  virtual int getNSubdivisions() const
45  {
46  return _nsubdivisions;
47  } //
48 
49  std::vector<Dictionary> getDictionaries() const
50  {
51  return vdic;
52  }
53 
54 private:
55  // obfuscate start
56  bool getInnerCode(const cv::Mat& thres_img, int total_nbits, std::vector<uint64_t>& ids);
57  cv::Mat rotate(const cv::Mat& in);
58  uint64_t touulong(const cv::Mat& code);
59  std::vector<Dictionary> vdic;
60  void toMat(uint64_t code, int nbits_sq, cv::Mat& out);
61  int _nsubdivisions = 0;
63  std::string dicttypename;
64  std::map<uint32_t, std::vector<Dictionary*>> nbits_dict;
65  // obfuscate end
66 };
67 } // namespace aruco
68 #endif
void setParams(const Dictionary &dic, float max_correction_rate)
uint64_t touulong(const cv::Mat &code)
virtual std::string getName() const
cv::Mat rotate(const cv::Mat &in)
std::vector< Dictionary > getDictionaries() const
std::map< uint32_t, std::vector< Dictionary * > > nbits_dict
void toMat(uint64_t code, int nbits_sq, cv::Mat &out)
std::vector< Dictionary > vdic
bool getInnerCode(const cv::Mat &thres_img, int total_nbits, std::vector< uint64_t > &ids)
virtual int getNSubdivisions() const
getNSubdivisions returns the number of subdivisions in each axis that the iamge will be subject to...
virtual bool detect(const cv::Mat &in, int &marker_id, int &nRotations, std::string &additionalInfo)


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