|
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.label.SimpleOrientationFilter
public class SimpleOrientationFilter
Computes simple-type orientation-tuned cells. A switch allows WTA mode (only max 1 event generated) or many event (any orientation that passes coincidence threshold. Another switch allows contour enhancement by using previous output orientation events to make it easier to make events along the same orientation. Another switch decides whether to use max delay or average delay as the coincidence measure.
Orientation type output takes values 0-3; 0 is a horizontal edge (0 deg), 1 is an edge tilted up and to right (rotated CCW 45 deg), 2 is a vertical edge (rotated 90 deg), 3 is tilted up and to left (rotated 135 deg from horizontal edge). The filter takes either PolarityEvents or BinocularEvents to create OrientationEvents or BinocularOrientationEvents.
Field Summary | |
---|---|
static int |
MAX_LENGTH
|
protected int |
minDtThreshold
events must occur within this time along orientation in us to generate an event |
int |
NUM_TYPES
the number of cell output types |
Fields inherited from class net.sf.jaer.eventprocessing.EventFilter2D |
---|
enclosedFilter, out |
Fields inherited from class net.sf.jaer.eventprocessing.EventFilter |
---|
annotationEnabled, chip, enclosedFilterChain, filterEnabled, log, perf, propertyTooltipMap, support |
Constructor Summary | |
---|---|
SimpleOrientationFilter(AEChip chip)
Creates a new instance of SimpleOrientationFilter |
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)
filters in to out. |
static java.lang.String |
getDescription()
|
int |
getDtRejectMultiplier()
|
java.lang.Object |
getFilterState()
should return the filter state in some useful form |
int |
getLength()
|
int |
getMinDtThreshold()
|
float |
getOriDiffThreshold()
|
VectorHistogram |
getOriHist()
|
float |
getOriHistoryMixingFactor()
|
int |
getSubSampleShift()
|
int |
getWidth()
|
void |
initFilter()
this should allocate and initialize memory: it may be called when the chip e.g. |
boolean |
isGeneratingFilter()
|
boolean |
isMultiOriOutputEnabled()
|
boolean |
isOriHistoryEnabled()
|
boolean |
isPassAllEvents()
|
boolean |
isShowGlobalEnabled()
|
boolean |
isShowVectorsEnabled()
|
boolean |
isUseAverageDtEnabled()
|
void |
resetFilter()
should reset the filter to initial state |
void |
setDtRejectMultiplier(int dtRejectMultiplier)
|
void |
setFilterEnabled(boolean yes)
overrides super method to allocate or free local memory |
void |
setLength(int searchDistance)
|
void |
setMinDtThreshold(int minDtThreshold)
|
void |
setMultiOriOutputEnabled(boolean multiOriOutputEnabled)
|
void |
setOriDiffThreshold(float oriDiffThreshold)
|
void |
setOriHist(VectorHistogram oriHist)
|
void |
setOriHistoryEnabled(boolean oriHistoryEnabled)
|
void |
setOriHistoryMixingFactor(float oriHistoryMixingFactor)
|
void |
setPassAllEvents(boolean passAllEvents)
Set this to true to pass all events even if they don't satisfy orientation test. |
void |
setShowGlobalEnabled(boolean showGlobalEnabled)
|
void |
setShowVectorsEnabled(boolean showVectorsEnabled)
|
void |
setSubSampleShift(int subSampleShift)
Sets the number of spatial bits to subsample events times by. |
void |
setUseAverageDtEnabled(boolean useAverageDtEnabled)
|
void |
setWidth(int width)
|
void |
update(java.util.Observable o,
java.lang.Object arg)
|
Methods inherited from class net.sf.jaer.eventprocessing.EventFilter2D |
---|
checkOutputPacketEventType, checkOutputPacketEventType, getEnclosedFilter, resetOut, setEnclosedFilter |
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, toString, wait, wait, wait |
Methods inherited from interface net.sf.jaer.graphics.FrameAnnotater |
---|
isAnnotationEnabled, setAnnotationEnabled |
Field Detail |
---|
protected int minDtThreshold
public final int NUM_TYPES
public static final int MAX_LENGTH
Constructor Detail |
---|
public SimpleOrientationFilter(AEChip chip)
Method Detail |
---|
public static java.lang.String getDescription()
public boolean isGeneratingFilter()
public java.lang.Object getFilterState()
EventFilter
getFilterState
in class EventFilter
public void resetFilter()
EventFilter
resetFilter
in class EventFilter
public void setFilterEnabled(boolean yes)
setFilterEnabled
in class EventFilter2D
yes
- true to resetEventFilter.setPreferredEnabledState()
public int getMinDtThreshold()
public void setMinDtThreshold(int minDtThreshold)
public VectorHistogram getOriHist()
public void setOriHist(VectorHistogram oriHist)
public boolean isUseAverageDtEnabled()
public void setUseAverageDtEnabled(boolean useAverageDtEnabled)
public boolean isMultiOriOutputEnabled()
public void setMultiOriOutputEnabled(boolean multiOriOutputEnabled)
public void initFilter()
EventFilter
initFilter
in class EventFilter
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
public int getLength()
public void setLength(int searchDistance)
searchDistance
- the length of the RF, actual length is twice this because we search on each side of pixel by lengthpublic int getWidth()
public void setWidth(int width)
width
- the width of the RF, 0 for a single line of pixels, 1 for 3 lines, etcpublic 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 boolean isShowVectorsEnabled()
public void setShowVectorsEnabled(boolean showVectorsEnabled)
public void annotate(float[][][] frame)
FrameAnnotater
annotate
in interface FrameAnnotater
frame
- the RGB pixel information. First dimension is Y, second is X, third is RGBpublic boolean isShowGlobalEnabled()
public void setShowGlobalEnabled(boolean showGlobalEnabled)
public EventPacket filterPacket(EventPacket in)
filterPacket
in class EventFilter2D
in
- input events can be null or empty.
public boolean isPassAllEvents()
public void setPassAllEvents(boolean passAllEvents)
passAllEvents
- true to pass all events, false to pass only events that pass coicidence test.public int getSubSampleShift()
public void setSubSampleShift(int subSampleShift)
subSampleShift
- the number of bits, 0 means no subsamplingpublic int getDtRejectMultiplier()
public void setDtRejectMultiplier(int dtRejectMultiplier)
public float getOriHistoryMixingFactor()
public void setOriHistoryMixingFactor(float oriHistoryMixingFactor)
public float getOriDiffThreshold()
public void setOriDiffThreshold(float oriDiffThreshold)
public boolean isOriHistoryEnabled()
public void setOriHistoryEnabled(boolean oriHistoryEnabled)
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |