jAER project on SourceForge

net.sf.jaer.eventprocessing.filter
Class RefractoryFilter

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

public class RefractoryFilter
extends EventFilter2D
implements java.util.Observer

Adds a refractory period to pixels so that they events only pass if there is sufficient time since the last event from that pixel. Basicall just knocks out redundant events.

Author:
tobi

Field Summary
protected  int refractoryPeriodUs
          the time in timestamp ticks (1us at present) that a spike needs to be supported by a prior event in the neighborhood by to pass through
 
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
RefractoryFilter(AEChip chip)
           
 
Method Summary
 EventPacket filterPacket(EventPacket in)
          filters in to out.
static java.lang.String getDescription()
           
 java.lang.Object getFilterState()
          should return the filter state in some useful form
 int getRefractoryPeriodUs()
          gets the refractory period
 int getSubsampleBy()
           
 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 setRefractoryPeriodUs(int refractoryPeriodUs)
          sets the refractory delay in us
 void setSubsampleBy(int subsampleBy)
          Sets the number of bits to subsample by when storing events into the map of past events.
 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, toString, wait, wait, wait
 

Field Detail

refractoryPeriodUs

protected int refractoryPeriodUs
the time in timestamp ticks (1us at present) that a spike needs to be supported by a prior event in the neighborhood by to pass through

Constructor Detail

RefractoryFilter

public RefractoryFilter(AEChip chip)
Method Detail

getDescription

public static java.lang.String getDescription()

filterPacket

public EventPacket filterPacket(EventPacket in)
filters in to out. if filtering is enabled, the number of out may be less than the number put in

Specified by:
filterPacket in class EventFilter2D
Parameters:
in - input events can be null or empty.
Returns:
the processed events, may be fewer in number. filtering may occur in place in the in packet.

getRefractoryPeriodUs

public int getRefractoryPeriodUs()
gets the refractory period

Returns:
delay allowed for spike since last in neighborhood to pass (us)

setRefractoryPeriodUs

public void setRefractoryPeriodUs(int refractoryPeriodUs)
sets the refractory delay in us

Fires a PropertyChangeEvent "refractoryPeriodUs"

Parameters:
refractoryPeriodUs - the address is refractory for this long in us after an event

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

getSubsampleBy

public int getSubsampleBy()

setSubsampleBy

public void setSubsampleBy(int subsampleBy)
Sets the number of bits to subsample by when storing events into the map of past events. Increasing this value will increase the number of events that pass through and will also allow passing events from small sources that do not stimulate every pixel.

Parameters:
subsampleBy - the number of bits, 0 means no subsampling, 1 means cut event time map resolution by a factor of two in x and in y

jAER project on SourceForge