17 #ifndef ARUCO_DICTIONARY_ 18 #define ARUCO_DICTIONARY_ 22 #include <opencv2/core/core.hpp> 65 bool is(uint64_t code)
const 67 return _code_id.find(code) != _code_id.end();
78 return _code_id.size();
104 return _code_id[code];
106 int at(uint64_t code)
108 return _code_id[code];
117 cv::Mat getMarkerImage_id(
int id,
int bit_size,
bool addWaterMark =
true,
118 bool enclosed_corners =
false,
119 bool printExternalWhiteBorder =
false,
bool centralCircle =
false);
124 MarkerMap createMarkerMap(cv::Size gridSize,
int MarkerSize,
int MarkerDistance,
125 const std::vector<int>& Ids,
bool chess_board =
false);
128 static Dictionary loadPredefined(std::string type);
147 static Dictionary loadFromFile(std::string path);
161 static uint64_t computeDictionaryDistance(
const Dictionary&
d);
164 static DICT_TYPES getTypeFromString(std::string str);
165 static std::string getTypeString(
DICT_TYPES t);
166 static bool isPredefinedDictinaryString(std::string str);
167 static std::vector<std::string> getDicTypes();
174 _code_id.insert(std::make_pair(code,
id));
176 static void fromVector(
const std::vector<uint64_t>& codes,
177 std::map<uint64_t, uint16_t>& code_id_map);
void insert(uint64_t code, int id)
int operator[](uint64_t code)
const std::map< uint64_t, uint16_t > & getMapCode() const
DICT_TYPES getType() const
std::map< uint64_t, uint16_t > _code_id
bool is(uint64_t code) const
std::string getName() const
This class defines a set of markers whose locations are attached to a common reference system...