NITE 1.4.1 - API Reference
|
#include <XnVSteadyDetector.h>
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 |
A control that identifies return to steady condition. The XnVSteadyDetector defines one event:
Definition at line 21 of file XnVSteadyDetector.h.
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.
XnVSteadyDetector::XnVSteadyDetector | ( | XnUInt32 | nCooldownFrames = ms_nDefaultInitialCooldown , |
XnUInt32 | nDetectionDuration = ms_nDefaultDetectionDuration , |
||
XnFloat | fMaximumStdDevForSteady = ms_fDefaultMaximumStdDevForSteady , |
||
const XnChar * | strName = "XnVSteadyDetector" |
||
) |
Constructor
[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 | ( | ) |
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
XnFloat XnVSteadyDetector::GetMaximumStdDevForSteady | ( | ) | const |
Get the maximum standard deviation in the time span to define as steady, in m/s
XnFloat XnVSteadyDetector::GetMinimumStdDevForNotSteady | ( | ) | const |
Get the inximum standard deviation in the time span to define as not steady, in m/s
virtual void XnVSteadyDetector::OnNotSteadyDetected | ( | XnUInt32 | nId, |
XnFloat | fStdDev | ||
) | [protected, virtual] |
void XnVSteadyDetector::OnPointCreate | ( | const XnVHandPointContext * | cxt | ) | [virtual] |
Called when a point is created.
[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
[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
[in] | cxt | User's context |
[in] | CB | The callback to call when the event is invoked. |
XnCallbackHandle XnVSteadyDetector::RegisterSteady | ( | void * | cxt, |
SteadyCB | CB | ||
) |
Register for the steady event
[in] | cxt | User's context |
[in] | CB | The Callback to call when the event is invoked. |
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.
[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
[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
[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
[in] | hCB | The handle provided on registration. |
void XnVSteadyDetector::UnregisterSteady | ( | XnCallbackHandle | hCB | ) |
Unregister from the steady event
[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] |
XnFloat XnVSteadyDetector::m_fMaximumStdDevForSteady [protected] |
Definition at line 152 of file XnVSteadyDetector.h.
XnFloat XnVSteadyDetector::m_fMaximumVarianceForSteady [protected] |
Definition at line 153 of file XnVSteadyDetector.h.
XnFloat XnVSteadyDetector::m_fMinimumStdDevForNotSteady [protected] |
Definition at line 154 of file XnVSteadyDetector.h.
XnFloat XnVSteadyDetector::m_fMinimumVarianceForNotSteady [protected] |
Definition at line 155 of file XnVSteadyDetector.h.
XnUInt32 XnVSteadyDetector::m_nDetectionDuration [protected] |
Definition at line 151 of file XnVSteadyDetector.h.
XnUInt32 XnVSteadyDetector::m_nInitialCooldownFrames [protected] |
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.
const XnFloat XnVSteadyDetector::ms_fDefaultMaximumStdDevForSteady [static] |
Definition at line 121 of file XnVSteadyDetector.h.
const XnFloat XnVSteadyDetector::ms_fDefaultMinimumStdDevForNotSteady [static] |
Definition at line 122 of file XnVSteadyDetector.h.
const XnUInt32 XnVSteadyDetector::ms_nDefaultDetectionDuration [static] |
Definition at line 119 of file XnVSteadyDetector.h.
const XnUInt32 XnVSteadyDetector::ms_nDefaultInitialCooldown [static] |
Definition at line 120 of file XnVSteadyDetector.h.