Class MarkerLabeler

Inheritance Relationships

Derived Types

Class Documentation

class MarkerLabeler

Subclassed by aruco::DictionaryBased, aruco::FractalMarkerLabeler

Public Functions

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

function that identifies a marker.

Parameters:
  • in – input image to analyze

  • marker_id – id 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

inline virtual int getBestInputSize()

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

inline 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.

Returns:

virtual std::string getName() const = 0
inline virtual ~MarkerLabeler()

Public Static Functions

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

Factory function that returns a labeler for a given dictionary

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

Parameters:
  • dict_type – type of dictionary

  • error_correction_rate – some 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).

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

create Factory function that returns the desired detector

Factory function that returns the desired detector

Parameters:

detector

Returns: