Modifier and Type | Field and Description |
---|---|
int |
bits
number of bits in the tag.
|
int |
blackBorder
How many pixels wide is the inner black border?
|
long[] |
codes
The array of the codes.
|
int |
d
dimension of tag. e.g. for 16 bits, d=4.
|
int |
errorRecoveryBits
The error recovery value determines our position on the ROC
curve.
|
int |
minimumHammingDistance
What is the minimum hamming distance between any two codes
(accounting for rotational ambiguity?
|
(package private) static byte[] |
popCountTable |
(package private) static int |
popCountTableShift |
int |
whiteBorder
How many pixels wide is the outer-most white border?
|
Constructor and Description |
---|
TagFamily(int bits,
int minimumHammingDistance,
long[] codes)
The codes array is not copied internally and so must not be
modified externally.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(TagDetection det,
long rcode)
Given an observed tag with code 'rcode', try to recover the
id.
|
java.awt.image.BufferedImage |
getAllImagesMosaic() |
int |
getTagRenderDimension()
Return the dimension of the tag including borders when we render it.
|
static int |
hammingDistance(long a,
long b)
Compute the hamming distance between two longs.
|
static void |
main(java.lang.String[] args) |
java.awt.image.BufferedImage |
makeImage(int id) |
static int |
popCount(long w) |
(package private) static int |
popCountReal(long w)
How many bits are set in the long?
|
void |
printHammingDistances() |
static long |
rotate90(long w,
int d)
if the bits in w were arranged in a d*d grid and that grid was
rotated, what would the new bits in w be?
|
void |
setErrorRecoveryBits(int b)
Set the error recovery bits.
|
void |
setErrorRecoveryFraction(double v) |
void |
writeAllImages(java.lang.String dirpath)
Generate all valid tags, writing them as PNGs in the specified
directory.
|
void |
writeAllImagesMosaic(java.lang.String filepath) |
void |
writeAllImagesPostScript(java.lang.String filepath) |
public int whiteBorder
public int blackBorder
public final int bits
public final int d
public final int minimumHammingDistance
public int errorRecoveryBits
public final long[] codes
static final int popCountTableShift
static final byte[] popCountTable
public TagFamily(int bits, int minimumHammingDistance, long[] codes)
public void setErrorRecoveryBits(int b)
public void setErrorRecoveryFraction(double v)
public static long rotate90(long w, int d)
public static final int hammingDistance(long a, long b)
static final int popCountReal(long w)
public static final int popCount(long w)
public void decode(TagDetection det, long rcode)
public int getTagRenderDimension()
public java.awt.image.BufferedImage makeImage(int id)
public void writeAllImages(java.lang.String dirpath) throws java.io.IOException
java.io.IOException
public java.awt.image.BufferedImage getAllImagesMosaic()
public void writeAllImagesMosaic(java.lang.String filepath) throws java.io.IOException
java.io.IOException
public void printHammingDistances()
public void writeAllImagesPostScript(java.lang.String filepath) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)