All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----EDU.gatech.cc.is.newton.NewtonTrans
Frames of Reference
If (X,Y) is the center of a colored blob in the image, X is the column,
numbered from 0 on the left to 200 on the right. Y is the row, from
0 at the top to 255 on the bottom.
In robot coordinates +x is forward, +y is to the left. A Nomad 150 is .24659467 meters in radius.
File Format
To work properly, NewtonTrans must read a configuration file, passed
to it at construction time. Here is the format:
a_ratio // true blob area = range * a_ratio * pixels_in_blob num_x // number of X data elements row x_val // the row of the bottom of the blob and the x coordinate row x_val // MUST BE IN ASCENDING ROW ORDER ! row x_val row x_val row x_val num_y // number of Y data elements col y_val // the col of the center of the blob and the y coordinate col y_val col y_val col y_val col y_valHere is an example file:
0.00007676243 3 91 2.40559 129 1.31339 235 0.36089 3 95 -0.762 136 0 190 0.762
protected double xLut[]
protected double yLut[]
protected double a_ratio
protected Newton newt
public static final double NO_DATA
public static final int MAX_BLOBS
public static final double BIG
public static final double ALL_MIN
public static final boolean DEBUG
public NewtonTrans(Newton n, String f)
public void read_frame()
public Vec2[] getVisualObjects(int chan)
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index