jAER project on SourceForge

net.sf.jaer.stereopsis
Class GlobalDisparityFilter2

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

public class GlobalDisparityFilter2
extends EventFilter2D
implements java.util.Observer

(GlobalDisparityFilter2 is an optimized version of GlobalDisparityFilter without the additional viewer.) The filter assumes a single frontal object and calculates the global x-coordinate disparity. The global disparity is found by correlating each event in a packet with its neighbors. The disparity with highest sum of correlations is then assigned to all events in the packet. Events are only matched if they have same polarity and orientation.

Author:
Peter Hess

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
GlobalDisparityFilter2(AEChip chip)
          Creates a new instance of GlobalXDisparityFilter2
 
Method Summary
 EventPacket filterPacket(EventPacket in)
          Subclasses implement this method to define custom processing.
 float getDistFactor()
           
 java.lang.Object getFilterState()
          should return the filter state in some useful form
 int getMaxDisp()
           
 int getYRes()
           
 void initFilter()
          this should allocate and initialize memory: it may be called when the chip e.g.
 boolean isGeneratingFilter()
           
 void resetFilter()
          should reset the filter to initial state
 void setDistFactor(float distFactor)
          Set the scaling factor for the event correlation depending on time difference.
 void setMaxDisp(int maxDisp)
          Maximal disparity which is considered for event matching.
 void setYRes(int yRes)
          yRes determines the pixel resolution in y direction, i.e.
 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, getDescription, 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

GlobalDisparityFilter2

public GlobalDisparityFilter2(AEChip chip)
Creates a new instance of GlobalXDisparityFilter2

Method Detail

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

resetFilter

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

Specified by:
resetFilter in class EventFilter

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

isGeneratingFilter

public boolean isGeneratingFilter()

update

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

setDistFactor

public void setDistFactor(float distFactor)
Set the scaling factor for the event correlation depending on time difference.


getDistFactor

public float getDistFactor()

setYRes

public void setYRes(int yRes)
yRes determines the pixel resolution in y direction, i.e. all y coordinates are divides by this value, which means that every event matches to his yRes nearest neighbours in y direction. Smaller values will give you a higher resolution in y direction, but eventually the algorithm won't be able to find any matches because the tolerance in y direction is too small.


getYRes

public int getYRes()

setMaxDisp

public void setMaxDisp(int maxDisp)
Maximal disparity which is considered for event matching.


getMaxDisp

public int getMaxDisp()

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