Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
aruco::Dictionary Class Reference

#include <dictionary.h>

Public Types

enum  DICT_TYPES {
  ARUCO, ARUCO_MIP_25h7, ARUCO_MIP_16h3, ARUCO_MIP_36h12,
  ARTAG, ARTOOLKITPLUS, ARTOOLKITPLUSBCH, TAG16h5,
  TAG25h7, TAG25h9, TAG36h11, TAG36h10
}
 

Public Member Functions

MarkerMap createMarkerMap (cv::Size gridSize, int MarkerSize, int MarkerDistance, const std::vector< int > &Ids, bool chess_board=false) throw (cv::Exception)
 
const std::map< uint64_t, uint16_t > & getMapCode () const
 
cv::Mat getMarkerImage_id (int id, int bit_size, bool addWaterMark=true)
 Dictionary::getMarkerImage_id. More...
 
DICT_TYPES getType () const
 
bool is (uint64_t code) const
 
uint32_t nbits () const
 
int operator[] (uint64_t code)
 
void readFromFile (std::string file) throw (cv::Exception)
 
void readFromStream (std::istream &str) throw (cv::Exception)
 
void saveToFile (std::string file) throw (cv::Exception)
 
void saveToStream (std::ostream &str) throw (cv::Exception)
 
uint64_t size () const
 
uint32_t tau () const
 

Static Public Member Functions

static std::vector< std::string > getDicTypes ()
 
static DICT_TYPES getTypeFromString (std::string str) throw (cv::Exception)
 
static std::string getTypeString (DICT_TYPES t) throw (cv::Exception)
 
static Dictionary loadPredefined (DICT_TYPES type) throw (cv::Exception)
 
static Dictionary loadPredefined (std::string type) throw (cv::Exception)
 

Private Member Functions

cv::Mat getMarkerImage_code (uint64_t id, int nbits)
 
void insert (uint64_t code, int id)
 

Static Private Member Functions

static void fromVector (const std::vector< uint64_t > &codes, std::map< uint64_t, uint16_t > &code_id_map)
 

Private Attributes

std::map< uint64_t, uint16_t > _code_id
 
uint32_t _nbits
 
uint32_t _tau
 
DICT_TYPES _type
 

Detailed Description

Represents a set of valid marker ids with a maximum size of 8x8 = 64 bits. In our approach, markers are seen as a pair code-id. The code is the internal binary code printed on the marker. Maximum size is 8x8 bits. The id is a smaller number you can use to identify it. You will use only the id

See enum DICT_TYPES for the set of dicitionaries availables

Definition at line 19 of file dictionary.h.

Member Enumeration Documentation

◆ DICT_TYPES

Enumerator
ARUCO 
ARUCO_MIP_25h7 
ARUCO_MIP_16h3 
ARUCO_MIP_36h12 
ARTAG 
ARTOOLKITPLUS 
ARTOOLKITPLUSBCH 
TAG16h5 
TAG25h7 
TAG25h9 
TAG36h11 
TAG36h10 

Definition at line 24 of file dictionary.h.

Member Function Documentation

◆ createMarkerMap()

MarkerMap aruco::Dictionary::createMarkerMap ( cv::Size  gridSize,
int  MarkerSize,
int  MarkerDistance,
const std::vector< int > &  Ids,
bool  chess_board = false 
)
throw (cv::Exception
)

Definition at line 276 of file dictionary.cpp.

◆ fromVector()

void aruco::Dictionary::fromVector ( const std::vector< uint64_t > &  codes,
std::map< uint64_t, uint16_t > &  code_id_map 
)
staticprivate

Definition at line 52 of file dictionary.cpp.

◆ getDicTypes()

vector< std::string > aruco::Dictionary::getDicTypes ( )
static

Definition at line 270 of file dictionary.cpp.

◆ getMapCode()

const std::map<uint64_t,uint16_t>& aruco::Dictionary::getMapCode ( ) const
inline

Definition at line 45 of file dictionary.h.

◆ getMarkerImage_code()

cv::Mat aruco::Dictionary::getMarkerImage_code ( uint64_t  id,
int  nbits 
)
private

◆ getMarkerImage_id()

cv::Mat aruco::Dictionary::getMarkerImage_id ( int  id,
int  bit_size,
bool  addWaterMark = true 
)

Dictionary::getMarkerImage_id.

Parameters
id
Returns

Definition at line 191 of file dictionary.cpp.

◆ getType()

DICT_TYPES aruco::Dictionary::getType ( ) const
inline

Definition at line 36 of file dictionary.h.

◆ getTypeFromString()

Dictionary::DICT_TYPES aruco::Dictionary::getTypeFromString ( std::string  str)
throw (cv::Exception
)
static

Definition at line 253 of file dictionary.cpp.

◆ getTypeString()

std::string aruco::Dictionary::getTypeString ( DICT_TYPES  t)
throw (cv::Exception
)
static

Definition at line 235 of file dictionary.cpp.

◆ insert()

void aruco::Dictionary::insert ( uint64_t  code,
int  id 
)
inlineprivate

Definition at line 76 of file dictionary.h.

◆ is()

bool aruco::Dictionary::is ( uint64_t  code) const
inline

Definition at line 34 of file dictionary.h.

◆ loadPredefined() [1/2]

Dictionary aruco::Dictionary::loadPredefined ( DICT_TYPES  type)
throw (cv::Exception
)
static

Definition at line 63 of file dictionary.cpp.

◆ loadPredefined() [2/2]

Dictionary aruco::Dictionary::loadPredefined ( std::string  type)
throw (cv::Exception
)
static

Definition at line 58 of file dictionary.cpp.

◆ nbits()

uint32_t aruco::Dictionary::nbits ( ) const
inline

Definition at line 41 of file dictionary.h.

◆ operator[]()

int aruco::Dictionary::operator[] ( uint64_t  code)
inline

Definition at line 48 of file dictionary.h.

◆ readFromFile()

void aruco::Dictionary::readFromFile ( std::string  file)
throw (cv::Exception
)

Definition at line 26 of file dictionary.cpp.

◆ readFromStream()

void aruco::Dictionary::readFromStream ( std::istream &  str)
throw (cv::Exception
)

Definition at line 41 of file dictionary.cpp.

◆ saveToFile()

void aruco::Dictionary::saveToFile ( std::string  file)
throw (cv::Exception
)

Definition at line 13 of file dictionary.cpp.

◆ saveToStream()

void aruco::Dictionary::saveToStream ( std::ostream &  str)
throw (cv::Exception
)

Definition at line 19 of file dictionary.cpp.

◆ size()

uint64_t aruco::Dictionary::size ( ) const
inline

Definition at line 39 of file dictionary.h.

◆ tau()

uint32_t aruco::Dictionary::tau ( ) const
inline

Definition at line 43 of file dictionary.h.

Member Data Documentation

◆ _code_id

std::map<uint64_t,uint16_t> aruco::Dictionary::_code_id
private

Definition at line 79 of file dictionary.h.

◆ _nbits

uint32_t aruco::Dictionary::_nbits
private

Definition at line 81 of file dictionary.h.

◆ _tau

uint32_t aruco::Dictionary::_tau
private

Definition at line 82 of file dictionary.h.

◆ _type

DICT_TYPES aruco::Dictionary::_type
private

Definition at line 86 of file dictionary.h.


The documentation for this class was generated from the following files:


tuw_aruco
Author(s): Lukas Pfeifhofer
autogenerated on Mon Feb 28 2022 23:58:06