gml_TTrackedObject Class Reference

#include <gml_TrackedObject.h>

Inherits gml_TPointFloat.

Collaboration diagram for gml_TTrackedObject:

Collaboration graph
[legend]
List of all members.

Detailed Description

Representation of objects tracked in 2D by the gml_TTracker class.


Public Types

enum  State { Born, Alive, Zombie, Dead }
 Internal tracking state of a tracked object. More...

Public Member Functions

gml_TError Init (gml_TPointFloat object, gml_TTrackingEventQueue *queue, UInt64 startDelay=sDefaultStartDelay(), UInt64 ttlDelay=sDefaultTTLDelay(), Float32 stability=sDefaultStaticStability())
 Setup tracked object data.
void Dispose (UInt64 time)
gml_TError Update (bool detected, UInt64 gap, UInt64 time, gml_TPointFloat *object)
 Update object's state and (eventually) generate events.
State GetState ()
 Return the current state of the tracked object.

Static Public Member Functions

static UInt64 sDefaultStartDelay ()
 default for fStartDelay
static UInt64 sDefaultTTLDelay ()
 default for fTTLDelay
static Float32 sDefaultStaticStability ()
 default for fStaticStability

Static Public Attributes

static gml_TError sErrorBadState = (gml_TError)-1

Static Protected Member Functions

static void ClassInit ()
 class setup

Protected Attributes

UInt32 fIdentity
 UID of the object.
UInt64 fLifeTime
 time since the object was born (relevant while in Born state)
UInt64 fTimeToLive
 remaining lifetime of the object (relevant while in Zombie state)
State fState
 current object state
UInt64 fStartDelay
 time after which a consistently detected object will be tracked (nanoseconds). < i.e. delay for the Born -> Alive transition
UInt64 fTTLDelay
 time after which an object will die if undetected (nanoseconds). < i.e. delay for the Zombie -> Dead transition
Float32 fStaticStability
 threshold under which object motion is discarded (pixels).
gml_TTrackingEventQueuefQueue

Static Protected Attributes

static bool sModuleInited = false
 was ClassInit() called ?

Member Enumeration Documentation

enum State

Internal tracking state of a tracked object.

Possible state transitions:

               .-> Alive <--> Zombie -,
         Born -|                      |-> Dead
               '----------------------'          
Enumerator:
Born  the object was recently detected
Alive  the object was consistently detected and is tracked
Zombie  the object wasn't detected, and might be either gone or missed
Dead  the object is not to be tracked anymore


Member Function Documentation

gml_TError Init ( gml_TPointFloat  object,
gml_TTrackingEventQueue queue,
UInt64  startDelay = sDefaultStartDelay(),
UInt64  ttlDelay = sDefaultTTLDelay(),
Float32  stability = sDefaultStaticStability() 
)

Setup tracked object data.

Parameters:
queue  where to push the events
startDelay  see fStartDelay
ttlDelay  see fTTLDelay
stability  see fStaticStability

void Dispose ( UInt64  time  ) 

Bug:
possibly, need to test for errors here

gml_TError Update ( bool  detected,
UInt64  gap,
UInt64  time,
gml_TPointFloat object 
)

Update object's state and (eventually) generate events.

Parameters:
detected  was the object detected ?
gap  since when (in nanoseconds) ?
time  the current timestamp (nanoseconds)
object  the current object position (or NULL)


The documentation for this class was generated from the following files:
Generated on Tue Jun 12 14:03:28 2007 for gml by Doxygen 1.5.2.