ch.unizh.ini.jaer.projects.opticalflow.graphics
Class OpticalFlowDisplayMethod
java.lang.Object
net.sf.jaer.graphics.DisplayMethod
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
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 |
OpticalFlowDisplayMethod
public OpticalFlowDisplayMethod(ChipCanvas canvas)
- Creates a new instance of OpticalFlowDisplayMethod
- Parameters:
canvas
- the canvas this display method will render on
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)