#include <XnVSteadyDetector.h>
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:
Definition at line 22 of file XnVSteadyDetector.h.
Member Typedef Documentation
Constructor & Destructor Documentation
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] |
Called when a point is created.
- Parameters:
-
| [in] | cxt | The hand context of the newly created point |
Reimplemented from XnVPointControl.
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 |
( |
|
) |
|
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] | 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. |
| void XnVSteadyDetector::XN_API_DEPRECATED |
( |
"Please use SetMaximumStdDevForSteady() instead." |
|
) |
|
| XnFloat XnVSteadyDetector::XN_API_DEPRECATED |
( |
"Please use GetMaximumStdDevForSteady() instead." |
|
) |
const |
Member Data Documentation
The documentation for this class was generated from the following file: