|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.sensors.eyebox2.aggregate.SingleUserTracker
public class SingleUserTracker
This interface exposes a simplified interpretation of the Eyebox data to an application. Using a Listener interface, the application can receive 3 events from this SingleUserTracker: - userAppeared - userDisappeared - userMoved Coordinates are between 0 and 1 - relative to the camera view. (0,0) is left bottom of camera image. Note that this concerns ONE SINGLE FACE, i.e. as far the application is concerned, there is at most one user present. Long term tracking of a single user in the presence of other users is hidden within this SingleUserTracker class. NOTE The application should call checkLostFace regularly! Only calling that method will notify the listener of lost faces... (alternative would have been an active thread in this class -- and I don't like that)
| Field Summary | |
|---|---|
private static float |
camHeight
|
private static float |
camWidth
resolution of camera |
private int |
currentlyActiveFace
The face that is currently being tracked. |
private boolean |
debug
|
private HashMap<Integer,EyePair> |
eyes
|
private HashMap<Integer,Face> |
faces
|
private JFrame |
jframe
|
private boolean |
lostFace
true iff we are tracking a face and have just lost it |
private long |
lostTime
when did we lose the tracked face? |
private JEditorPane |
outputEyes
|
private JEditorPane |
outputFaces
|
private String |
outputTextEyes
|
private String |
outputTextFaces
|
private static long |
RETAINFACETIME
Number of milisecs that face info is remembered when a face disappears for a short term... |
private boolean |
showUI
|
private ArrayList<SingleUserTrackerListener> |
singleUserTrackerListeners
|
private long |
starttime
|
private XuukReader |
xuukReader
|
| Constructor Summary | |
|---|---|
SingleUserTracker(XuukReader xr)
|
|
| Method Summary | |
|---|---|
void |
addListener(SingleUserTrackerListener listener)
|
void |
checkLostFace()
checks whether the currently tracked face, if any, has been lost for such a long time that a message should be sent. |
void |
eyesChange(EyePair newEyepair)
|
void |
eyesDisappeared(int id)
|
void |
faceAppeared(Face face)
|
void |
faceDisappeared(int id)
|
void |
initUI()
|
void |
newEyesPositions(ArrayList<EyePair> newEyes)
|
void |
newFacePositions(ArrayList<Face> newFaces)
|
void |
removeListener(SingleUserTrackerListener listener)
|
void |
setText()
Update the UI, for debugging purposes |
void |
toggleUI()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long RETAINFACETIME
private long starttime
private static final float camWidth
private static final float camHeight
private HashMap<Integer,Face> faces
private HashMap<Integer,EyePair> eyes
private int currentlyActiveFace
private boolean lostFace
private long lostTime
private boolean debug
private XuukReader xuukReader
private ArrayList<SingleUserTrackerListener> singleUserTrackerListeners
private JFrame jframe
private JEditorPane outputFaces
private JEditorPane outputEyes
private String outputTextFaces
private String outputTextEyes
private boolean showUI
| Constructor Detail |
|---|
public SingleUserTracker(XuukReader xr)
| Method Detail |
|---|
public void addListener(SingleUserTrackerListener listener)
public void removeListener(SingleUserTrackerListener listener)
public void checkLostFace()
public void faceAppeared(Face face)
faceAppeared in interface XuukListenerpublic void faceDisappeared(int id)
faceDisappeared in interface XuukListenerpublic void newFacePositions(ArrayList<Face> newFaces)
newFacePositions in interface XuukListenerpublic void eyesChange(EyePair newEyepair)
eyesChange in interface XuukListenerpublic void eyesDisappeared(int id)
eyesDisappeared in interface XuukListenerpublic void newEyesPositions(ArrayList<EyePair> newEyes)
newEyesPositions in interface XuukListenerpublic void toggleUI()
public void initUI()
public void setText()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||