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

Variable Index

 o CHANNEL_A
One of newton's 3 color channels
 o CHANNEL_B
One of newton's 3 color channels
 o CHANNEL_C
One of newton's 3 color channels
 o NEWTON_FAILURE
 o NEWTON_IO_FAILURE
 o NEWTON_SUCCESS
 o NEWTON_UNINITIALIZED

Constructor Index

 o Newton(int, int)
Instantiate a newton.Newton object.

Method Index

 o finalize()
Dispose of a newton.Newton object.
 o getArea(int, int[])
Reports the square root of the area in pixels values of visible blobs on a particular channel.
 o getNumVis(int)
Reports the number of items visible on a certain channel.
 o getX(int, int[])
Reports the X values of the visible blobs on a particular channel.
 o getY(int, int[])
Reports the Y values of visible blobs on a particular channel.
 o read_frame()
Reads one frame of visual data from the newton.

Variables

 o CHANNEL_A
 public static final int CHANNEL_A
One of newton's 3 color channels

See Also:
Newton
 o CHANNEL_B
 public static final int CHANNEL_B
One of newton's 3 color channels

See Also:
Newton
 o CHANNEL_C
 public static final int CHANNEL_C
One of newton's 3 color channels

See Also:
Newton
 o NEWTON_SUCCESS
 public static final int NEWTON_SUCCESS
 o NEWTON_FAILURE
 public static final int NEWTON_FAILURE
 o NEWTON_IO_FAILURE
 public static final int NEWTON_IO_FAILURE
 o NEWTON_UNINITIALIZED
 public static final int NEWTON_UNINITIALIZED

Constructors

 o 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.

Methods

 o 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
 o 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
 o 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
 o 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
 o 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
 o 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