Generic class for all tag encoding families. More...
#include <TagFamily.h>
Classes | |
class | TableInitializer |
Initializes the static popCountTable. More... | |
Public Member Functions | |
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. | |
void | setErrorRecoveryBits (int b) |
void | setErrorRecoveryFraction (float v) |
TagFamily (const TagCodes &tagCodes) | |
The codes array is not copied internally and so must not be modified externally. | |
Static Public Member Functions | |
static int | hammingDistance (unsigned long long a, unsigned long long b) |
Computes the hamming distance between two unsigned long longs. | |
static int | popCount (unsigned long long w) |
static unsigned char | popCountReal (unsigned long long w) |
How many bits are set in the unsigned long long? | |
static unsigned long long | rotate90 (unsigned long long w, int d) |
Public Attributes | |
int | bits |
Number of bits in the tag. Must be n^2. | |
int | blackBorder |
Numer of pixels wide of the inner black border. | |
std::vector< unsigned long long > | codes |
The array of the codes. The id for a code is its index. | |
int | dimension |
Dimension of tag. e.g. for 16 bits, dimension=4. Must be sqrt(bits). | |
int | errorRecoveryBits |
int | minimumHammingDistance |
Minimum hamming distance between any two codes. | |
Static Public Attributes | |
static class AprilTags::TagFamily::TableInitializer | initializer |
static unsigned char | popCountTable [popCountTableSize] |
static const int | popCountTableShift = 12 |
static const unsigned int | popCountTableSize = 1 << popCountTableShift |
Generic class for all tag encoding families.
Definition at line 28 of file TagFamily.h.
AprilTags::TagFamily::TagFamily | ( | const TagCodes & | tagCodes | ) |
The codes array is not copied internally and so must not be modified externally.
Definition at line 29 of file TagFamily.cc.
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 84 of file TagFamily.cc.
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 62 of file TagFamily.cc.
int AprilTags::TagFamily::popCount | ( | unsigned long long | w | ) | [static] |
Definition at line 75 of file TagFamily.cc.
unsigned char AprilTags::TagFamily::popCountReal | ( | unsigned long long | w | ) | [static] |
How many bits are set in the unsigned long long?
Definition at line 66 of file TagFamily.cc.
void AprilTags::TagFamily::printHammingDistances | ( | ) | const |
Prints the hamming distances of the tag codes.
Definition at line 115 of file TagFamily.cc.
unsigned long long AprilTags::TagFamily::rotate90 | ( | unsigned long long | w, |
int | d | ||
) | [static] |
Definition at line 46 of file TagFamily.cc.
void AprilTags::TagFamily::setErrorRecoveryBits | ( | int | b | ) |
Definition at line 38 of file TagFamily.cc.
void AprilTags::TagFamily::setErrorRecoveryFraction | ( | float | v | ) |
Definition at line 42 of file TagFamily.cc.
Number of bits in the tag. Must be n^2.
Definition at line 66 of file TagFamily.h.
Numer of pixels wide of the inner black border.
Definition at line 63 of file TagFamily.h.
std::vector<unsigned long long> AprilTags::TagFamily::codes |
The array of the codes. The id for a code is its index.
Definition at line 87 of file TagFamily.h.
Dimension of tag. e.g. for 16 bits, dimension=4. Must be sqrt(bits).
Definition at line 69 of file TagFamily.h.
Definition at line 84 of file TagFamily.h.
Definition at line 137 of file TagFamily.cc.
Minimum hamming distance between any two codes.
Definition at line 75 of file TagFamily.h.
unsigned char AprilTags::TagFamily::popCountTable [static] |
Definition at line 91 of file TagFamily.h.
const int AprilTags::TagFamily::popCountTableShift = 12 [static] |
Definition at line 89 of file TagFamily.h.
const unsigned int AprilTags::TagFamily::popCountTableSize = 1 << popCountTableShift [static] |
Definition at line 90 of file TagFamily.h.