Image Component Library (ICL)
Public Member Functions | Private Attributes | List of all members
icl::markers::MarkerGridDetector::GridDefinition Class Reference

Marker Grid geometry definition type. More...

#include <MarkerGridDetector.h>

Inheritance diagram for icl::markers::MarkerGridDetector::GridDefinition:
icl::markers::AdvancedMarkerGridDetector::AdvancedGridDefinition

Public Member Functions

 GridDefinition ()
 
 GridDefinition (const utils::Size &numCells, const std::vector< int > &markerIDs=std::vector< int >(), const std::string &markerType="bch")
 constructor with given parameters More...
 
utils::Point getPos (int id) const
 returns the grid x/y index for a given marker ID More...
 
int getIndex (int id) const
 returns linear grid position (row-major order!) More...
 
int getWidth () const
 returns the number of grid x-cells More...
 
int getHeight () const
 returns the number of grid y-cells More...
 
int getDim () const
 returns the number of grid cells (WxH) More...
 
const utils::SizegetSize () const
 returns the grid dimension in cells More...
 
const std::string & getMarkerType () const
 returns the marker type (bch is most common!) More...
 
const std::vector< int > & getMarkerIDs () const
 returns the internal list of marker IDs More...
 

Private Attributes

std::map< int, utils::PointposLUT
 internally used lookup for marker IDs/grid-positions More...
 
utils::Size numCells
 grid dimension More...
 
std::vector< int > ids
 used marker IDs More...
 
std::string markerType
 marker type More...
 

Detailed Description

Marker Grid geometry definition type.

The grid is defined by a number of grid cells WxH in horizontal and vertical direction resulting in a total of N=W*H markers. The marker type can chosen freely and also the marker IDs that are to be used. By default, the trivial set of marker IDs {0, .., N-1} is used. The class returns a 2D array of Fiducials. Markers that are not found result in a null Fiducial in that cell.

Constructor & Destructor Documentation

◆ GridDefinition() [1/2]

icl::markers::MarkerGridDetector::GridDefinition::GridDefinition ( )

◆ GridDefinition() [2/2]

icl::markers::MarkerGridDetector::GridDefinition::GridDefinition ( const utils::Size numCells,
const std::vector< int > &  markerIDs = std::vector< int >(),
const std::string &  markerType = "bch" 
)

constructor with given parameters

Member Function Documentation

◆ getDim()

int icl::markers::MarkerGridDetector::GridDefinition::getDim ( ) const

returns the number of grid cells (WxH)

◆ getHeight()

int icl::markers::MarkerGridDetector::GridDefinition::getHeight ( ) const

returns the number of grid y-cells

◆ getIndex()

int icl::markers::MarkerGridDetector::GridDefinition::getIndex ( int  id) const

returns linear grid position (row-major order!)

◆ getMarkerIDs()

const std::vector<int>& icl::markers::MarkerGridDetector::GridDefinition::getMarkerIDs ( ) const

returns the internal list of marker IDs

◆ getMarkerType()

const std::string& icl::markers::MarkerGridDetector::GridDefinition::getMarkerType ( ) const

returns the marker type (bch is most common!)

◆ getPos()

utils::Point icl::markers::MarkerGridDetector::GridDefinition::getPos ( int  id) const

returns the grid x/y index for a given marker ID

If the id is not contained in the grid, (-1,-1) is returned

◆ getSize()

const utils::Size& icl::markers::MarkerGridDetector::GridDefinition::getSize ( ) const

returns the grid dimension in cells

◆ getWidth()

int icl::markers::MarkerGridDetector::GridDefinition::getWidth ( ) const

returns the number of grid x-cells

Member Data Documentation

◆ ids

std::vector<int> icl::markers::MarkerGridDetector::GridDefinition::ids
private

used marker IDs

◆ markerType

std::string icl::markers::MarkerGridDetector::GridDefinition::markerType
private

marker type

◆ numCells

utils::Size icl::markers::MarkerGridDetector::GridDefinition::numCells
private

grid dimension

◆ posLUT

std::map<int,utils::Point> icl::markers::MarkerGridDetector::GridDefinition::posLUT
private

internally used lookup for marker IDs/grid-positions


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