jAER project on SourceForge

net.sf.jaer.graphics
Interface FrameAnnotater

All Known Implementing Classes:
AuditoryReflex, BallShooter, BallShooterCochlea, Batter, BillCatcher, CalibratedPanTilt, ClusterTracker, CochleaCrossCorrelator, CochleaEventRate, CochleaXCorrelator, ControlFilter, CorrelatorFilter, DirectionSelectiveFilter, DisparityFilter, Driver, EllipseTracker, EpilolarLineMonitor, EventTimingMonitor, EyeTracker, FaceTrack, FancyDriver, FrameAnnotatorAdapter, GestureTracker, Goalie, GoalieTableFilter, GravityCentersImageDumper, HeadTracker, HingeLaneTracker, HingeLineTracker, HopfieldRecognitionFilter, HoughEyeTracker, HoughLineTracker, Info, KalmanFilter, LaserGoalie, LEDTracker, MedianTracker, MotionCompensator, MSO, MultiLineClusterTracker, MultipleXYTypeFilter, NearestEventMotionComputer, OrientationCluster, PanTiltCalibrator, PanTiltTracker, ParticleTracker, PawTracker, PawTracker2, PawTracker3, PawTrackerStereoBoard, PawTrackerStereoBoard2, PawTrackerStereoBoard3, PawTrackerStereoBoard4, PawTrackerStereoBoard5, PawTrackerStereoBoard6, PencilBalancer, PerspecTransform, ProbFPNCorrectionFilter, RectangularClusterTracker, RoboQuadSocialSonar, ServoArm, ServoReaction, SimpleOrientationFilter, StereoClusterTracker, StereoDisplay, StereoEpilolarLineMonitor, StereoEventTimingMonitor, SubSamplingBandpassFilter, TemplateTracker, Tmpdiff128RateController, WingTracker, XYCenterOutFilter, XYTypeFilter, ZipZapTrackFollower

public interface FrameAnnotater

An EventFilter2D should implement FrameAnnotator in order to render annotations onto the ChipCanvas during processing.

A class implements this interface in order to graphically annotate rendered frames. The class can directly set RGB pixel values for the rendered image. (This does not allow drawing e.g. with Java2D, however.)

A second method of annotation was added later to allow direct Graphics2D annotation. A class adds itself to the RetinaCanvasInterface to be called to render itself after the events have been rendered.

A third method was added for OpenGL rendering of annotations. If rendering is done with Java2D in the OpenGL drawable, it is not always done synchronously, and so this method was added that is called just after all other OpenGL frame buffer rendering.

Author:
tobi

Method Summary
 void annotate(float[][][] frame)
          Deprecated. use the openGL annotation - this method will be removed in the future.
 void annotate(javax.media.opengl.GLAutoDrawable drawable)
          Each annotator enters annotate with graphics context current, in coordinates with pixel 0,0 in LL corner (note opposite from Java2D) and pixel spacing 1 unit after the scaling transform (which is already active).
 void annotate(java.awt.Graphics2D g)
          Deprecated. use the openGL annotation - this method will probably be removed in the future.
 boolean isAnnotationEnabled()
           
 void setAnnotationEnabled(boolean yes)
           
 

Method Detail

setAnnotationEnabled

void setAnnotationEnabled(boolean yes)

isAnnotationEnabled

boolean isAnnotationEnabled()

annotate

void annotate(float[][][] frame)
Deprecated. use the openGL annotation - this method will be removed in the future.

annotate the RGB frame somehow by color pixels in the rendered pixel frame data.

Parameters:
frame - the RGB pixel information. First dimension is Y, second is X, third is RGB

annotate

void annotate(java.awt.Graphics2D g)
Deprecated. use the openGL annotation - this method will probably be removed in the future.

each annotator is called by the relevant class (e.g. EyeTracker) and enters annotate with graphics context current, in coordinates with pixel 0,0 in UL corner and pixel spacing 1 unit before scaling transform (which is already active).

Parameters:
g - the Graphics2D context

annotate

void annotate(javax.media.opengl.GLAutoDrawable drawable)
Each annotator enters annotate with graphics context current, in coordinates with pixel 0,0 in LL corner (note opposite from Java2D) and pixel spacing 1 unit after the scaling transform (which is already active). The FrameAnnotater then can use JOGL calls to render to the screen by getting the GL context, e.g. the following code, used in the context of an AEChip object, draws a golden lines from LL to UR of the pixel array.
        GL gl = drawable.getGL();
        gl.glBegin(GL.GL_LINES);
        gl.glColor3f(.5f, .5f, 0);
        gl.glVertex2f(0, 0);
        gl.glVertex2f(getSizeX() - 1, getSizeY() - 1);
        gl.glEnd();
 

Parameters:
drawable - the OpenGL drawable components, e.g., GLCanvas

jAER project on SourceForge