.. _program_listing_file_include_aruco_dictionary_based.h: Program Listing for File dictionary_based.h =========================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/aruco/dictionary_based.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef ArucoDictionaryBasedMarkerDetector_H #define ArucoDictionaryBasedMarkerDetector_H #include "dictionary.h" #include "markerlabeler.h" #include namespace aruco { class DictionaryBased : public MarkerLabeler { public: virtual ~DictionaryBased() { } // first, dictionary, second the maximum correction rate [0,1]. If 0,no correction, if // 1, maximum allowed correction void setParams(const Dictionary& dic, float max_correction_rate); // main virtual class to o detection virtual bool detect(const cv::Mat& in, int& marker_id, int& nRotations, std::string& additionalInfo); // returns the dictionary name virtual std::string getName() const; virtual int getNSubdivisions() const { return _nsubdivisions; } // std::vector getDictionaries() const { return vdic; } private: // obfuscate start bool getInnerCode(const cv::Mat& thres_img, int total_nbits, std::vector& ids); cv::Mat rotate(const cv::Mat& in); uint64_t touulong(const cv::Mat& code); std::vector vdic; void toMat(uint64_t code, int nbits_sq, cv::Mat& out); int _nsubdivisions = 0; float _max_correction_rate; std::string dicttypename; std::map> nbits_dict; // obfuscate end }; } // namespace aruco #endif