NITE 1.5.1 - API Reference

XnVSteadyDetector Class Reference

#include <XnVSteadyDetector.h>

Inheritance diagram for XnVSteadyDetector:
Collaboration diagram for XnVSteadyDetector:

List of all members.

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)

Protected Attributes

XnUInt32 m_nDetectionDuration
XnFloat m_fMaximumStdDevForSteady
XnFloat m_fMaximumVarianceForSteady
XnFloat m_fMinimumStdDevForNotSteady
XnFloat m_fMinimumVarianceForNotSteady
XnUInt32 m_nInitialCooldownFrames
XnVSteadyStates * m_pSteadyStates

Private Attributes

XnVUintFloatSpecificEvent * m_pSteadyCBs
XnVUintFloatSpecificEvent * m_pNotSteadyCBs

Detailed Description

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

  • Steady condition reached

Definition at line 22 of file XnVSteadyDetector.h.


Member Typedef Documentation

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

Definition at line 30 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 29 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]nCooldownFramesMinimal number of frames after input start that steady is valid
[in]nDetectionDurationMinimal number of frames to constitute steady
[in]fMaximumStdDevForSteadyStandard deviation of points that is considered 'steady'
[in]strNameName 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]cxtThe 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]cxtThe 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]cxtUser's context
[in]CBThe 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]cxtUser's context
[in]CBThe Callback to call when the event is invoked.
Returns:
A handle, to allow unregistration.
void XnVSteadyDetector::Reset ( )

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

void XnVSteadyDetector::Reset ( XnUInt32  id) [protected]
void XnVSteadyDetector::SetDetectionDuration ( XnUInt32  nDuration)

Change the time it takes to detect steady state.

Parameters:
[in]nDurationThe 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]fStdDevThe 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]fStdDevThe 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]hCBThe handle provided on registration.
void XnVSteadyDetector::UnregisterSteady ( XnCallbackHandle  hCB)

Unregister from the steady event

Parameters:
[in]hCBThe handle provided on registration.
void XnVSteadyDetector::XN_API_DEPRECATED ( "Please use SetMaximumStdDevForSteady() instead."  )
XnFloat XnVSteadyDetector::XN_API_DEPRECATED ( "Please use GetMaximumStdDevForSteady() instead."  ) const

Member Data Documentation

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 156 of file XnVSteadyDetector.h.

Definition at line 152 of file XnVSteadyDetector.h.

Definition at line 158 of file XnVSteadyDetector.h.

XnVUintFloatSpecificEvent* XnVSteadyDetector::m_pNotSteadyCBs [private]

Definition at line 163 of file XnVSteadyDetector.h.

XnVUintFloatSpecificEvent* XnVSteadyDetector::m_pSteadyCBs [private]

Definition at line 162 of file XnVSteadyDetector.h.

XnVSteadyStates* XnVSteadyDetector::m_pSteadyStates [protected]

Definition at line 160 of file XnVSteadyDetector.h.

Definition at line 122 of file XnVSteadyDetector.h.

Definition at line 123 of file XnVSteadyDetector.h.

Definition at line 120 of file XnVSteadyDetector.h.

Definition at line 121 of file XnVSteadyDetector.h.


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