Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes

XnVSteadyDetector Class Reference

#include <XnVSteadyDetector.h>

Inheritance diagram for XnVSteadyDetector:
Inheritance graph
[legend]
Collaboration diagram for XnVSteadyDetector:
Collaboration graph
[legend]

List of all members.

Classes

struct  SteadyState

Public Types

typedef void(XN_CALLBACK_TYPE * SteadyCB )(XnUInt32 nId, XnFloat fStdDev, void *pUserCxt)
typedef void(XN_CALLBACK_TYPE * NotSteadyCB )(XnUInt32 nId, XnFloat fStdDev, void *pUserCxt)

Public Member Functions

 XnVSteadyDetector (XnUInt32 nCooldownFrames=ms_nDefaultInitialCooldown, XnUInt32 nDetectionDuration=ms_nDefaultDetectionDuration, XnFloat fMaximumStdDevForSteady=ms_fDefaultMaximumStdDevForSteady, const XnChar *strName="XnVSteadyDetector")
 ~XnVSteadyDetector ()
XnCallbackHandle RegisterSteady (void *cxt, SteadyCB CB)
void UnregisterSteady (XnCallbackHandle hCB)
XnCallbackHandle RegisterNotSteady (void *cxt, NotSteadyCB CB)
void UnregisterNotSteady (XnCallbackHandle hCB)
void Reset ()
XnUInt32 GetDetectionDuration () const
XnFloat GetMaximumStdDevForSteady () const
XnFloat GetMinimumStdDevForNotSteady () const
void SetDetectionDuration (XnUInt32 nDuration)
void SetMaximumStdDevForSteady (XnFloat fStdDev)
void SetMinimumStdDevForNotSteady (XnFloat fStdDev)
void OnPointCreate (const XnVHandPointContext *cxt)
void OnPointUpdate (const XnVHandPointContext *cxt)
XnFloat XN_API_DEPRECATED ("Please use GetMaximumStdDevForSteady() instead.") GetMaximumVelocity() const
void XN_API_DEPRECATED ("Please use SetMaximumStdDevForSteady() instead.") SetMaximumVelocity(XnFloat fVelocity)

Static Public Attributes

static const XnUInt32 ms_nDefaultDetectionDuration
static const XnUInt32 ms_nDefaultInitialCooldown
static const XnFloat ms_fDefaultMaximumStdDevForSteady
static const XnFloat ms_fDefaultMinimumStdDevForNotSteady

Protected Member Functions

void Reset (XnUInt32 id)
XnStatus DetectSteady (XnUInt32 nId, const XnPoint3D &pt, XnFloat fTime)
virtual void OnSteadyDetected (XnUInt32 nId, XnFloat fStdDev)
virtual void OnNotSteadyDetected (XnUInt32 nId, XnFloat fStdDev)
 XN_DECLARE_DEFAULT_HASH (XnUInt32, SteadyState *, SteadyStates)

Protected Attributes

XnUInt32 m_nDetectionDuration
XnFloat m_fMaximumStdDevForSteady
XnFloat m_fMaximumVarianceForSteady
XnFloat m_fMinimumStdDevForNotSteady
XnFloat m_fMinimumVarianceForNotSteady
XnUInt32 m_nInitialCooldownFrames
SteadyStates m_SteadyStates

Private Attributes

XnVUintFloatSpecificEvent m_SteadyCBs
XnVUintFloatSpecificEvent m_NotSteadyCBs

Detailed Description

A control that identifies return to steady condition. The XnVSteadyDetector defines one event:

Definition at line 21 of file XnVSteadyDetector.h.


Member Typedef Documentation

typedef void(XN_CALLBACK_TYPE * XnVSteadyDetector::NotSteadyCB)(XnUInt32 nId, XnFloat fStdDev, void *pUserCxt)

Definition at line 29 of file XnVSteadyDetector.h.

typedef void(XN_CALLBACK_TYPE * XnVSteadyDetector::SteadyCB)(XnUInt32 nId, XnFloat fStdDev, void *pUserCxt)

Type for the steady event callback

Definition at line 28 of file XnVSteadyDetector.h.


Constructor & Destructor Documentation

XnVSteadyDetector::XnVSteadyDetector ( XnUInt32  nCooldownFrames = ms_nDefaultInitialCooldown,
XnUInt32  nDetectionDuration = ms_nDefaultDetectionDuration,
XnFloat  fMaximumStdDevForSteady = ms_fDefaultMaximumStdDevForSteady,
const XnChar *  strName = "XnVSteadyDetector" 
)

Constructor

Parameters:
[in] nCooldownFrames Minimal number of frames after input start that steady is valid
[in] nDetectionDuration Minimal number of frames to constitute steady
[in] fMaximumStdDevForSteady Standard deviation of points that is considered 'steady'
[in] strName Name of the control, for log purposes.
XnVSteadyDetector::~XnVSteadyDetector (  ) 

Member Function Documentation

XnStatus XnVSteadyDetector::DetectSteady ( XnUInt32  nId,
const XnPoint3D &  pt,
XnFloat  fTime 
) [protected]
XnUInt32 XnVSteadyDetector::GetDetectionDuration (  )  const

Get the time used to detect steady state, in ms

Returns:
the time
XnFloat XnVSteadyDetector::GetMaximumStdDevForSteady (  )  const

Get the maximum standard deviation in the time span to define as steady, in m/s

Returns:
the standard deviation
XnFloat XnVSteadyDetector::GetMinimumStdDevForNotSteady (  )  const

Get the inximum standard deviation in the time span to define as not steady, in m/s

Returns:
the standard deviation
virtual void XnVSteadyDetector::OnNotSteadyDetected ( XnUInt32  nId,
XnFloat  fStdDev 
) [protected, virtual]
void XnVSteadyDetector::OnPointCreate ( const XnVHandPointContext cxt  )  [virtual]

Called when a point is created.

Parameters:
[in] cxt The hand context of the newly created point

Reimplemented from XnVPointControl.

void XnVSteadyDetector::OnPointUpdate ( const XnVHandPointContext cxt  )  [virtual]

Called when a point is updated. This will cause the algorithm to look for steady condition for this hand

Parameters:
[in] cxt The hand context of the updated point

Reimplemented from XnVPointControl.

virtual void XnVSteadyDetector::OnSteadyDetected ( XnUInt32  nId,
XnFloat  fStdDev 
) [protected, virtual]
XnCallbackHandle XnVSteadyDetector::RegisterNotSteady ( void *  cxt,
NotSteadyCB  CB 
)

Register for the not-steady event

Parameters:
[in] cxt User's context
[in] CB The callback to call when the event is invoked.
Returns:
A handle, to allow unregistration
XnCallbackHandle XnVSteadyDetector::RegisterSteady ( void *  cxt,
SteadyCB  CB 
)

Register for the steady event

Parameters:
[in] cxt User's context
[in] CB The Callback to call when the event is invoked.
Returns:
A handle, to allow unregistration.
void XnVSteadyDetector::Reset ( XnUInt32  id  )  [protected]
void XnVSteadyDetector::Reset (  ) 

Forget the existing state, and start looking for steady state all over again.

void XnVSteadyDetector::SetDetectionDuration ( XnUInt32  nDuration  ) 

Change the time it takes to detect steady state.

Parameters:
[in] nDuration The time it takes to detect steady state, in milliseconds (default is 200 ms)
void XnVSteadyDetector::SetMaximumStdDevForSteady ( XnFloat  fStdDev  ) 

Change the standard deviation that is considered steady state

Parameters:
[in] fStdDev The maximum standard deviation considered as steady state, in m/s (default is 0.01 m/s)
void XnVSteadyDetector::SetMinimumStdDevForNotSteady ( XnFloat  fStdDev  ) 

Change the standard deviation that is considered not steady state

Parameters:
[in] fStdDev The minimum standard deviation considered as not steady state, in m/s (default is 0.02 m/s)
void XnVSteadyDetector::UnregisterNotSteady ( XnCallbackHandle  hCB  ) 

Unregister from the not-steady event

Parameters:
[in] hCB The handle provided on registration.
void XnVSteadyDetector::UnregisterSteady ( XnCallbackHandle  hCB  ) 

Unregister from the steady event

Parameters:
[in] hCB The handle provided on registration.
XnFloat XnVSteadyDetector::XN_API_DEPRECATED ( "Please use GetMaximumStdDevForSteady() instead."   )  const
void XnVSteadyDetector::XN_API_DEPRECATED ( "Please use SetMaximumStdDevForSteady() instead."   ) 
XnVSteadyDetector::XN_DECLARE_DEFAULT_HASH ( XnUInt32  ,
SteadyState ,
SteadyStates   
) [protected]

Member Data Documentation

Definition at line 152 of file XnVSteadyDetector.h.

Definition at line 153 of file XnVSteadyDetector.h.

Definition at line 154 of file XnVSteadyDetector.h.

Definition at line 155 of file XnVSteadyDetector.h.

Definition at line 151 of file XnVSteadyDetector.h.

Definition at line 157 of file XnVSteadyDetector.h.

XnVUintFloatSpecificEvent XnVSteadyDetector::m_NotSteadyCBs [private]

Definition at line 169 of file XnVSteadyDetector.h.

XnVUintFloatSpecificEvent XnVSteadyDetector::m_SteadyCBs [private]

Definition at line 168 of file XnVSteadyDetector.h.

SteadyStates XnVSteadyDetector::m_SteadyStates [protected]

Definition at line 166 of file XnVSteadyDetector.h.

Definition at line 121 of file XnVSteadyDetector.h.

Definition at line 122 of file XnVSteadyDetector.h.

Definition at line 119 of file XnVSteadyDetector.h.

Definition at line 120 of file XnVSteadyDetector.h.


The documentation for this class was generated from the following file: