|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.unizh.ini.jaer.projects.gesture.GestureTracker.Cluster
public class GestureTracker.Cluster
Represents a single tracked object
Field Summary | |
---|---|
protected java.awt.Color |
color
|
protected float |
distanceToLastEvent
|
protected int |
firstTimestamp
|
protected float |
instantaneousEventRate
|
protected float |
instantaneousISI
|
protected int |
lastTimestamp
|
java.awt.geom.Point2D.Float |
location
location of cluster in pixels |
protected int |
MAX_PATH_LENGTH
|
protected int |
numEvents
|
protected java.util.ArrayList<java.awt.geom.Point2D.Float> |
path
|
java.awt.geom.Point2D.Float |
velocity
velocity of cluster in pixels/tick, where tick is timestamp tick (usually microseconds) |
Constructor Summary | |
---|---|
GestureTracker.Cluster()
|
|
GestureTracker.Cluster(BasicEvent ev)
|
|
GestureTracker.Cluster(GestureTracker.Cluster one,
GestureTracker.Cluster two)
Constructs a cluster by merging two clusters. |
Method Summary | |
---|---|
void |
addEvent(BasicEvent event)
|
float |
distanceMetric(float dx,
float dy)
|
protected float |
distanceTo(GestureTracker.Cluster c)
|
float |
getAspectRatio()
|
float |
getAverageEventDistance()
|
float |
getAvgEventRate()
|
float |
getAvgISI()
|
int |
getClusterNumber()
|
java.awt.Color |
getColor()
|
int |
getLastEventTimestamp()
|
int |
getLifetime()
|
java.awt.geom.Point2D.Float |
getLocation()
|
float |
getMeasuredSizeCorrectedByPerspective()
Computes the size of the cluster based on average event distance and adjusted for perpective scaling. |
java.util.ArrayList<java.awt.geom.Point2D.Float> |
getPath()
|
float |
getRadius()
|
float |
getRadiusCorrectedForPerspective()
|
java.awt.geom.Point2D.Float |
getVelocity()
|
boolean |
isVisible()
|
void |
setAspectRatio(float aspectRatio)
|
void |
setAverageEventDistance(float averageEventDistance)
|
void |
setAvgEventRate(float avgEventRate)
|
void |
setAvgISI(float avgISI)
|
void |
setClusterNumber(int clusterNumber)
|
void |
setColor(java.awt.Color color)
|
void |
setColorAccordingToAge()
Sets color according to age of cluster |
void |
setColorAccordingToClass()
|
void |
setColorAccordingToQuadrant(int x,
int y)
|
void |
setColorAccordingToSize()
Sets color according to measured cluster size |
void |
setColorAutomatically()
|
void |
setLocation(java.awt.geom.Point2D.Float l)
|
void |
setRadius(float r)
the radius of a cluster is the distance in pixels from the cluster center that is the putative model size. |
java.lang.String |
toString()
|
void |
updatePath()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.awt.geom.Point2D.Float location
public java.awt.geom.Point2D.Float velocity
protected final int MAX_PATH_LENGTH
protected java.util.ArrayList<java.awt.geom.Point2D.Float> path
protected java.awt.Color color
protected int numEvents
protected int lastTimestamp
protected int firstTimestamp
protected float instantaneousEventRate
protected float instantaneousISI
protected float distanceToLastEvent
Constructor Detail |
---|
public GestureTracker.Cluster()
public GestureTracker.Cluster(BasicEvent ev)
public GestureTracker.Cluster(GestureTracker.Cluster one, GestureTracker.Cluster two)
one
- the first clustertwo
- the second clusterMethod Detail |
---|
public int getLastEventTimestamp()
public void addEvent(BasicEvent event)
public float distanceMetric(float dx, float dy)
protected final float distanceTo(GestureTracker.Cluster c)
public float getRadiusCorrectedForPerspective()
public final float getRadius()
public void setRadius(float r)
r
- the radius in pixelspublic final java.awt.geom.Point2D.Float getLocation()
public void setLocation(java.awt.geom.Point2D.Float l)
public final boolean isVisible()
public final int getLifetime()
public final void updatePath()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.ArrayList<java.awt.geom.Point2D.Float> getPath()
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
public java.awt.geom.Point2D.Float getVelocity()
public float getAverageEventDistance()
GestureTracker.mixingFactor
) distance from events to cluster centerpublic void setAverageEventDistance(float averageEventDistance)
getAverageEventDistance()
public float getMeasuredSizeCorrectedByPerspective()
public void setColorAccordingToSize()
public void setColorAccordingToQuadrant(int x, int y)
public void setColorAccordingToAge()
public void setColorAccordingToClass()
public void setColorAutomatically()
public int getClusterNumber()
public void setClusterNumber(int clusterNumber)
public float getAvgISI()
public void setAvgISI(float avgISI)
public float getAvgEventRate()
public void setAvgEventRate(float avgEventRate)
public float getAspectRatio()
public void setAspectRatio(float aspectRatio)
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |