|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaer.eventprocessing.EventFilter
net.sf.jaer.eventprocessing.EventFilter2D
net.sf.jaer.eventprocessing.tracking.ClusterTracker
public class ClusterTracker
Tracks blobs of events. Based (probably very loosely) on conversation with Martin Litzenberger.
The ClusterTracker starts with no clusters. When called with AEPacket2D of events, assigns the first cluster to the median event location, based on MedianTracker notion of median event location, iff the location std dev is not too large. Then every subsequent event that is processed is either assigned to an existing cluster (if the event location is close enough to the cluster center) or a new cluster is generated. A cluster remains until its support fades away, meaning that it lacks support compared with other clusters. Initially, there will be just random clusters corresponding to noise events, but these will quickly be pruned away because they will lack support compared with real clusters, which will have continued support.
Clusters also have persistence: if a cluster has sustained support, then it keeps itself alive according to this support. The implicit (past) support is a quantity that is charged up by support and fades away over time without support. Thus a cluster can survive even when it gets no support for a time. This mechanism keeps clusters from objects that move and then momentarily stop.
Nested Class Summary | |
---|---|
class |
ClusterTracker.ClosestCluster
Deprecated. Represents a cluster and a distance (the distance of an event to the cluster) |
class |
ClusterTracker.Cluster
Deprecated. Represents a single tracked object |
Field Summary | |
---|---|
protected float |
aspectRatio
Deprecated. |
protected AEChip |
chip
Deprecated. |
protected int |
clusterCounter
Deprecated. |
protected java.util.ArrayList<ClusterTracker.Cluster> |
clusters
Deprecated. |
protected float |
clusterSize
Deprecated. |
protected boolean |
colorClustersDifferentlyEnabled
Deprecated. |
protected float |
defaultClusterRadius
Deprecated. |
protected static float |
fullbrightnessLifetime
Deprecated. |
protected boolean |
growMergedSizeEnabled
Deprecated. |
protected float |
mixingFactor
Deprecated. |
protected boolean |
pathsEnabled
Deprecated. |
protected java.util.LinkedList<ClusterTracker.Cluster> |
pruneList
Deprecated. |
protected java.util.Random |
random
Deprecated. |
protected boolean |
scaleEnabled
Deprecated. |
protected float |
surround
Deprecated. |
protected boolean |
useOffPolarityOnlyEnabled
Deprecated. |
protected boolean |
useOnePolarityOnlyEnabled
Deprecated. |
protected float |
velocityMixingFactor
Deprecated. |
Fields inherited from class net.sf.jaer.eventprocessing.EventFilter2D |
---|
enclosedFilter, out |
Fields inherited from class net.sf.jaer.eventprocessing.EventFilter |
---|
annotationEnabled, enclosedFilterChain, filterEnabled, log, perf, propertyTooltipMap, support |
Constructor Summary | |
---|---|
ClusterTracker(AEChip chip)
Deprecated. Creates a new instance of ClusterTracker |
Method Summary | |
---|---|
void |
annotate(float[][][] frame)
Deprecated. annotate the rendered retina frame to show locations of clusters |
void |
annotate(javax.media.opengl.GLAutoDrawable drawable)
Deprecated. Each annotator enters annotate with graphics context current, in coordinates with pixel 0,0 in LL corner (note opposite from Java2D) and pixel spacing 1 unit after the scaling transform (which is already active). |
void |
annotate(java.awt.Graphics2D g)
Deprecated. each annotator is called by the relevant class (e.g. |
ClusterTracker.ClosestCluster |
closestCluster(BasicEvent event)
Deprecated. method that given AE, returns closest cluster and distance to it. |
EventPacket |
filterPacket(EventPacket in)
Deprecated. Subclasses implement this method to define custom processing. |
int |
getClusterLifetimeWithoutSupport()
Deprecated. lifetime of cluster in ms without support |
java.util.ArrayList<ClusterTracker.Cluster> |
getClusters()
Deprecated. |
float |
getClusterSize()
Deprecated. max distance from cluster to event as fraction of size of array |
java.lang.Object |
getFilterState()
Deprecated. should return the filter state in some useful form |
ClusterTracker.ClosestCluster |
getFirstContainingCluster(BasicEvent event)
Deprecated. Given AE, returns first cluster that event is within |
int |
getMaxNumClusters()
Deprecated. max number of clusters |
float |
getMixingFactor()
Deprecated. |
int |
getNumClusters()
Deprecated. |
java.util.LinkedList<ClusterTracker.Cluster> |
getPruneList()
Deprecated. |
boolean |
getScaleEnabled()
Deprecated. |
float |
getSurround()
Deprecated. |
int |
getThresholdEventsForVisibleCluster()
Deprecated. number of events to make a potential cluster visible |
float |
getVelocityMixingFactor()
Deprecated. |
void |
initFilter()
Deprecated. this should allocate and initialize memory: it may be called when the chip e.g. |
boolean |
isColorClustersDifferentlyEnabled()
Deprecated. |
boolean |
isGeneratingFilter()
Deprecated. |
boolean |
isGrowMergedSizeEnabled()
Deprecated. |
boolean |
isHighwayPerspectiveEnabled()
Deprecated. |
boolean |
isLogDataEnabled()
Deprecated. |
boolean |
isPathsEnabled()
Deprecated. |
boolean |
isShowVelocity()
Deprecated. |
boolean |
isUseOffPolarityOnlyEnabled()
Deprecated. |
boolean |
isUseOnePolarityOnlyEnabled()
Deprecated. |
void |
preferenceChange(java.util.prefs.PreferenceChangeEvent evt)
Deprecated. |
void |
resetFilter()
Deprecated. should reset the filter to initial state |
void |
setClusterLifetimeWithoutSupport(int clusterLifetimeWithoutSupport)
Deprecated. lifetime of cluster in ms without support |
void |
setClusterSize(float clusterSize)
Deprecated. sets max distance from cluster to event as fraction of size of array |
void |
setColorClustersDifferentlyEnabled(boolean colorClustersDifferentlyEnabled)
Deprecated. |
void |
setGrowMergedSizeEnabled(boolean growMergedSizeEnabled)
Deprecated. |
void |
setHighwayPerspectiveEnabled(boolean highwayPerspectiveEnabled)
Deprecated. |
void |
setLogDataEnabled(boolean logDataEnabled)
Deprecated. |
void |
setMaxNumClusters(int maxNumClusters)
Deprecated. max number of clusters |
void |
setMixingFactor(float mixingFactor)
Deprecated. |
void |
setPathsEnabled(boolean pathsEnabled)
Deprecated. |
void |
setScaleEnabled(boolean scaleEnabled)
Deprecated. |
void |
setShowVelocity(boolean showVelocity)
Deprecated. |
void |
setSurround(float surround)
Deprecated. |
void |
setThresholdEventsForVisibleCluster(int thresholdEventsForVisibleCluster)
Deprecated. number of events to make a potential cluster visible |
void |
setUseOffPolarityOnlyEnabled(boolean useOffPolarityOnlyEnabled)
Deprecated. |
void |
setUseOnePolarityOnlyEnabled(boolean useOnePolarityOnlyEnabled)
Deprecated. |
void |
setVelocityMixingFactor(float velocityMixingFactor)
Deprecated. |
void |
update(java.util.Observable o,
java.lang.Object arg)
Deprecated. |
Methods inherited from class net.sf.jaer.eventprocessing.EventFilter2D |
---|
checkOutputPacketEventType, checkOutputPacketEventType, getEnclosedFilter, resetOut, setEnclosedFilter, setFilterEnabled |
Methods inherited from class net.sf.jaer.eventprocessing.EventFilter |
---|
getChip, getDescription, getEnclosedFilterChain, getEnclosingFilter, getPrefs, getPropertyChangeSupport, getPropertyTooltip, isAnnotationEnabled, isEnclosed, isFilterEnabled, prefsEnabledKey, setAnnotationEnabled, setChip, setEnclosed, setEnclosedFilter, setEnclosedFilterChain, setEnclosingFilter, setPreferredEnabledState, setPrefs, setPropertyTooltip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.jaer.graphics.FrameAnnotater |
---|
isAnnotationEnabled, setAnnotationEnabled |
Field Detail |
---|
protected java.util.ArrayList<ClusterTracker.Cluster> clusters
protected AEChip chip
protected float defaultClusterRadius
protected float mixingFactor
protected float velocityMixingFactor
protected float surround
protected boolean scaleEnabled
protected boolean pathsEnabled
protected boolean colorClustersDifferentlyEnabled
protected boolean useOnePolarityOnlyEnabled
protected boolean useOffPolarityOnlyEnabled
protected float aspectRatio
protected float clusterSize
protected boolean growMergedSizeEnabled
protected java.util.LinkedList<ClusterTracker.Cluster> pruneList
protected int clusterCounter
protected static final float fullbrightnessLifetime
protected java.util.Random random
Constructor Detail |
---|
public ClusterTracker(AEChip chip)
Method Detail |
---|
public void initFilter()
EventFilter
initFilter
in class EventFilter
public int getNumClusters()
public ClusterTracker.ClosestCluster closestCluster(BasicEvent event)
event
- the event
public ClusterTracker.ClosestCluster getFirstContainingCluster(BasicEvent event)
event
- the event
public java.util.ArrayList<ClusterTracker.Cluster> getClusters()
public java.util.LinkedList<ClusterTracker.Cluster> getPruneList()
public final int getClusterLifetimeWithoutSupport()
public void setClusterLifetimeWithoutSupport(int clusterLifetimeWithoutSupport)
public final float getClusterSize()
public void setClusterSize(float clusterSize)
public final int getMaxNumClusters()
public void setMaxNumClusters(int maxNumClusters)
public final int getThresholdEventsForVisibleCluster()
public void setThresholdEventsForVisibleCluster(int thresholdEventsForVisibleCluster)
public java.lang.Object getFilterState()
EventFilter
getFilterState
in class EventFilter
public boolean isGeneratingFilter()
public void resetFilter()
EventFilter
resetFilter
in class EventFilter
public EventPacket filterPacket(EventPacket in)
EventFilter2D
filterPacket
in class EventFilter2D
in
- the input packet
public boolean isHighwayPerspectiveEnabled()
public void setHighwayPerspectiveEnabled(boolean highwayPerspectiveEnabled)
public float getMixingFactor()
public void setMixingFactor(float mixingFactor)
public float getSurround()
public void setSurround(float surround)
public boolean isPathsEnabled()
public void setPathsEnabled(boolean pathsEnabled)
public boolean getScaleEnabled()
public void setScaleEnabled(boolean scaleEnabled)
public boolean isColorClustersDifferentlyEnabled()
public void setColorClustersDifferentlyEnabled(boolean colorClustersDifferentlyEnabled)
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
public boolean isUseOnePolarityOnlyEnabled()
public void setUseOnePolarityOnlyEnabled(boolean useOnePolarityOnlyEnabled)
public boolean isUseOffPolarityOnlyEnabled()
public void setUseOffPolarityOnlyEnabled(boolean useOffPolarityOnlyEnabled)
public void annotate(java.awt.Graphics2D g)
FrameAnnotater
annotate
in interface FrameAnnotater
g
- the Graphics2D contextpublic void annotate(javax.media.opengl.GLAutoDrawable drawable)
FrameAnnotater
GL gl = drawable.getGL(); gl.glBegin(GL.GL_LINES); gl.glColor3f(.5f, .5f, 0); gl.glVertex2f(0, 0); gl.glVertex2f(getSizeX() - 1, getSizeY() - 1); gl.glEnd();
annotate
in interface FrameAnnotater
drawable
- the OpenGL drawable components, e.g., GLCanvaspublic void annotate(float[][][] frame)
annotate
in interface FrameAnnotater
frame
- the RGB pixel information. First dimension is Y, second is X, third is RGBpublic void preferenceChange(java.util.prefs.PreferenceChangeEvent evt)
preferenceChange
in interface java.util.prefs.PreferenceChangeListener
public boolean isGrowMergedSizeEnabled()
public void setGrowMergedSizeEnabled(boolean growMergedSizeEnabled)
public float getVelocityMixingFactor()
public void setVelocityMixingFactor(float velocityMixingFactor)
public void setShowVelocity(boolean showVelocity)
public boolean isShowVelocity()
public boolean isLogDataEnabled()
public void setLogDataEnabled(boolean logDataEnabled)
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |