Public Member Functions | Static Public Member Functions | List of all members
aruco::MarkerLabeler Class Referenceabstract

Base class of labelers. A labelers receive a square of the image and determines if it has a valid marker, its id and rotation Additionally, it implements the factory model. More...

#include <markerlabeler.h>

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

Public Member Functions

virtual bool detect (const cv::Mat &in, int &marker_id, int &nRotations)=0
 
virtual int getBestInputSize ()
 getBestInputSize if desired, you can set the desired input size to the detect function More...
 
virtual std::string getName () const =0
 
virtual ~MarkerLabeler ()
 

Static Public Member Functions

static cv::Ptr< MarkerLabelercreate (Dictionary::DICT_TYPES dict_type, float error_correction_rate=0) throw (cv::Exception)
 
static cv::Ptr< MarkerLabelercreate (std::string detector, std::string params="") throw (cv::Exception)
 create Factory function that returns the desired detector More...
 

Detailed Description

Base class of labelers. A labelers receive a square of the image and determines if it has a valid marker, its id and rotation Additionally, it implements the factory model.

Definition at line 39 of file markerlabeler.h.

Constructor & Destructor Documentation

◆ ~MarkerLabeler()

virtual aruco::MarkerLabeler::~MarkerLabeler ( )
inlinevirtual

Definition at line 89 of file markerlabeler.h.

Member Function Documentation

◆ create() [1/2]

cv::Ptr< MarkerLabeler > aruco::MarkerLabeler::create ( Dictionary::DICT_TYPES  dict_type,
float  error_correction_rate = 0 
)
throw (cv::Exception
)
static

Factory function that returns a labeler for a given dictionary

Parameters
dict_typetype of dictionary
error_correction_ratesome dictionaries are subsceptible of error correction. This params specify the correction rate. 0 means no correction at all. 1 means full correction (maximum correction bits = (tau-1) /2, tau= predefined mimum intermarker distance).

If you want correction capabilities and not sure how much, use 0.5 in this parameter

Definition at line 5 of file markerlabeler.cpp.

◆ create() [2/2]

cv::Ptr< MarkerLabeler > aruco::MarkerLabeler::create ( std::string  detector,
std::string  params = "" 
)
throw (cv::Exception
)
static

create Factory function that returns the desired detector

Factory function that returns the desired detector

Parameters
detector
paramsoptional parameters When HRM, the path to the dictionary desired.
Returns

Definition at line 15 of file markerlabeler.cpp.

◆ detect()

virtual bool aruco::MarkerLabeler::detect ( const cv::Mat &  in,
int &  marker_id,
int &  nRotations 
)
pure 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

Implemented in aruco::SVMMarkers, and aruco::DictionaryBased.

◆ getBestInputSize()

virtual int aruco::MarkerLabeler::getBestInputSize ( )
inlinevirtual

getBestInputSize if desired, you can set the desired input size to the detect function

Returns
-1 if detect accept any type of input, or a size otherwise

Reimplemented in aruco::hrm::HighlyReliableMarkers, and aruco::SVMMarkers.

Definition at line 84 of file markerlabeler.h.

◆ getName()

virtual std::string aruco::MarkerLabeler::getName ( ) const
pure virtual

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