|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttopcodes.TopCode
public class TopCode
TopCodes (Tangible Object Placement Codes) are black-and-white circular fiducials designed to be recognized quickly by low-resolution digital cameras with poor optics. The TopCode symbol format is based on the open SpotCode format: http://www.highenergymagic.com/spotcode/symbols.html Each TopCode encodes a 13-bit number in a single data ring on the outer edge of the symbol. Zero is represented by a black sector and one is represented by a white sector.
Constructor Summary | |
---|---|
TopCode()
Default constructor |
|
TopCode(int code)
Create a TopCode with the given id number. |
Method Summary | |
---|---|
void |
annotate(java.awt.Graphics2D g,
Scanner scanner)
|
int |
decode(Scanner scanner,
int cx,
int cy)
Decodes a symbol given any point (cx, cy) inside the center circle (bulls-eye) of the code. |
void |
draw(java.awt.Graphics2D g)
Draws this spotcode with its current location and orientation |
static TopCode[] |
generateCodes()
Generates a list of all valid TopCodes |
float |
getCenterX()
Returns the x-coordinate for the center point of the symbol. |
float |
getCenterY()
Returns the y-coordinate for the center point of the symbol. |
int |
getCode()
Returns the ID number for this symbol. |
float |
getDiameter()
Returns the diameter of this code in pixels. |
float |
getOrientation()
Returns the orientation of this code in radians and accurate to about plus or minus one degree. |
boolean |
isValid()
Returns true if this code was sucessfully decoded. |
void |
setCode(int code)
Sets the ID number for this symbol. |
void |
setDiameter(float diameter)
Sets the diameter of this code in pixels. |
void |
setLocation(float x,
float y)
Sets the x- and y-coordinates for the center point of the symbol. |
void |
setOrientation(float orientation)
Sets the angular orientation of this code in radians. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TopCode()
public TopCode(int code)
Method Detail |
---|
public int getCode()
public void setCode(int code)
public float getOrientation()
public void setOrientation(float orientation)
public float getDiameter()
public void setDiameter(float diameter)
public float getCenterX()
public float getCenterY()
public void setLocation(float x, float y)
public boolean isValid()
public int decode(Scanner scanner, int cx, int cy)
public void annotate(java.awt.Graphics2D g, Scanner scanner)
public void draw(java.awt.Graphics2D g)
public static TopCode[] generateCodes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |