jAER project on SourceForge

net.sf.jaer.eventprocessing.filter
Class SpatialBandpassFilter

java.lang.Object
  extended by net.sf.jaer.eventprocessing.EventFilter
      extended by net.sf.jaer.eventprocessing.EventFilter2D
          extended by net.sf.jaer.eventprocessing.filter.SpatialBandpassFilter
All Implemented Interfaces:
java.util.Observer

public class SpatialBandpassFilter
extends EventFilter2D
implements java.util.Observer

Does an event-based spatial highpass filter, so that only small objects pass through.

Author:
tobi

Field Summary
 
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
SpatialBandpassFilter(AEChip c)
          Creates a new instance of SpatialBandpassFilter
 
Method Summary
 EventPacket filterPacket(EventPacket in)
          Subclasses implement this method to define custom processing.
 int getCenterRadius()
           
static java.lang.String getDescription()
           
 int getDtSurround()
           
 java.lang.Object getFilterState()
          should return the filter state in some useful form
 int getSurroundRadius()
           
 void initFilter()
          this should allocate and initialize memory: it may be called when the chip e.g.
 void resetFilter()
          should reset the filter to initial state
 void setCenterRadius(int centerRadius)
          sets the center radius, 0 meaning a single pixel.
 void setDtSurround(int dtSurround)
          sets the time in timestamp ticks (1us at present) that a spike in surround will inhibit a spike from center passing through.
 void setFilterEnabled(boolean yes)
          Resets the filter
 void setSurroundRadius(int surroundRadius)
          sets the surround radius.
 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
 

Constructor Detail

SpatialBandpassFilter

public SpatialBandpassFilter(AEChip c)
Creates a new instance of SpatialBandpassFilter

Method Detail

getDescription

public static java.lang.String getDescription()

setFilterEnabled

public void setFilterEnabled(boolean yes)
Description copied from class: EventFilter2D
Resets the filter

Overrides:
setFilterEnabled in class EventFilter2D
Parameters:
yes - true to reset
See Also:
EventFilter.setPreferredEnabledState()

getFilterState

public java.lang.Object getFilterState()
Description copied from class: EventFilter
should return the filter state in some useful form

Specified by:
getFilterState in class EventFilter

resetFilter

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

Specified by:
resetFilter in class EventFilter

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer

initFilter

public void initFilter()
Description copied from class: EventFilter
this should allocate and initialize memory: it may be called when the chip e.g. size parameters are changed after creation of the filter

Specified by:
initFilter in class EventFilter

getDtSurround

public int getDtSurround()

setDtSurround

public void setDtSurround(int dtSurround)
sets the time in timestamp ticks (1us at present) that a spike in surround will inhibit a spike from center passing through.

Parameters:
dtSurround - the time in us

getCenterRadius

public int getCenterRadius()

setCenterRadius

public void setCenterRadius(int centerRadius)
sets the center radius, 0 meaning a single pixel. This value is clipped to min 0.

Parameters:
centerRadius - the radius in pixels for a square area. 0 is 1 pixel, 1 is 9 pixels (3x3), etc.

getSurroundRadius

public int getSurroundRadius()

setSurroundRadius

public void setSurroundRadius(int surroundRadius)
sets the surround radius. This value is clipped to be at least the center radius plus 1.

Parameters:
surroundRadius - the radius in pixels for a square area. 1 is 9 pixels (3x3), etc.

filterPacket

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

Specified by:
filterPacket in class EventFilter2D
Parameters:
in - the input packet
Returns:
the output packet

jAER project on SourceForge