|
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.MultiLineClusterTracker
public class MultiLineClusterTracker
Tracks multiple lines in the scene using a cluster based method based on pairs of recent events. The event pairs come from a buffer formed from recent events. Each pair defines a line with polar and angle parameters. Lines are tracked using polar (rho) and angle (theta) parameters in a space of rho/theta, in analogy with the MultiLineClusterTracker tracking of rectangular objects in retinal coordinate space.
LineDetector| Nested Class Summary | |
|---|---|
class |
MultiLineClusterTracker.LineCluster
Represents a single tracked line. |
| Field Summary | |
|---|---|
protected AEChip |
chip
|
protected int |
clusterCounter
|
protected static float |
fullbrightnessLifetime
|
static float |
MAX_SCALE_RATIO
scaling can't make cluster bigger or smaller than this ratio to default cluster size |
protected java.util.LinkedList<MultiLineClusterTracker.LineCluster> |
pruneList
|
| 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 | |
|---|---|
MultiLineClusterTracker(AEChip chip)
Creates a new instance of MultiLineClusterTracker |
|
| Method Summary | |
|---|---|
void |
annotate(float[][][] frame)
annotate the RGB frame somehow by color pixels in the rendered pixel frame data. |
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). |
void |
annotate(java.awt.Graphics2D g)
each annotator is called by the relevant class (e.g. |
EventPacket |
filterPacket(EventPacket in)
Subclasses implement this method to define custom processing. |
int |
getClusterLifetimeWithoutSupportUs()
lifetime of cluster in ms without support |
java.util.List<MultiLineClusterTracker.LineCluster> |
getClusters()
Returns list of all clusters, including those not "visible" yet. |
static java.lang.String |
getDescription()
|
int |
getEventBufferLength()
|
java.lang.Object |
getFilterState()
should return the filter state in some useful form |
int |
getMaxNumClusters()
max number of clusters |
int |
getMaxSegmentDt()
|
int |
getMaxSegmentLength()
|
float |
getMinDistanceNormalized()
|
int |
getMinSegmentLength()
|
float |
getMixingFactorLength()
|
float |
getMixingFactorPosition()
|
float |
getMixingFactorRho()
|
float |
getMixingFactorTheta()
|
int |
getNumClusters()
|
int |
getOriDiffAllowed()
|
float |
getRhoPixelsFiltered()
returns the filtered Hough line radius estimate - the closest distance from the middle of the chip image. |
float |
getRhoRadius()
|
MultiLineClusterTracker.LineCluster |
getStrongestCluster()
returns cluster with maximum average event rate. |
float |
getTauMs()
|
float |
getThetaDegFiltered()
returns the filtered angle of the line cluster normal. |
float |
getThetaRadiusDeg()
|
int |
getThresholdEventsForVisibleCluster()
number of events to make a potential cluster visible |
void |
initFilter()
this should allocate and initialize memory: it may be called when the chip e.g. |
boolean |
isClusterLifetimeIncreasesWithAge()
|
boolean |
isColorClustersDifferentlyEnabled()
|
boolean |
isLengthEnabled()
|
boolean |
isLogDataEnabled()
|
boolean |
isRenderInputEvents()
|
boolean |
isShowAllClusters()
|
boolean |
isShowLineSegments()
|
boolean |
isWeightLengthEnabled()
|
void |
resetFilter()
should reset the filter to initial state |
void |
setClusterLifetimeIncreasesWithAge(boolean clusterLifetimeIncreasesWithAge)
If true, cluster lifetime withtout support increases proportional to the age of the cluster relative to the clusterLifetimeWithoutSupportUs time |
void |
setClusterLifetimeWithoutSupportUs(int clusterLifetimeWithoutSupport)
lifetime of cluster in ms without support |
void |
setColorClustersDifferentlyEnabled(boolean colorClustersDifferentlyEnabled)
|
void |
setEventBufferLength(int eventBufferLength)
Sets tne number of events to consider for forming line segments for clustering |
void |
setLengthEnabled(boolean lengthEnabled)
|
void |
setLogDataEnabled(boolean logDataEnabled)
|
void |
setMaxNumClusters(int maxNumClusters)
max number of clusters |
void |
setMaxSegmentDt(int maxSegmentDt)
|
void |
setMaxSegmentLength(int maxSegmentLength)
|
void |
setMinDistanceNormalized(float minDistanceNormalized)
|
void |
setMinSegmentLength(int minSegmentLength)
|
void |
setMixingFactorLength(float mixingFactorLength)
|
void |
setMixingFactorPosition(float mixingFactorPosition)
|
void |
setMixingFactorRho(float mixingFactor)
|
void |
setMixingFactorTheta(float mixingFactor)
|
void |
setOriDiffAllowed(int oriDiffAllowed)
|
void |
setRenderInputEvents(boolean renderInputEvents)
|
void |
setRhoRadius(float rhoRadius)
|
void |
setShowAllClusters(boolean showAllClusters)
Sets annotation visibility of clusters that are not "visible" |
void |
setShowLineSegments(boolean showLineSegments)
|
void |
setTauMs(float tauMs)
|
void |
setThetaRadiusDeg(float thetaRadius)
Sets radius of LineClusters; argument is in degrees for user interface |
void |
setThresholdEventsForVisibleCluster(int thresholdEventsForVisibleCluster)
number of events to make a potential cluster visible |
void |
setWeightLengthEnabled(boolean weightLengthEnabled)
|
java.lang.String |
toString()
|
void |
update(java.util.Observable o,
java.lang.Object arg)
|
| 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 |
|---|
protected AEChip chip
public static final float MAX_SCALE_RATIO
protected java.util.LinkedList<MultiLineClusterTracker.LineCluster> pruneList
protected int clusterCounter
protected static final float fullbrightnessLifetime
| Constructor Detail |
|---|
public MultiLineClusterTracker(AEChip chip)
chip - the chip we are tracking for| Method Detail |
|---|
public static java.lang.String getDescription()
public void initFilter()
EventFilter
initFilter in class EventFilterpublic EventPacket filterPacket(EventPacket in)
EventFilter2D
filterPacket in class EventFilter2Din - the input packet
public int getNumClusters()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.List<MultiLineClusterTracker.LineCluster> getClusters()
public MultiLineClusterTracker.LineCluster getStrongestCluster()
public final int getClusterLifetimeWithoutSupportUs()
public void setClusterLifetimeWithoutSupportUs(int clusterLifetimeWithoutSupport)
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 EventFilterpublic void resetFilter()
EventFilter
resetFilter in class EventFilterpublic float getMixingFactorRho()
public void setMixingFactorRho(float mixingFactor)
public float getMixingFactorTheta()
public void setMixingFactorTheta(float mixingFactor)
public boolean isColorClustersDifferentlyEnabled()
setColorClustersDifferentlyEnabled(boolean)public void setColorClustersDifferentlyEnabled(boolean colorClustersDifferentlyEnabled)
colorClustersDifferentlyEnabled - true to color each cluster a different color. false to color each cluster
by its age
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerpublic void annotate(java.awt.Graphics2D g)
FrameAnnotater
annotate in interface FrameAnnotaterg - the Graphics2D contextpublic void annotate(float[][][] frame)
FrameAnnotater
annotate in interface FrameAnnotaterframe - the RGB pixel information. First dimension is Y, second is X, third is RGBpublic 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 FrameAnnotaterdrawable - the OpenGL drawable components, e.g., GLCanvaspublic boolean isLogDataEnabled()
public void setLogDataEnabled(boolean logDataEnabled)
public boolean isShowAllClusters()
public void setShowAllClusters(boolean showAllClusters)
showAllClusters - true to show all clusters even if there are not "visible"public boolean isClusterLifetimeIncreasesWithAge()
public void setClusterLifetimeIncreasesWithAge(boolean clusterLifetimeIncreasesWithAge)
public int getEventBufferLength()
public void setEventBufferLength(int eventBufferLength)
eventBufferLength - the length of the buffer in eventspublic float getRhoRadius()
public void setRhoRadius(float rhoRadius)
public float getThetaRadiusDeg()
public void setThetaRadiusDeg(float thetaRadius)
public int getMinSegmentLength()
public void setMinSegmentLength(int minSegmentLength)
public int getMaxSegmentLength()
public void setMaxSegmentLength(int maxSegmentLength)
public int getMaxSegmentDt()
public void setMaxSegmentDt(int maxSegmentDt)
public float getMixingFactorPosition()
public void setMixingFactorPosition(float mixingFactorPosition)
public boolean isShowLineSegments()
public void setShowLineSegments(boolean showLineSegments)
public float getMinDistanceNormalized()
public void setMinDistanceNormalized(float minDistanceNormalized)
public float getMixingFactorLength()
public void setMixingFactorLength(float mixingFactorLength)
public boolean isLengthEnabled()
public void setLengthEnabled(boolean lengthEnabled)
public boolean isWeightLengthEnabled()
public void setWeightLengthEnabled(boolean weightLengthEnabled)
public boolean isRenderInputEvents()
public void setRenderInputEvents(boolean renderInputEvents)
public float getRhoPixelsFiltered()
getRhoPixelsFiltered in interface LineDetectorpublic float getThetaDegFiltered()
getThetaDegFiltered in interface LineDetectorpublic float getTauMs()
public void setTauMs(float tauMs)
public int getOriDiffAllowed()
public void setOriDiffAllowed(int oriDiffAllowed)
|
jAER project on SourceForge | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||