NITE 1.4.1 - API Reference
|
#include <XnVPointDenoiser.h>
Classes | |
struct | LocalContext |
Public Member Functions | |
XnVPointDenoiser (XnFloat fDistanceThreshold=ms_fDefaultDistanceThreshold, const XnChar *strName="XnVPointDenoiser") | |
~XnVPointDenoiser () | |
void | Update (XnVMessage *pMessage) |
void | OnPointCreate (const XnVHandPointContext *pContext) |
void | OnPointUpdate (const XnVHandPointContext *pContext) |
void | OnPointDestroy (XnUInt32 nID) |
void | OnPrimaryPointCreate (const XnVHandPointContext *pContext, const XnPoint3D &ptSessionStarter) |
XnFloat | GetDistanceThreshold () const |
void | SetDistanceThreshold (XnFloat fDistanceThreshold) |
XnFloat | GetCloseRatio () const |
XnFloat | GetFarRatio () const |
void | SetCloseRatio (XnFloat fCloseRatio) |
void | SetFarRatio (XnFloat fFarRatio) |
Protected Member Functions | |
XN_DECLARE_DEFAULT_HASH_DECL (XNV_NITE_API, XnUInt32, LocalContext *, XnVIntLocalHash) | |
LocalContext * | GetLocalContext (XnUInt32 nID) |
XnFloat | Distance (XnPoint3D &pt1, XnPoint3D &pt2) const |
void | UpdatePointDenoise (XnPoint3D &ptToChange, const XnPoint3D &ptDontChange) |
void | Clear () |
Protected Attributes | |
XnVIntLocalHash | m_ActivePoints |
XnFloat | m_fDistanceThreshold |
XnFloat | m_fCloseRatio |
XnFloat | m_fFarRatio |
XnVMultipleHands | m_DenoisedHands |
Static Protected Attributes | |
static const XnFloat | ms_fDefaultDistanceThreshold |
static const XnFloat | ms_fDefaultCloseRatio |
static const XnFloat | ms_fDefaultFarRatio |
The XnVPointDenoiser holds its own XnVMultipleHands object. It receives notifications from earlier nodes, and sends on its own notifications with matching IDs. The local points are denoised.
Definition at line 21 of file XnVPointDenoiser.h.
XnVPointDenoiser::XnVPointDenoiser | ( | XnFloat | fDistanceThreshold = ms_fDefaultDistanceThreshold , |
const XnChar * | strName = "XnVPointDenoiser" |
||
) |
Constructor
[in] | fDistanceThreshold | Distance (in x-y) to change between close and far ratios |
[in] | strName | Name of the control, for log purposes. |
XnVPointDenoiser::~XnVPointDenoiser | ( | ) |
void XnVPointDenoiser::Clear | ( | ) | [protected] |
XnFloat XnVPointDenoiser::Distance | ( | XnPoint3D & | pt1, |
XnPoint3D & | pt2 | ||
) | const [protected] |
XnFloat XnVPointDenoiser::GetCloseRatio | ( | ) | const |
XnFloat XnVPointDenoiser::GetDistanceThreshold | ( | ) | const |
Get the current noise threshold
XnFloat XnVPointDenoiser::GetFarRatio | ( | ) | const |
LocalContext* XnVPointDenoiser::GetLocalContext | ( | XnUInt32 | nID | ) | [protected] |
void XnVPointDenoiser::OnPointCreate | ( | const XnVHandPointContext * | pContext | ) | [virtual] |
Handle a new point created
[in] | pContext | The new hand created |
Reimplemented from XnVPointControl.
void XnVPointDenoiser::OnPointDestroy | ( | XnUInt32 | nID | ) | [virtual] |
Handle an existing point destruction
[in] | nID | The Id of the destroyed point |
Reimplemented from XnVPointControl.
void XnVPointDenoiser::OnPointUpdate | ( | const XnVHandPointContext * | pContext | ) | [virtual] |
Handle an existing point update
[in] | pContext | the new details of an existing point |
Reimplemented from XnVPointControl.
void XnVPointDenoiser::OnPrimaryPointCreate | ( | const XnVHandPointContext * | pContext, |
const XnPoint3D & | ptSessionStarter | ||
) | [virtual] |
Update the internal points' focus point
[in] | pContext | The hand point that creates the session |
[in] | ptSessionStarter | The position in which the session has started |
Reimplemented from XnVPointControl.
void XnVPointDenoiser::SetCloseRatio | ( | XnFloat | fCloseRatio | ) |
Change the ratio for close points between the new point and the old ones.
[in] | fCloseRatio | The new ratio for close points |
void XnVPointDenoiser::SetDistanceThreshold | ( | XnFloat | fDistanceThreshold | ) |
Change distance limit for far and close ratios
fDistanceThreshold | The new threshold |
void XnVPointDenoiser::SetFarRatio | ( | XnFloat | fFarRatio | ) |
Change the ratio for far points between the new point and the old ones.
[in] | fFarRatio | The new ratio for far points |
void XnVPointDenoiser::Update | ( | XnVMessage * | pMessage | ) | [virtual] |
void XnVPointDenoiser::UpdatePointDenoise | ( | XnPoint3D & | ptToChange, |
const XnPoint3D & | ptDontChange | ||
) | [protected] |
XnVPointDenoiser::XN_DECLARE_DEFAULT_HASH_DECL | ( | XNV_NITE_API | , |
XnUInt32 | , | ||
LocalContext * | , | ||
XnVIntLocalHash | |||
) | [protected] |
XnVIntLocalHash XnVPointDenoiser::m_ActivePoints [protected] |
Definition at line 114 of file XnVPointDenoiser.h.
XnVMultipleHands XnVPointDenoiser::m_DenoisedHands [protected] |
Definition at line 124 of file XnVPointDenoiser.h.
XnFloat XnVPointDenoiser::m_fCloseRatio [protected] |
Definition at line 121 of file XnVPointDenoiser.h.
XnFloat XnVPointDenoiser::m_fDistanceThreshold [protected] |
Definition at line 120 of file XnVPointDenoiser.h.
XnFloat XnVPointDenoiser::m_fFarRatio [protected] |
Definition at line 122 of file XnVPointDenoiser.h.
const XnFloat XnVPointDenoiser::ms_fDefaultCloseRatio [static, protected] |
Definition at line 117 of file XnVPointDenoiser.h.
const XnFloat XnVPointDenoiser::ms_fDefaultDistanceThreshold [static, protected] |
Definition at line 116 of file XnVPointDenoiser.h.
const XnFloat XnVPointDenoiser::ms_fDefaultFarRatio [static, protected] |
Definition at line 118 of file XnVPointDenoiser.h.