Public Member Functions | Private Member Functions | Private Attributes | List of all members
aruco::DictionaryBased Class Reference

#include <dictionary_based.h>

Inheritance diagram for aruco::DictionaryBased:
Inheritance graph
[legend]

Public Member Functions

virtual bool detect (const cv::Mat &in, int &marker_id, int &nRotations, std::string &additionalInfo)
 
std::vector< DictionarygetDictionaries () const
 
virtual std::string getName () const
 
virtual int getNSubdivisions () const
 getNSubdivisions returns the number of subdivisions in each axis that the iamge will be subject to. This is in dictionary based labelers, equals to the number of bits in each dimension plus the border bits. More...
 
void setParams (const Dictionary &dic, float max_correction_rate)
 
virtual ~DictionaryBased ()
 
- Public Member Functions inherited from aruco::MarkerLabeler
virtual int getBestInputSize ()
 getBestInputSize if desired, you can set the desired input size to the detect function More...
 
virtual ~MarkerLabeler ()
 

Private Member Functions

bool getInnerCode (const cv::Mat &thres_img, int total_nbits, std::vector< uint64_t > &ids)
 
cv::Mat rotate (const cv::Mat &in)
 
void toMat (uint64_t code, int nbits_sq, cv::Mat &out)
 
uint64_t touulong (const cv::Mat &code)
 

Private Attributes

float _max_correction_rate
 
int _nsubdivisions = 0
 
std::string dicttypename
 
std::map< uint32_t, std::vector< Dictionary * > > nbits_dict
 
std::vector< Dictionaryvdic
 

Additional Inherited Members

- Static Public Member Functions inherited from aruco::MarkerLabeler
static cv::Ptr< MarkerLabelercreate (Dictionary::DICT_TYPES dict_type, float error_correction_rate=0)
 
static cv::Ptr< MarkerLabelercreate (std::string detector, std::string params="")
 create Factory function that returns the desired detector More...
 

Detailed Description

Labeler using a dictionary

Definition at line 28 of file dictionary_based.h.

Constructor & Destructor Documentation

◆ ~DictionaryBased()

virtual aruco::DictionaryBased::~DictionaryBased ( )
inlinevirtual

Definition at line 31 of file dictionary_based.h.

Member Function Documentation

◆ detect()

bool aruco::DictionaryBased::detect ( const cv::Mat &  in,
int &  marker_id,
int &  nRotations,
std::string &  additionalInfo 
)
virtual

function that identifies a marker.

Parameters
ininput image to analyze
marker_idid of the marker (if valid)
nRotations: output parameter nRotations must indicate how many times the marker must be rotated clockwise 90 deg to be in its ideal position. (The way you would see it when you print it). This is employed to know always which is the corner that acts as reference system.
Returns
true marker valid, false otherwise

Implements aruco::MarkerLabeler.

Definition at line 81 of file dictionary_based.cpp.

◆ getDictionaries()

std::vector<Dictionary> aruco::DictionaryBased::getDictionaries ( ) const
inline

Definition at line 49 of file dictionary_based.h.

◆ getInnerCode()

bool aruco::DictionaryBased::getInnerCode ( const cv::Mat &  thres_img,
int  total_nbits,
std::vector< uint64_t > &  ids 
)
private

Definition at line 165 of file dictionary_based.cpp.

◆ getName()

std::string aruco::DictionaryBased::getName ( ) const
virtual

Implements aruco::MarkerLabeler.

Definition at line 58 of file dictionary_based.cpp.

◆ getNSubdivisions()

virtual int aruco::DictionaryBased::getNSubdivisions ( ) const
inlinevirtual

getNSubdivisions returns the number of subdivisions in each axis that the iamge will be subject to. This is in dictionary based labelers, equals to the number of bits in each dimension plus the border bits.

Returns

Reimplemented from aruco::MarkerLabeler.

Definition at line 44 of file dictionary_based.h.

◆ rotate()

cv::Mat aruco::DictionaryBased::rotate ( const cv::Mat &  in)
private

Definition at line 296 of file dictionary_based.cpp.

◆ setParams()

void aruco::DictionaryBased::setParams ( const Dictionary dic,
float  max_correction_rate 
)

Definition at line 37 of file dictionary_based.cpp.

◆ toMat()

void aruco::DictionaryBased::toMat ( uint64_t  code,
int  nbits_sq,
cv::Mat &  out 
)
private

Definition at line 63 of file dictionary_based.cpp.

◆ touulong()

uint64_t aruco::DictionaryBased::touulong ( const cv::Mat &  code)
private

Definition at line 287 of file dictionary_based.cpp.

Member Data Documentation

◆ _max_correction_rate

float aruco::DictionaryBased::_max_correction_rate
private

Definition at line 62 of file dictionary_based.h.

◆ _nsubdivisions

int aruco::DictionaryBased::_nsubdivisions = 0
private

Definition at line 61 of file dictionary_based.h.

◆ dicttypename

std::string aruco::DictionaryBased::dicttypename
private

Definition at line 63 of file dictionary_based.h.

◆ nbits_dict

std::map<uint32_t, std::vector<Dictionary*> > aruco::DictionaryBased::nbits_dict
private

Definition at line 64 of file dictionary_based.h.

◆ vdic

std::vector<Dictionary> aruco::DictionaryBased::vdic
private

Definition at line 59 of file dictionary_based.h.


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


aruco
Author(s): Rafael Muñoz Salinas , Bence Magyar
autogenerated on Sat Sep 23 2023 02:26:45