Public Member Functions | Private Member Functions | Private Attributes
aruco::MarkerCode Class Reference

#include <highlyreliablemarkers.h>

List of all members.

Public Member Functions

unsigned int distance (MarkerCode m, unsigned int &minRot)
unsigned int distance (MarkerCode m)
void fromString (std::string s)
bool get (unsigned int pos, unsigned int rot=0)
unsigned int getId (unsigned int rot=0)
cv::Mat getImg (unsigned int pixSize)
std::vector< bool > getRotation (unsigned int rot)
 MarkerCode (unsigned int n=0)
 MarkerCode (const MarkerCode &MC)
unsigned int n ()
unsigned int selfDistance (unsigned int &minRot)
unsigned int selfDistance ()
void set (unsigned int pos, bool val)
unsigned int size ()
std::string toString ()

Private Member Functions

unsigned int hammingDistance (std::vector< bool > m1, std::vector< bool > m2)

Private Attributes

std::vector< bool > _bits [4]
unsigned int _ids [4]
unsigned int _n

Detailed Description

This class represent the internal code of a marker It does not include marker borders

Definition at line 49 of file highlyreliablemarkers.h.


Constructor & Destructor Documentation

aruco::MarkerCode::MarkerCode ( unsigned int  n = 0)

Constructor, receive dimension of marker

Definition at line 42 of file highlyreliablemarkers.cpp.

Copy Constructor

Definition at line 55 of file highlyreliablemarkers.cpp.


Member Function Documentation

unsigned int aruco::MarkerCode::distance ( MarkerCode  m,
unsigned int &  minRot 
)

Return the rotation invariant distance to another marker, D(m1, m2) (Equation 6) Assign to minRot the rotation of minimun hamming distance. The rotation refers to the marker passed as parameter, m

Definition at line 104 of file highlyreliablemarkers.cpp.

unsigned int aruco::MarkerCode::distance ( MarkerCode  m) [inline]

Return the rotation invariant distance to another marker, D(m1, m2) (Equation 6) Same method as distance(MarkerCode m, uint &minRot), except this doesnt return minRot value.

Definition at line 123 of file highlyreliablemarkers.h.

void aruco::MarkerCode::fromString ( std::string  s)

Read marker bits from a string of "0"s and "1"s

Definition at line 119 of file highlyreliablemarkers.cpp.

bool aruco::MarkerCode::get ( unsigned int  pos,
unsigned int  rot = 0 
) [inline]

Get a bit value in a specific rotation. The marker is refered as a unidimensional string of bits, i.e. pos=y*n+x

Definition at line 71 of file highlyreliablemarkers.h.

unsigned int aruco::MarkerCode::getId ( unsigned int  rot = 0) [inline]

Get id of a specific rotation as the number obtaiend from the concatenation of all the bits

Definition at line 65 of file highlyreliablemarkers.h.

cv::Mat aruco::MarkerCode::getImg ( unsigned int  pixSize)

Convert marker to a cv::Mat image of (pixSize x pixSize) pixels It adds a black border of one cell size

Definition at line 143 of file highlyreliablemarkers.cpp.

std::vector<bool> aruco::MarkerCode::getRotation ( unsigned int  rot) [inline]

Get the string of bits for a specific rotation

Definition at line 76 of file highlyreliablemarkers.h.

unsigned int aruco::MarkerCode::hammingDistance ( std::vector< bool >  m1,
std::vector< bool >  m2 
) [private]

Return hamming distance between two bit vectors

Definition at line 168 of file highlyreliablemarkers.cpp.

unsigned int aruco::MarkerCode::n ( ) [inline]

Return the value of marker dimension (n)

Definition at line 96 of file highlyreliablemarkers.h.

unsigned int aruco::MarkerCode::selfDistance ( unsigned int &  minRot)

Return the self distance S(m) of the marker (Equation 8) Assign to minRot the rotation of minimun hamming distance

Definition at line 89 of file highlyreliablemarkers.cpp.

unsigned int aruco::MarkerCode::selfDistance ( ) [inline]

Return the self distance S(m) of the marker (Equation 8) Same method as selfDistance(uint &minRot), except this doesnt return minRot value.

Definition at line 108 of file highlyreliablemarkers.h.

void aruco::MarkerCode::set ( unsigned int  pos,
bool  val 
)

Set the value of a vit in a specific rotation The marker is refered as a unidimensional string of bits, i.e. pos=y*n+x This method assure consistency of the marker code:

  • The rest of rotations are updated automatically when performing a modification
  • The id values in all rotations are automatically updated too This is the only method to modify a bit value

Definition at line 68 of file highlyreliablemarkers.cpp.

unsigned int aruco::MarkerCode::size ( ) [inline]

Return the full size of the marker (n*n)

Definition at line 91 of file highlyreliablemarkers.h.

std::string aruco::MarkerCode::toString ( )

Convert marker to a string of "0"s and "1"s

Definition at line 129 of file highlyreliablemarkers.cpp.


Member Data Documentation

std::vector<bool> aruco::MarkerCode::_bits[4] [private]

Definition at line 147 of file highlyreliablemarkers.h.

unsigned int aruco::MarkerCode::_ids[4] [private]

Definition at line 146 of file highlyreliablemarkers.h.

unsigned int aruco::MarkerCode::_n [private]

Definition at line 148 of file highlyreliablemarkers.h.


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


ar_sys
Author(s): Hamdi Sahloul , Rafael Muñoz Salinas , Bence Magyar
autogenerated on Sun Oct 5 2014 22:12:49