Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

CTSRMotor Class Reference

The inference engine. More...

#include <tvu_sr.h>

Inheritance diagram for CTSRMotor::

CTObject

Public Types

enum  { MAX_ENTITIES = 1024 }
 Markers to avoid to reuse an entity. More...


Public Methods

 CTSRMotor ()
 Constructor/destructor. More...

 ~CTSRMotor ()
 DEFINE_ID_FUNCTIONS (CTSRMotor, CTObject, CLASSNAME_SR_SRMOTOR_ID, CLASSNAME_SR_SRMOTOR) friend class CTSRModel
virtual TBOOL OnPreLoad (LPTBYTE *lpBuffers)
 Overwrite. More...

virtual TBOOL OnPostLoad (LPTBYTE *lpBuffers)
virtual CTList GetSaveLoadObjects (TBOOL bOnLoad=TTRUE)
 The children to save/load. More...

virtual CTObjectCalculate (TINT iOperator, CTObject *Object)
 Calculate the mathematical operators. More...

TBOOL Init ()
 Preprocessing Init the motor. More...

TBOOL InitHooks ()
TBOOL AddScenario (TLPCSTR sName)
 Add a scenario model and its dependence scenario models to the list of used model by its name. More...

TBOOL BuildModels ()
 Build the models. More...

TBOOL BuildVars ()
 Add the variable to the list of environment variables. More...

TBOOL AddContextObject (CTObject *pObject)
 Add a context object. More...

TBOOL SetContext (CTList pContext)
 Attach the context. More...

TBOOL ChangeObjectState (TLPCSTR oName, TINT oNewState)
 Change object state. More...

TBOOL CreateBuffers ()
 Create the tree to contain the entities. More...

CTObjectCreateBuffers (CTList pVars, TINT *pIDs, TINT *eIDs, TINT *zIDs, TINT *wIDs)
 Create the tree for a list of variables (of o model). More...

TDWORD CalculateNBNodes (CTList pVars, TDWORD *nbPersons, TDWORD *nbEquipment, TDWORD *nbZones, TDWORD *nbWalls)
 Calculate the number of nodes neccessary for the graph of recognized scenarios for a list of actor variables. More...

CTObjectFindObject (TLPCSTR ObjectName)
 Find an predefined object. The motor first finds in the list m_LoadedModels, and then in CTStockObjects::Default. More...

TBOOL SetPersons (CTList pList, TINT iFrame, TINT ppType=CTPersonPipe::TS_INDIVIDUAL)
 Convert from the input stream. More...

TBOOL Infer ()
 Infer. More...

TBOOL IsSatisfied (CTSRModel *pModel, CTSRTriggerInstance *pTrigger=TNULL)
 Verify if the model is satisfied. More...

TBOOL IsSatisfied (CTSRModel *pModel, CTList pVars, TBOOL bFirstActor=TFALSE)
 For elementary scenarios Verify if the model is satisfied witch the list of variables bFirstActor = TTRUE, start. More...

TBOOL IsSatisfied (CTSRTriggerInstance *pTrigger)
 For composed scenarios Verify if the model is satisfied witch the list of variables. More...

CTSRBehaviourInstance* AddEntity (CTSRModel *pModel)
 Add a new entity for the model pModel: model is just satisfied Return: the created entity. More...

TINT ModelCount ()
 Get the number of used models. More...

CTList CreateRBNameList ()
 Create the list of names of recognised behaviours at the current frame. More...

TBOOL DestroyRecognizedScenarios (TBOOL bDestroyImmediate)
 Destroy recognized scenrios. More...

TBOOL DestroyRecognizedScenariosPerson (CTSRPerson *pPerson)
 Destroy recognized scenrios for a person. More...

TBOOL MarkToDestroy (TBOOL bDestroyImmediate)
 Find senarios to be destroyed. More...

TBOOL MarkToDestroy (CTSRPerson *pPerson)
 Find senarios to be destroyed for a person. More...

TBOOL DestroyMarkedScenarios ()
 To do destroy recognized scenrios after marked all scenarios to be destroyed. More...

TBOOL SuspendScenriosPerson (CTSRPerson *pPerson)
 To suspend all recognized scenarios relative to a person. More...

TINT GetNumberModels (TINT ModelType)
 For statistics. More...


Static Public Methods

CTSRMotor* FindMotor (TLPCSTR MotorName=TNULL)
 Find a motor by its name: if the name is null => find the first motor ocuring. More...

TBOOL AddMotor (CTSRMotor *pMotor)
TBOOL SetActiveMotor (TLPCSTR MotorName)
TBOOL SetActiveMotor (CTSRMotor *pMotor)
TBOOL InitLIB ()
 To start up the lib This function must be call at the begin of the main program. More...

CTObjectCF_GetCurrentMotor (CTList pObjects)
 =========== CODED FUNCTIONS ===============. More...

CTObjectCF_GetAllMotors (CTList pObjects)
CTObjectCF_SetActiveMotor (CTList pObjects)

Data Fields

CTList m_Persons
 Contain every persons. More...

CTInt m_nMaxPersons
 Maximal number of persons: be set by user. More...

CTArraym_Entities
 Contains every temporal entities classified by persons person1 Model1 Obj1... Obj2 Model2 person2. More...

CTArray2m_EntityIndexes
 Index the recognized scenarios by their ending time. More...

CTList* m_RecognizedScenarioIndexes
 Index the recognized scenarios by their model. Each model has a list of recognized scenarios corresponding the model. The recognized scenrios of a list is ordered by its ending time. More...

CTList m_LoadedModels
 List of loaded models. More...

CTList m_UsedModels
 List of used models. More...

CTList m_NameUsedModels
CTList m_NonAutoProlongedModels
CTList m_OneSolutionModels
CTList m_PrimaryModels
TINT m_nModels
 Number of used models. More...

CTList m_AllContextObjects
 List of interested context objects/zones. More...

CTList m_InterestedObjects
CTList m_InterestedZones
CTList m_InterestedWalls
CTList m_NameInterestedObjects
TINT m_nObjects
 Number of objects. More...

TINT m_nZones
 Number of zones. More...

TINT m_nWalls
 Number of walls. More...

CTList m_EnvVars
 List of environment variables. More...

CTList m_pTriggers
 Trigger instances. More...

CTArray m_RecognisedBehaviourCount
 To count the recognised behaviours at each frame. More...

CTList m_Alarms
 Contains the alarms generated by the engine. More...

CTInt m_ScenarioLife
 Maximum duration of scenario life. More...

CTList m_NewPersonNodes
CTList m_NewEquipmentNodes
CTList m_NewZoneNodes
CTList m_NewWallNodes
TINT m_nTotalPersons
 Count. More...

TINT m_nMinInvolvedPersons
TINT m_nMaxInvolvedPersons
TINT m_nTotalRecognizedScenarios
TINT m_nMinRecognizedScenarios
TINT m_nMaxRecognizedScenarios
TBOOL m_bCreateExport
 If we want to create data to export. More...

CTFunctionModelm_InitMotor
 Hook functions. More...

CTFunctionModelm_StartFrame
CTFunctionModelm_EndFrame
CTBoolm_ShowResults
 Option Show or not the recognition results. More...

CTBoolm_CountResults
 Count or not the recognised behaviours. More...

CTTree m_OldItemConstructors
 Tree of default constructors. More...


Static Public Attributes

CTInt m_T
 Current time. More...

CTSRMotor* m_pCurrentMotor
 Current motor. More...

char m_MarkerPersons [MAX_ENTITIES]
char m_MarkerZones [MAX_ENTITIES]
char m_MarkerWalls [MAX_ENTITIES]
char m_MarkerObjects [MAX_ENTITIES]
CTList m_AllMotors
 List of all used motors. More...

CTTree m_ItemConstructors

Protected Methods

virtual TBOOL VerifyModelCoherence ()
 Verify if there is a circle in the models. More...

virtual TBOOL VerifyModelCoherence (CTList AllModels, CTList ModelsBeingVerified, CTSRModel *pModel)

Friends

class  CTSRBehaviourInstance

Detailed Description

The inference engine.


Member Enumeration Documentation

anonymous enum
 

Markers to avoid to reuse an entity.

00408 { MAX_ENTITIES = 1024 };


Constructor & Destructor Documentation

CTSRMotor::CTSRMotor ( )
 

Constructor/destructor.


Member Function Documentation

TBOOL CTSRMotor::AddContextObject ( CTObject * pObject )
 

Add a context object.

CTSRBehaviourInstance * CTSRMotor::AddEntity ( CTSRModel * pModel )
 

Add a new entity for the model pModel: model is just satisfied Return: the created entity.

TBOOL CTSRMotor::AddScenario ( TLPCSTR sName )
 

Add a scenario model and its dependence scenario models to the list of used model by its name.

TBOOL CTSRMotor::BuildModels ( )
 

Build the models.

TBOOL CTSRMotor::BuildVars ( )
 

Add the variable to the list of environment variables.

CTObject * CTSRMotor::CF_GetCurrentMotor ( CTList pObjects ) [static]
 

=========== CODED FUNCTIONS ===============.

CTObject * CTSRMotor::Calculate ( TINT iOperator,
CTObject * Object ) [virtual]
 

Calculate the mathematical operators.

Reimplemented from CTObject.

TDWORD CTSRMotor::CalculateNBNodes ( CTList pVars,
TDWORD * nbPersons,
TDWORD * nbEquipment,
TDWORD * nbZones,
TDWORD * nbWalls )
 

Calculate the number of nodes neccessary for the graph of recognized scenarios for a list of actor variables.

TBOOL CTSRMotor::ChangeObjectState ( TLPCSTR oName,
TINT oNewState )
 

Change object state.

CTObject * CTSRMotor::CreateBuffers ( CTList pVars,
TINT * pIDs,
TINT * eIDs,
TINT * zIDs,
TINT * wIDs )
 

Create the tree for a list of variables (of o model).

TBOOL CTSRMotor::CreateBuffers ( )
 

Create the tree to contain the entities.

CTList CTSRMotor::CreateRBNameList ( )
 

Create the list of names of recognised behaviours at the current frame.

TBOOL CTSRMotor::DestroyMarkedScenarios ( )
 

To do destroy recognized scenrios after marked all scenarios to be destroyed.

TBOOL CTSRMotor::DestroyRecognizedScenarios ( TBOOL bDestroyImmediate )
 

Destroy recognized scenrios.

TBOOL CTSRMotor::DestroyRecognizedScenariosPerson ( CTSRPerson * pPerson )
 

Destroy recognized scenrios for a person.

CTSRMotor * CTSRMotor::FindMotor ( TLPCSTR MotorName = TNULL ) [static]
 

Find a motor by its name: if the name is null => find the first motor ocuring.

CTObject * CTSRMotor::FindObject ( TLPCSTR ObjectName )
 

Find an predefined object. The motor first finds in the list m_LoadedModels, and then in CTStockObjects::Default.

TINT CTSRMotor::GetNumberModels ( TINT ModelType )
 

For statistics.

CTList CTSRMotor::GetSaveLoadObjects ( TBOOL bOnLoad = TTRUE ) [virtual]
 

The children to save/load.

Reimplemented from CTObject.

TBOOL CTSRMotor::Infer ( )
 

Infer.

TBOOL CTSRMotor::Init ( )
 

Preprocessing Init the motor.

TBOOL CTSRMotor::InitLIB ( ) [static]
 

To start up the lib This function must be call at the begin of the main program.

TBOOL CTSRMotor::IsSatisfied ( CTSRTriggerInstance * pTrigger )
 

For composed scenarios Verify if the model is satisfied witch the list of variables.

TBOOL CTSRMotor::IsSatisfied ( CTSRModel * pModel,
CTList pVars,
TBOOL bFirstActor = TFALSE )
 

For elementary scenarios Verify if the model is satisfied witch the list of variables bFirstActor = TTRUE, start.

TBOOL CTSRMotor::IsSatisfied ( CTSRModel * pModel,
CTSRTriggerInstance * pTrigger = TNULL )
 

Verify if the model is satisfied.

TBOOL CTSRMotor::MarkToDestroy ( CTSRPerson * pPerson )
 

Find senarios to be destroyed for a person.

TBOOL CTSRMotor::MarkToDestroy ( TBOOL bDestroyImmediate )
 

Find senarios to be destroyed.

TINT CTSRMotor::ModelCount ( ) [inline]
 

Get the number of used models.

00290 { return m_nModels; };

TBOOL CTSRMotor::OnPreLoad ( LPTBYTE * lpBuffers ) [virtual]
 

Overwrite.

Reimplemented from CTObject.

TBOOL CTSRMotor::SetContext ( CTList pContext )
 

Attach the context.

TBOOL CTSRMotor::SetPersons ( CTList pList,
TINT iFrame,
TINT ppType = CTPersonPipe::TS_INDIVIDUAL )
 

Convert from the input stream.

TBOOL CTSRMotor::SuspendScenriosPerson ( CTSRPerson * pPerson )
 

To suspend all recognized scenarios relative to a person.

TBOOL CTSRMotor::VerifyModelCoherence ( ) [protected, virtual]
 

Verify if there is a circle in the models.


Field Documentation

CTList CTSRMotor::m_Alarms
 

Contains the alarms generated by the engine.

CTList CTSRMotor::m_AllContextObjects
 

List of interested context objects/zones.

CTList CTSRMotor::m_AllMotors [static]
 

List of all used motors.

CTBool * CTSRMotor::m_CountResults
 

Count or not the recognised behaviours.

CTArray * CTSRMotor::m_Entities
 

Contains every temporal entities classified by persons person1 Model1 Obj1... Obj2 Model2 person2.

CTArray2 * CTSRMotor::m_EntityIndexes
 

Index the recognized scenarios by their ending time.

CTList CTSRMotor::m_EnvVars
 

List of environment variables.

CTFunctionModel * CTSRMotor::m_InitMotor
 

Hook functions.

CTList CTSRMotor::m_LoadedModels
 

List of loaded models.

CTTree CTSRMotor::m_OldItemConstructors
 

Tree of default constructors.

CTList CTSRMotor::m_Persons
 

Contain every persons.

CTArray CTSRMotor::m_RecognisedBehaviourCount
 

To count the recognised behaviours at each frame.

CTList * CTSRMotor::m_RecognizedScenarioIndexes
 

Index the recognized scenarios by their model. Each model has a list of recognized scenarios corresponding the model. The recognized scenrios of a list is ordered by its ending time.

CTInt CTSRMotor::m_ScenarioLife
 

Maximum duration of scenario life.

CTBool * CTSRMotor::m_ShowResults
 

Option Show or not the recognition results.

CTInt CTSRMotor::m_T [static]
 

Current time.

CTList CTSRMotor::m_UsedModels
 

List of used models.

TBOOL CTSRMotor::m_bCreateExport
 

If we want to create data to export.

CTInt CTSRMotor::m_nMaxPersons
 

Maximal number of persons: be set by user.

TINT CTSRMotor::m_nModels
 

Number of used models.

TINT CTSRMotor::m_nObjects
 

Number of objects.

TINT CTSRMotor::m_nTotalPersons
 

Count.

TINT CTSRMotor::m_nWalls
 

Number of walls.

TINT CTSRMotor::m_nZones
 

Number of zones.

CTSRMotor * CTSRMotor::m_pCurrentMotor [static]
 

Current motor.

CTList CTSRMotor::m_pTriggers
 

Trigger instances.


The documentation for this class was generated from the following file:
Generated at Wed Aug 6 15:59:01 2003 for TVU's libraries for video surveillance: by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001