jAER project on SourceForge

net.sf.jaer.stereopsis
Class StereoClusterTracker

java.lang.Object
  extended by net.sf.jaer.eventprocessing.EventFilter
      extended by net.sf.jaer.eventprocessing.EventFilter2D
          extended by net.sf.jaer.eventprocessing.tracking.RectangularClusterTracker
              extended by net.sf.jaer.stereopsis.StereoClusterTracker
All Implemented Interfaces:
java.util.Observer, FrameAnnotater

public class StereoClusterTracker
extends RectangularClusterTracker

Extends ClusterTracker to track objects in 3-d space. The StereoCluster is extended to include disparity information and the events used to track are BinocularEvents.

Author:
tobi

Nested Class Summary
 class StereoClusterTracker.StereoCluster
          Extends the 2-d cluster to include 2.5-d disparity information.
 
Nested classes/interfaces inherited from class net.sf.jaer.eventprocessing.tracking.RectangularClusterTracker
RectangularClusterTracker.Cluster
 
Field Summary
protected  java.util.ArrayList<StereoClusterTracker.StereoCluster> clusters
          list of StereoCluster, this field hides the super's 2d image plane Cluster's
 
Fields inherited from class net.sf.jaer.eventprocessing.tracking.RectangularClusterTracker
ASPECT_RATIO_MAX, ASPECT_RATIO_MIN, chip, clusterCounter, defaultClusterRadius, fullbrightnessLifetime, growMergedSizeEnabled, MAX_SCALE_RATIO, mixingFactor, pruneList, random
 
Fields inherited from class net.sf.jaer.eventprocessing.EventFilter2D
enclosedFilter, out
 
Fields inherited from class net.sf.jaer.eventprocessing.EventFilter
annotationEnabled, enclosedFilterChain, filterEnabled, perf, propertyTooltipMap, support
 
Constructor Summary
StereoClusterTracker(AEChip chip)
          Creates a new instance of StereoClusterTracker
 
Method Summary
 void annotate(javax.media.opengl.GLAutoDrawable drawable)
          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).
 EventPacket filterPacket(EventPacket in)
          Subclasses implement this method to define custom processing.
 StereoClusterTracker.StereoCluster getFirstContainingCluster(BasicEvent event)
          Given AE, returns first (thus oldest) cluster that event is within.
 StereoClusterTracker.StereoCluster getNearestCluster()
          returns the physically nearest (to observer) visible cluster based on maximum disparity.
 int getNumClusters()
           
 java.util.ArrayList<StereoClusterTracker.StereoCluster> getStereoClusters()
          returns stereo clusters
 float getVelocityMixingFactor()
           
 boolean isLogDataEnabled()
           
 void resetFilter()
          should reset the filter to initial state
 void setLogDataEnabled(boolean logDataEnabled)
           
 void setVelocityMixingFactor(float velocityMixingFactor)
           
 
Methods inherited from class net.sf.jaer.eventprocessing.tracking.RectangularClusterTracker
annotate, annotate, drawBox, getAspectRatio, getClassifierThreshold, getClusterLifetimeWithoutSupportUs, getClusters, getClusterSize, getDescription, getDynamicSizeEnabled, getFilterState, getMaxNumClusters, getMixingFactor, getOpticalGyroTauLowpassMs, getPathLength, getPredictiveVelocityFactor, getSurround, getThresholdEventsForVisibleCluster, getThresholdVelocityForVisibleCluster, getVelocityPoints, initFilter, isClassifierEnabled, isClusterLifetimeIncreasesWithAge, isColorClustersDifferentlyEnabled, isDynamicAngleEnabled, isDynamicAspectRatioEnabled, isGrowMergedSizeEnabled, isHighwayPerspectiveEnabled, isOpticalGyroEnabled, isPathsEnabled, isShowAllClusters, isUseNearestCluster, isUseOffPolarityOnlyEnabled, isUseOnePolarityOnlyEnabled, isUseVelocity, setAspectRatio, setClassifierEnabled, setClassifierThreshold, setClusterLifetimeIncreasesWithAge, setClusterLifetimeWithoutSupportUs, setClusterSize, setColorClustersDifferentlyEnabled, setDynamicAngleEnabled, setDynamicAspectRatioEnabled, setDynamicSizeEnabled, setGrowMergedSizeEnabled, setHighwayPerspectiveEnabled, setMaxNumClusters, setMixingFactor, setOpticalGyroEnabled, setOpticalGyroTauLowpassMs, setPathLength, setPathsEnabled, setPredictiveVelocityFactor, setShowAllClusters, setSurround, setThresholdEventsForVisibleCluster, setThresholdVelocityForVisibleCluster, setUseNearestCluster, setUseOffPolarityOnlyEnabled, setUseOnePolarityOnlyEnabled, setUseVelocity, setVelocityPoints, toString, update
 
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, 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, wait, wait, wait
 
Methods inherited from interface net.sf.jaer.graphics.FrameAnnotater
isAnnotationEnabled, setAnnotationEnabled
 

Field Detail

clusters

protected java.util.ArrayList<StereoClusterTracker.StereoCluster> clusters
list of StereoCluster, this field hides the super's 2d image plane Cluster's

Constructor Detail

StereoClusterTracker

public StereoClusterTracker(AEChip chip)
Creates a new instance of StereoClusterTracker

Method Detail

filterPacket

public EventPacket filterPacket(EventPacket in)
Description copied from class: EventFilter2D
Subclasses implement this method to define custom processing.

Overrides:
filterPacket in class RectangularClusterTracker
Parameters:
in - the input packet
Returns:
the output packet

getStereoClusters

public java.util.ArrayList<StereoClusterTracker.StereoCluster> getStereoClusters()
returns stereo clusters

Returns:
list of StereoClusterTracker clusters

getNumClusters

public int getNumClusters()
Overrides:
getNumClusters in class RectangularClusterTracker
Returns:
number of StereoCluster's

getNearestCluster

public StereoClusterTracker.StereoCluster getNearestCluster()
returns the physically nearest (to observer) visible cluster based on maximum disparity. Not to be confused with method getNearestCluster(BasicEvent ev) that returns the closest cluster to an event in the image plane. A cluster is only returned if has received enough support to become visible.

Returns:
closest cluster, or null if there are no clusters

getFirstContainingCluster

public StereoClusterTracker.StereoCluster getFirstContainingCluster(BasicEvent event)
Given AE, returns first (thus oldest) cluster that event is within. The radius of the cluster here depends on whether size scaling is enabled.

Parameters:
event - the event
Returns:
cluster that contains event within the cluster's radius, modfied by aspect ratio. null is returned if no cluster is close enough.

resetFilter

public void resetFilter()
Description copied from class: EventFilter
should reset the filter to initial state

Overrides:
resetFilter in class RectangularClusterTracker

annotate

public void annotate(javax.media.opengl.GLAutoDrawable drawable)
Description copied from interface: FrameAnnotater
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). The FrameAnnotater then can use JOGL calls to render to the screen by getting the GL context, e.g. the following code, used in the context of an AEChip object, draws a golden lines from LL to UR of the pixel array.
        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();
 

Specified by:
annotate in interface FrameAnnotater
Overrides:
annotate in class RectangularClusterTracker
Parameters:
drawable - the OpenGL drawable components, e.g., GLCanvas

isLogDataEnabled

public boolean isLogDataEnabled()
Overrides:
isLogDataEnabled in class RectangularClusterTracker

setLogDataEnabled

public void setLogDataEnabled(boolean logDataEnabled)
Overrides:
setLogDataEnabled in class RectangularClusterTracker

getVelocityMixingFactor

public float getVelocityMixingFactor()

setVelocityMixingFactor

public void setVelocityMixingFactor(float velocityMixingFactor)

jAER project on SourceForge