gml_TTrackedVector Class Reference

#include <gml_TrackedVector.h>

Collaboration diagram for gml_TTrackedVector:

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...
typedef gml_TQueue< EventEventQueue
 Queues of tracking events.

Public Member Functions

gml_TError Init (gml_TArray< Float32 > &features, gml_TArray< Float32 > &weights, gml_TArray< Float32 > &stability, EventQueue &queue, UInt64 startDelay=sDefaultStartDelay(), UInt64 ttlDelay=sDefaultTTLDelay())
 Setup tracked object data.
void Dispose (UInt64 time)
gml_TError Update (UInt64 gap, UInt64 time, gml_TArray< Float32 > &features)
 Update object's state and possibly generate events; this version is used when the object has been detected (i.e. a feature vector has been measured).
gml_TError Update (UInt64 gap, UInt64 time)
 Update object's state and possibly generate events; this version is used when the object has not been detected (i.e. a feature vector has not been measured).
State GetState ()
 Return the current state of the tracked object.
Float32 Distance (gml_TArray< Float32 > &otherFeatures)
 Return the distance to another set of features. May return 0 or FLT_MAX.
Float32 operator[] (unsigned k)
 Bracket.

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

Protected Member Functions

void UpdateFeatures (gml_TArray< Float32 > &newFeatures)

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
gml_TArray< Float32fFeatures
 tracked object's current feature vector
gml_TArray< Float32 > & fWeights
 weight of features when comparing feature vectors
gml_TArray< Float32 > & fStaticStability
 threshold under which object motion is discarded (for each feature)
EventQueuefQueue
 queue in which to push the tracking events

Static Protected Attributes

static bool sModuleInited = false
 was ClassInit() called ?

Classes

struct  Event
 Type of events that can occur during tracking. More...

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_TArray< Float32 > &  features,
gml_TArray< Float32 > &  weights,
gml_TArray< Float32 > &  stability,
EventQueue queue,
UInt64  startDelay = sDefaultStartDelay(),
UInt64  ttlDelay = sDefaultTTLDelay() 
)

Setup tracked object data.

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

void Dispose ( UInt64  time  ) 

Bug:
possibly, need to test for errors here (e.g. queue full)

gml_TError Update ( UInt64  gap,
UInt64  time,
gml_TArray< Float32 > &  features 
)

Update object's state and possibly generate events; this version is used when the object has been detected (i.e. a feature vector has been measured).

Parameters:
gap  since when (in nanoseconds) ?
time  the current timestamp (nanoseconds)
features  the current object features (or an empty vector)

gml_TError Update ( UInt64  gap,
UInt64  time 
)

Update object's state and possibly generate events; this version is used when the object has not been detected (i.e. a feature vector has not been measured).

Parameters:
gap  since when (in nanoseconds) ?
time  the current timestamp (nanoseconds)

Float32 operator[] ( unsigned  k  )  [inline]

Bracket.

Inspect feature values.


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.