Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Loading...
Searching...
No Matches
AR::MarkerPattern Class Reference

A class to represent the pattern that may appear on a physical AR tag, NOT a physical instance of a tag itself; each individual instance of the pattern as it appears in the world is represented by an instance of the Tag class, and there may be multiple Tags corresponding to the same MarkerPattern. More...

#include <MarkerPattern.h>

Public Member Functions

 MarkerPattern ()
 Creates an empty marker, with a data region size, border size, and ID of 0, and an empty matrix for the data bits.
 
 MarkerPattern (uint8_t data_region_size, uint8_t border_size, cv::Mat bits, int id)
 Creates a marker, with the given data region size, border size, data bits, and id.
 
bool empty () const
 
uint8_t getDataRegionSize () const
 
uint8_t getBorderSize () const
 
const cv::Ptr< cv::MatgetDataBits () const
 
int getId () const
 
bool operator== (const MarkerPattern &other) const
 

Detailed Description

A class to represent the pattern that may appear on a physical AR tag, NOT a physical instance of a tag itself; each individual instance of the pattern as it appears in the world is represented by an instance of the Tag class, and there may be multiple Tags corresponding to the same MarkerPattern.

MarkerPatterns are square patterns of either black or white pixels, usually with a border on the outside and a data region inside the border. MarkerPatterns should be unique and referred to uniquely by an ID, which is a non-negative integer that should be considered arbitrary and not guaranteed to have any actual meaning.

You should likely not have to construct any instances of this class yourself; this will be done internally by the Detector class.

Constructor & Destructor Documentation

◆ MarkerPattern()

AR::MarkerPattern::MarkerPattern ( )

Creates an empty marker, with a data region size, border size, and ID of 0, and an empty matrix for the data bits.

This is a default constructor just for convenience and you should not try to use these empty markers. You can check if a marker is empty using the Marker::empty() method.


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