jAER project on SourceForge

ch.unizh.ini.jaer.projects.opticalflow.graphics
Class OpticalFlowDisplayMethod

java.lang.Object
  extended by net.sf.jaer.graphics.DisplayMethod
      extended by ch.unizh.ini.jaer.projects.opticalflow.graphics.OpticalFlowDisplayMethod

public class OpticalFlowDisplayMethod
extends DisplayMethod

Displays output from an OpticalFlowChip. Optionally displays the photoreceptor and the local motion vectors. The local motion vectors are displayed either as color (red/blue) or as motion vector arrows. The global motion vector that is displayed is computed from the vector sum of local motion vectors. (The "global motion" vector captured from the chip is actually just a corner pixel.)

Author:
tobi

Field Summary
 
Fields inherited from class net.sf.jaer.graphics.DisplayMethod
chip, chipCanvas, glu, glut, log, zoom
 
Constructor Summary
OpticalFlowDisplayMethod(ChipCanvas canvas)
          Creates a new instance of OpticalFlowDisplayMethod
 
Method Summary
 void display(javax.media.opengl.GLAutoDrawable drawable)
          subclasses implmeent this display method to actually render.
 float getGlobalMotionGain()
           
 float getGlobalMotionOffset()
           
 float getLocalMotionGain()
           
 float getLocalMotionOffset()
           
 float getPhotoGain()
           
 float getPhotoOffset()
           
 float getVectorLengthScale()
           
 boolean isGlobalDisplayEnabled()
           
 boolean isLocalDisplayEnabled()
           
 boolean isLocalMotionColorsEnabled()
           
 boolean isPhotoDisplayEnabled()
           
 void setGlobalDisplayEnabled(boolean globalDisplayEnabled)
           
 void setGlobalMotionGain(float globalMotionGain)
           
 void setGlobalMotionOffset(float globalMotionOffset)
           
 void setLocalDisplayEnabled(boolean localDisplayEnabled)
           
 void setLocalMotionColorsEnabled(boolean localMotionColorsEnabled)
           
 void setLocalMotionGain(float localMotionGain)
           
 void setLocalMotionOffset(float localMotionOffset)
           
 void setPhotoDisplayEnabled(boolean photoDisplayEnabled)
           
 void setPhotoGain(float photoGain)
           
 void setPhotoOffset(float photoOffset)
           
 void setVectorLengthScale(float vectorLengthScale)
          Sets the scale for drawing the motion vectors: the motion color value is multipled by this scale times 4 to give the motion vector length
 
Methods inherited from class net.sf.jaer.graphics.DisplayMethod
addAnnotator, getAnnotators, getDescription, getMenuItem, getRenderer, removeAllAnnotators, removeAnnotator, setAnnotators, setMenuItem, setRenderer, setupGL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpticalFlowDisplayMethod

public OpticalFlowDisplayMethod(ChipCanvas canvas)
Creates a new instance of OpticalFlowDisplayMethod

Parameters:
canvas - the canvas this display method will render on
Method Detail

display

public void display(javax.media.opengl.GLAutoDrawable drawable)
Description copied from class: DisplayMethod
subclasses implmeent this display method to actually render. Typically they also call GL gl=setupGL(drawable) right after entry.

Specified by:
display in class DisplayMethod
Parameters:
drawable - the GL context

getPhotoGain

public float getPhotoGain()

setPhotoGain

public void setPhotoGain(float photoGain)

getPhotoOffset

public float getPhotoOffset()

setPhotoOffset

public void setPhotoOffset(float photoOffset)

getLocalMotionGain

public float getLocalMotionGain()

setLocalMotionGain

public void setLocalMotionGain(float localMotionGain)

getLocalMotionOffset

public float getLocalMotionOffset()

setLocalMotionOffset

public void setLocalMotionOffset(float localMotionOffset)

getGlobalMotionGain

public float getGlobalMotionGain()

setGlobalMotionGain

public void setGlobalMotionGain(float globalMotionGain)

getGlobalMotionOffset

public float getGlobalMotionOffset()

setGlobalMotionOffset

public void setGlobalMotionOffset(float globalMotionOffset)

isPhotoDisplayEnabled

public boolean isPhotoDisplayEnabled()

setPhotoDisplayEnabled

public void setPhotoDisplayEnabled(boolean photoDisplayEnabled)

isLocalDisplayEnabled

public boolean isLocalDisplayEnabled()

setLocalDisplayEnabled

public void setLocalDisplayEnabled(boolean localDisplayEnabled)

isGlobalDisplayEnabled

public boolean isGlobalDisplayEnabled()

setGlobalDisplayEnabled

public void setGlobalDisplayEnabled(boolean globalDisplayEnabled)

getVectorLengthScale

public float getVectorLengthScale()

setVectorLengthScale

public void setVectorLengthScale(float vectorLengthScale)
Sets the scale for drawing the motion vectors: the motion color value is multipled by this scale times 4 to give the motion vector length

Parameters:
vectorLengthScale - the scale value

isLocalMotionColorsEnabled

public boolean isLocalMotionColorsEnabled()

setLocalMotionColorsEnabled

public void setLocalMotionColorsEnabled(boolean localMotionColorsEnabled)

jAER project on SourceForge