JSci.instruments
Class PTTwoDBarycentreCross

java.lang.Object
  extended by JSci.instruments.PTTwoDBarycentreCross

public class PTTwoDBarycentreCross
extends java.lang.Object


Field Summary
static double ALPHA
          threshold for defininf the light and dark regions; 0<ALPHA<1 (ALPHA approx 0.3)
static int ODD_EVEN
          the meaning of fields in interlaced images; 1 for odd/even, 0 for odd-only fields
static double REGION_SPEED
          the speed of movement of the region; 0 = the region doesn't move; 1 = the region follows the bead
static int WEIGHT_LIGHT_PART
          the weight of the light region vs.
 
Constructor Summary
PTTwoDBarycentreCross(java.awt.Rectangle r)
           
 
Method Summary
 void find(Image i)
          ask the cross to find the bead.
 void findInterlaced(Image i)
          ask the cross to find the bead.
 int getN()
           
 double getX()
           
 double getX2()
           
 double getY()
           
 double getY2()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALPHA

public static double ALPHA
threshold for defininf the light and dark regions; 0<ALPHA<1 (ALPHA approx 0.3)


WEIGHT_LIGHT_PART

public static int WEIGHT_LIGHT_PART
the weight of the light region vs. the dark region (%)


REGION_SPEED

public static double REGION_SPEED
the speed of movement of the region; 0 = the region doesn't move; 1 = the region follows the bead


ODD_EVEN

public static int ODD_EVEN
the meaning of fields in interlaced images; 1 for odd/even, 0 for odd-only fields

Constructor Detail

PTTwoDBarycentreCross

public PTTwoDBarycentreCross(java.awt.Rectangle r)
Parameters:
r - the initial region where to look for the bead
Method Detail

find

public void find(Image i)
ask the cross to find the bead. For non-interlaced images.


findInterlaced

public void findInterlaced(Image i)
ask the cross to find the bead. For interlaced images; generates also x2 and y2 coords.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
the number of the cross; increases for each instance is created

getN

public int getN()
Returns:
the number of the bead

getX

public double getX()
Returns:
the x position of the bead

getY

public double getY()
Returns:
the y position of the bead

getX2

public double getX2()
Returns:
the x position of the bead, in the second field, only for interlaced images

getY2

public double getY2()
Returns:
the y position of the bead, in the second field, only for interlaced images