Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

AprilTags::TagFamily Class Reference

Generic class for all tag encoding families. More...

#include <TagFamily.h>


Detailed Description

Generic class for all tag encoding families.

Definition at line 16 of file TagFamily.h.

List of all members.

Classes

class  TableInitializer
 Initializes the static popCountTable. More...

Public Member Functions

 TagFamily (int bitsArg, int minimumHammingDistanceArg, const unsigned long long *codesArg)
 The codes array is not copied internally and so must not be modified externally.
void setErrorRecoveryBits (int b)
void setErrorRecoveryFraction (float v)
void decode (TagDetection &det, unsigned long long rCode) const
 Given an observed tag with code 'rCode', try to recover the id.
void printHammingDistances () const
 Prints the hamming distances of the tag codes.

Static Public Member Functions

static unsigned long long rotate90 (unsigned long long w, int d)
static int hammingDistance (unsigned long long a, unsigned long long b)
 Computes the hamming distance between two unsigned long longs.
static unsigned char popCountReal (unsigned long long w)
 How many bits are set in the unsigned long long?
static int popCount (unsigned long long w)

Public Attributes

int blackBorder
 Numer of pixels wide of the inner black border.
int bits
 Number of bits in the tag. Must be n^2.
int dimension
 Dimension of tag. e.g. for 16 bits, dimension=4. Must be sqrt(bits).
int minimumHammingDistance
 Minimum hamming distance between any two codes.
int errorRecoveryBits
std::vector< unsigned long long > codes
 The array of the codes. The id for a code is its index.

Static Public Attributes

static const int popCountTableShift = 12
static const unsigned int popCountTableSize = 1 << popCountTableShift
static unsigned char popCountTable [popCountTableSize]
static class
AprilTags::TagFamily::TableInitializer 
initializer
 Initializes the static popCountTable.
static std::map< std::pair
< int, int >, TagFamily * > 
tagFamilyRegistry

Constructor & Destructor Documentation

AprilTags::TagFamily::TagFamily ( int  bitsArg,
int  minimumHammingDistanceArg,
const unsigned long long *  codesArg 
)

The codes array is not copied internally and so must not be modified externally.

Definition at line 4 of file TagFamily.cc.


Member Function Documentation

void AprilTags::TagFamily::decode ( TagDetection det,
unsigned long long  rCode 
) const

Given an observed tag with code 'rCode', try to recover the id.

Definition at line 63 of file TagFamily.cc.

Referenced by AprilTags::TagDetector::extractTags().

int AprilTags::TagFamily::hammingDistance ( unsigned long long  a,
unsigned long long  b 
) [static]

Computes the hamming distance between two unsigned long longs.

Definition at line 41 of file TagFamily.cc.

Referenced by decode(), and printHammingDistances().

int AprilTags::TagFamily::popCount ( unsigned long long  w  )  [static]

Definition at line 54 of file TagFamily.cc.

Referenced by hammingDistance().

unsigned char AprilTags::TagFamily::popCountReal ( unsigned long long  w  )  [static]

How many bits are set in the unsigned long long?

Definition at line 45 of file TagFamily.cc.

Referenced by AprilTags::TagFamily::TableInitializer::TableInitializer().

void AprilTags::TagFamily::printHammingDistances (  )  const

Prints the hamming distances of the tag codes.

Definition at line 95 of file TagFamily.cc.

unsigned long long AprilTags::TagFamily::rotate90 ( unsigned long long  w,
int  d 
) [static]

Definition at line 25 of file TagFamily.cc.

Referenced by decode(), and printHammingDistances().

void AprilTags::TagFamily::setErrorRecoveryBits ( int  b  ) 

Definition at line 17 of file TagFamily.cc.

void AprilTags::TagFamily::setErrorRecoveryFraction ( float  v  ) 

Definition at line 21 of file TagFamily.cc.


Member Data Documentation

Number of bits in the tag. Must be n^2.

Definition at line 54 of file TagFamily.h.

Referenced by TagFamily().

Numer of pixels wide of the inner black border.

Definition at line 51 of file TagFamily.h.

Referenced by AprilTags::TagDetector::extractTags().

std::vector<unsigned long long> AprilTags::TagFamily::codes

The array of the codes. The id for a code is its index.

Definition at line 75 of file TagFamily.h.

Referenced by decode(), printHammingDistances(), and TagFamily().

Dimension of tag. e.g. for 16 bits, dimension=4. Must be sqrt(bits).

Definition at line 57 of file TagFamily.h.

Referenced by decode(), AprilTags::TagDetector::extractTags(), printHammingDistances(), and TagFamily().

Initializes the static popCountTable.

Definition at line 117 of file TagFamily.cc.

Minimum hamming distance between any two codes.

Definition at line 63 of file TagFamily.h.

Referenced by setErrorRecoveryFraction(), and TagFamily().

Definition at line 77 of file TagFamily.h.

Referenced by popCount().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:19 2016 by Doxygen 1.6.3