All Packages Class Hierarchy This Package Previous Next Index
Class EDU.gatech.cc.is.newton.Newton
java.lang.Object
|
+----EDU.gatech.cc.is.newton.Newton
- public class Newton
- extends Object
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.
- Version:
- July 1997
- Author:
- (c)1997 Tucker Balch & David Huggins, All Rights Reserved
-
CHANNEL_A
- One of newton's 3 color channels
-
CHANNEL_B
- One of newton's 3 color channels
-
CHANNEL_C
- One of newton's 3 color channels
-
NEWTON_FAILURE
-
-
NEWTON_IO_FAILURE
-
-
NEWTON_SUCCESS
-
-
NEWTON_UNINITIALIZED
-
-
Newton(int, int)
- Instantiate a newton.Newton object.
-
finalize()
- Dispose of a newton.Newton object.
-
getArea(int, int[])
- Reports the square root of the area in pixels values
of visible blobs on a particular
channel.
-
getNumVis(int)
- Reports the number of items visible on a certain channel.
-
getX(int, int[])
- Reports the X values of the visible blobs on a particular
channel.
-
getY(int, int[])
- Reports the Y values of visible blobs on a particular
channel.
-
read_frame()
- Reads one frame of visual data from the newton.
CHANNEL_A
public static final int CHANNEL_A
- One of newton's 3 color channels
- See Also:
- Newton
CHANNEL_B
public static final int CHANNEL_B
- One of newton's 3 color channels
- See Also:
- Newton
CHANNEL_C
public static final int CHANNEL_C
- One of newton's 3 color channels
- See Also:
- Newton
NEWTON_SUCCESS
public static final int NEWTON_SUCCESS
NEWTON_FAILURE
public static final int NEWTON_FAILURE
NEWTON_IO_FAILURE
public static final int NEWTON_IO_FAILURE
NEWTON_UNINITIALIZED
public static final int NEWTON_UNINITIALIZED
Newton
public Newton(int serial_port,
int baud) throws Exception
- Instantiate a newton.Newton object. You should only
instantiate one of these per newton board connected to your
computer. Configures the board with default values.
Standard call is Newton(3,38400);
- Parameters:
- serial_port - 1 = ttys0 (COM1), 2 = ttys1 (COM2) ...
- baud - (IGNORED FOR NOW!) baud rate for communication.
- Throws: Exception
- If unable to make native code resident.
finalize
protected void finalize() throws Exception, Throwable
- Dispose of a newton.Newton object. You should never
call this, the garbage collector calls it.
- Throws: Exception
- If unable to release code resources.
- Throws: Throwable
- If super.finalize() throws it.
- Overrides:
- finalize in class Object
read_frame
public native void read_frame()
- Reads one frame of visual data from the newton. Use
the get* methods to retrieve the data.
- See Also:
- getNumVis, getX, getY, getArea
getNumVis
public native int getNumVis(int channel)
- Reports the number of items visible on a certain channel.
Use the get* methods to retrieve the data.
- Parameters:
- channel - the channel to read (e.g. CHANNEL_A).
- Returns:
- s the number of items visible on that channel.
- See Also:
- getX, getY, getArea
getX
public native void getX(int channel,
int values[])
- Reports the X values of the visible blobs on a particular
channel. X ranges from 0 to 200 (left to right)
Use getNumVis first to size your array.
and represents the column of the center of a blob.
- Parameters:
- channel - the channel to read (e.g. CHANNEL_A).
- readings - an array in which to store the X values.
- Returns:
- s the number of items visible on that channel.
- See Also:
- getY, getArea
getY
public native void getY(int channel,
int values[])
- Reports the Y values of visible blobs on a particular
channel. Y ranges from 0 to 255 (top to bottom)
and represents the row of the center of a blob.
Use getNumVis first to size your array.
- Parameters:
- channel - the channel to read (e.g. CHANNEL_A).
- readings - an array in which to store the Y values.
- Returns:
- s the number of items visible on that channel.
- See Also:
- getX, getArea, getNumVis
getArea
public native void getArea(int channel,
int values[])
- Reports the square root of the area in pixels values
of visible blobs on a particular
channel.
Use getNumVis first to size your array.
- Parameters:
- channel - the channel to read (e.g. CHANNEL_A).
- readings - an array in which to store the area values.
- Returns:
- s the number of items visible on that channel.
- See Also:
- getX, getY, getNumVis
All Packages Class Hierarchy This Package Previous Next Index