|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaer.eventprocessing.EventFilter
net.sf.jaer.eventprocessing.EventFilter2D
ch.unizh.ini.jaer.projects.eyetracker.EyeTracker
public class EyeTracker
A filter whose underlying model rims (pupil and iris) with a position and radius and rimThickness, which is pushed around by events.
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 | |
---|---|
EyeTracker(AEChip chip)
Creates a new instance of EyeTracker |
Method Summary | |
---|---|
void |
annotate(float[][][] frame)
does nothing, must be in openGL rendering mode to see results |
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)
each annotator is called by the relevant class (e.g. |
EventPacket |
filterPacket(EventPacket in)
Subclasses implement this method to define custom processing. |
float |
getAcquisitionMultiplier()
|
java.lang.Object |
getFilterState()
should return the filter state in some useful form |
float |
getIrisRadius()
|
java.awt.geom.Point2D.Float |
getPosition()
Returns the present location of the eye in pixels |
float |
getPositionMixingFactor()
|
float |
getPupilRadius()
|
float |
getQualityMixingFactor()
|
float |
getQualityThreshold()
|
float |
getRimThickness()
|
float |
getScalingMixingFactor()
gets "mixing factor" for dynamic scaling of model size. |
float |
getTargetSpeed()
|
void |
initFilter()
this should allocate and initialize memory: it may be called when the chip e.g. |
boolean |
isAnnotationEnabled()
Each filter has an annotationEnabled flag that is used to graphical annotation of the filter, e.g. |
boolean |
isDynamicAcquisitionSize()
|
boolean |
isLogDataEnabled()
|
boolean |
isScalingEnabled()
|
boolean |
isShowGazeEnabled()
|
void |
resetFilter()
should reset the filter to initial state |
void |
setAcquisitionMultiplier(float acquisitionMultiplier)
Sets the factor by which the model area is increased when low quality tracking is detected. |
void |
setDynamicAcquisitionSize(boolean dynamicAcquisitionSize)
Sets whether to use dynamic resizing of acquisition model size, depending on quality of tracking. |
void |
setIrisRadius(float irisRadius)
Sets radius of outer ring of eye model (the iris) |
void |
setLogDataEnabled(boolean logDataEnabled)
|
void |
setPositionMixingFactor(float mixingFactor)
Sets mixing factor for eye position |
void |
setPupilRadius(float eyeRadius)
Sets initial value of eye (pupil or iris) radius |
void |
setQualityMixingFactor(float qualityMixingFactor)
Sets the "mixing factor" for tracking quality measure. |
void |
setQualityThreshold(float qualityThreshold)
Sets the threshold for good tracking. |
void |
setRimThickness(float rimThickness)
sets thickness of disk of sensitivity around model circles; affects both pupil and iris model. |
void |
setScalingEnabled(boolean scalingEnabled)
Enables/disables dynamic scaling. |
void |
setScalingMixingFactor(float factor)
sets mixing factor for dynamic resizing of eye |
void |
setShowGazeEnabled(boolean showGazeEnabled)
If enabled, shows a measure of gaze based on statistics of measured eye position |
void |
setTargetSpeed(float speed)
|
void |
setX(float x)
|
void |
setY(float y)
|
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, 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 |
Methods inherited from interface net.sf.jaer.graphics.FrameAnnotater |
---|
setAnnotationEnabled |
Constructor Detail |
---|
public EyeTracker(AEChip chip)
chip
- the chip we are eye tracking onMethod Detail |
---|
public void initFilter()
EventFilter
initFilter
in class EventFilter
public EventPacket filterPacket(EventPacket in)
EventFilter2D
filterPacket
in class EventFilter2D
in
- the input packet
public java.lang.Object getFilterState()
EventFilter
getFilterState
in class EventFilter
public void resetFilter()
EventFilter
resetFilter
in class EventFilter
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
public void annotate(float[][][] frame)
annotate
in interface FrameAnnotater
frame
- the RGB pixel information. First dimension is Y, second is X, third is RGBpublic void annotate(javax.media.opengl.GLAutoDrawable drawable)
FrameAnnotater
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();
annotate
in interface FrameAnnotater
drawable
- the OpenGL drawable components, e.g., GLCanvaspublic void annotate(java.awt.Graphics2D g)
FrameAnnotater
annotate
in interface FrameAnnotater
g
- the Graphics2D contextpublic void setX(float x)
public void setY(float y)
public float getPupilRadius()
public void setPupilRadius(float eyeRadius)
eyeRadius
- the radius in pixelspublic float getRimThickness()
public void setRimThickness(float rimThickness)
rimThickness
- the thickness in pixelspublic float getPositionMixingFactor()
public void setPositionMixingFactor(float mixingFactor)
mixingFactor
- 0-1public float getScalingMixingFactor()
public void setScalingMixingFactor(float factor)
factor
- mixing factor 0-1public float getIrisRadius()
public void setIrisRadius(float irisRadius)
irisRadius
- in pixelspublic boolean isScalingEnabled()
public void setScalingEnabled(boolean scalingEnabled)
scale
scalingEnabled
- true to enablepublic boolean isShowGazeEnabled()
public void setShowGazeEnabled(boolean showGazeEnabled)
showGazeEnabled
- true to enable gaze pointpublic void setTargetSpeed(float speed)
public float getTargetSpeed()
public java.awt.geom.Point2D.Float getPosition()
public float getQualityThreshold()
public void setQualityThreshold(float qualityThreshold)
qualityThreshold
- the fraction inside model for good trackingpublic boolean isAnnotationEnabled()
EventFilter
isAnnotationEnabled
in interface FrameAnnotater
isAnnotationEnabled
in class EventFilter
public float getAcquisitionMultiplier()
public void setAcquisitionMultiplier(float acquisitionMultiplier)
setDynamicAcquisitionSize(boolean)
method
acquisitionMultiplier
- the ratio of areas; the ratio between disk radius during bad tracking to that during good tracking.public float getQualityMixingFactor()
public void setQualityMixingFactor(float qualityMixingFactor)
qualityMixingFactor
- the mixing factor 0-1public boolean isDynamicAcquisitionSize()
public void setDynamicAcquisitionSize(boolean dynamicAcquisitionSize)
dynamicAcquisitionSize
- true to enable dynamic proportional resizing of modelpublic boolean isLogDataEnabled()
public void setLogDataEnabled(boolean logDataEnabled)
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |