|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EDU.gatech.cc.is.newton.Newton
Introduction
Provides an interface to the Newton Research Labs' Cognachrome
Vision System. See Newton's Users's Guide for details on their hardware.
Frame 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.
Field Summary | |
static int |
CHANNEL_A
One of newton's 3 color channels |
static int |
CHANNEL_B
One of newton's 3 color channels |
static int |
CHANNEL_C
One of newton's 3 color channels |
static int |
NEWTON_FAILURE
|
static int |
NEWTON_IO_FAILURE
|
static int |
NEWTON_SUCCESS
|
static int |
NEWTON_UNINITIALIZED
|
Constructor Summary | |
Newton(int serial_port,
int baud)
Instantiate a newton.Newton object. |
Method Summary | |
protected void |
finalize()
Dispose of a newton.Newton object. |
void |
getArea(int channel,
int[] values)
Reports the square root of the area in pixels values of visible blobs on a particular channel. |
int |
getNumVis(int channel)
Reports the number of items visible on a certain channel. |
void |
getX(int channel,
int[] values)
Reports the X values of the visible blobs on a particular channel. |
void |
getY(int channel,
int[] values)
Reports the Y values of visible blobs on a particular channel. |
void |
read_frame()
Reads one frame of visual data from the newton. |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int CHANNEL_A
Newton
public static final int CHANNEL_B
Newton
public static final int CHANNEL_C
Newton
public static final int NEWTON_SUCCESS
public static final int NEWTON_FAILURE
public static final int NEWTON_IO_FAILURE
public static final int NEWTON_UNINITIALIZED
Constructor Detail |
public Newton(int serial_port, int baud) throws java.lang.Exception
serial_port
- 1 = ttys0 (COM1), 2 = ttys1 (COM2) ...baud
- (IGNORED FOR NOW!) baud rate for communication.Method Detail |
protected void finalize() throws java.lang.Exception, java.lang.Throwable
public void read_frame()
getNumVis
,
getX
,
getY
,
getArea
public int getNumVis(int channel)
channel
- the channel to read (e.g. CHANNEL_A).getX
,
getY
,
getArea
public void getX(int channel, int[] values)
channel
- the channel to read (e.g. CHANNEL_A).readings
- an array in which to store the X values.getY
,
getArea
public void getY(int channel, int[] values)
channel
- the channel to read (e.g. CHANNEL_A).readings
- an array in which to store the Y values.getX
,
getArea
,
getNumVis
public void getArea(int channel, int[] values)
channel
- the channel to read (e.g. CHANNEL_A).readings
- an array in which to store the area values.getX
,
getY
,
getNumVis
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |