NITE 1.5.1 - API Reference

XnVPointDenoiser Class Reference

#include <XnVPointDenoiser.h>

Inheritance diagram for XnVPointDenoiser:
Collaboration diagram for XnVPointDenoiser:

List of all members.

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

XnVDenoisingLocalContext * GetLocalContext (XnUInt32 nID)
XnFloat Distance (XnPoint3D &pt1, XnPoint3D &pt2) const
void UpdatePointDenoise (XnPoint3D &ptToChange, const XnPoint3D &ptDontChange)
void Clear ()

Protected Attributes

XnVIntLocalHash * m_pActivePoints
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

Detailed Description

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 23 of file XnVPointDenoiser.h.

Constructor & Destructor Documentation

XnVPointDenoiser::XnVPointDenoiser ( XnFloat  fDistanceThreshold = ms_fDefaultDistanceThreshold,
const XnChar *  strName = "XnVPointDenoiser" 


[in]fDistanceThresholdDistance (in x-y) to change between close and far ratios
[in]strNameName of the control, for log purposes.
XnVPointDenoiser::~XnVPointDenoiser ( )

Member Function Documentation

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

Current noise threshold
XnFloat XnVPointDenoiser::GetFarRatio ( ) const
XnVDenoisingLocalContext* XnVPointDenoiser::GetLocalContext ( XnUInt32  nID) [protected]
void XnVPointDenoiser::OnPointCreate ( const XnVHandPointContext pContext) [virtual]

Handle a new point created

[in]pContextThe new hand created

Reimplemented from XnVPointControl.

void XnVPointDenoiser::OnPointDestroy ( XnUInt32  nID) [virtual]

Handle an existing point destruction

[in]nIDThe Id of the destroyed point

Reimplemented from XnVPointControl.

void XnVPointDenoiser::OnPointUpdate ( const XnVHandPointContext pContext) [virtual]

Handle an existing point update

[in]pContextthe 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]pContextThe hand point that creates the session
[in]ptSessionStarterThe 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]fCloseRatioThe new ratio for close points
void XnVPointDenoiser::SetDistanceThreshold ( XnFloat  fDistanceThreshold)

Change distance limit for far and close ratios

fDistanceThresholdThe new threshold
void XnVPointDenoiser::SetFarRatio ( XnFloat  fFarRatio)

Change the ratio for far points between the new point and the old ones.

[in]fFarRatioThe new ratio for far points
void XnVPointDenoiser::Update ( XnVMessage pMessage) [virtual]

Handle the current state

pMessageThe current state

Reimplemented from XnVPointFilter.

void XnVPointDenoiser::UpdatePointDenoise ( XnPoint3D &  ptToChange,
const XnPoint3D &  ptDontChange 
) [protected]

Member Data Documentation

XnFloat XnVPointDenoiser::m_fCloseRatio [protected]

Definition at line 113 of file XnVPointDenoiser.h.

Definition at line 112 of file XnVPointDenoiser.h.

XnFloat XnVPointDenoiser::m_fFarRatio [protected]

Definition at line 114 of file XnVPointDenoiser.h.

XnVIntLocalHash* XnVPointDenoiser::m_pActivePoints [protected]

Definition at line 106 of file XnVPointDenoiser.h.

const XnFloat XnVPointDenoiser::ms_fDefaultCloseRatio [static, protected]

Definition at line 109 of file XnVPointDenoiser.h.

const XnFloat XnVPointDenoiser::ms_fDefaultDistanceThreshold [static, protected]

Definition at line 108 of file XnVPointDenoiser.h.

const XnFloat XnVPointDenoiser::ms_fDefaultFarRatio [static, protected]

Definition at line 110 of file XnVPointDenoiser.h.

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