JSci.instruments
Class PTTemplateCross

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

 class PTTemplateCross
extends java.lang.Object

Locating a template in the image


Field Summary
static double REGION_SPEED
          How fast the search area is moved (0-1)
 
Constructor Summary
PTTemplateCross(java.awt.Rectangle p, java.awt.Rectangle s, Image i)
           
 
Method Summary
 void find(Image img)
          Locates the template; draws the current bounds of the template on the image
 int getN()
           
 double getX()
           
 double getY()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REGION_SPEED

public static double REGION_SPEED
How fast the search area is moved (0-1)

Constructor Detail

PTTemplateCross

public PTTemplateCross(java.awt.Rectangle p,
                       java.awt.Rectangle s,
                       Image i)
Parameters:
p - initial position of the template in the image
s - search area
i - the image to be searched (template)
Method Detail

find

public void find(Image img)
Locates the template; draws the current bounds of the template on the image

Parameters:
img - the image that has been just grabbed

getN

public int getN()
Returns:
the (sequential) number of the template

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

getX

public double getX()
Returns:
X position of the object

getY

public double getY()
Returns:
Y position of the object