Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

XnVPointDenoiser Class Reference

#include <XnVPointDenoiser.h>

Inheritance diagram for XnVPointDenoiser:
Inheritance graph
[legend]
Collaboration diagram for XnVPointDenoiser:
Collaboration graph
[legend]

List of all members.

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)
LocalContextGetLocalContext (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

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


Constructor & Destructor Documentation

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

Constructor

Parameters:
[in] fDistanceThreshold Distance (in x-y) to change between close and far ratios
[in] strName Name 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

Returns:
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

Parameters:
[in] pContext The new hand created

Reimplemented from XnVPointControl.

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

Handle an existing point destruction

Parameters:
[in] nID The Id of the destroyed point

Reimplemented from XnVPointControl.

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

Handle an existing point update

Parameters:
[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

Parameters:
[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.

Parameters:
[in] fCloseRatio The new ratio for close points
void XnVPointDenoiser::SetDistanceThreshold ( XnFloat  fDistanceThreshold  ) 

Change distance limit for far and close ratios

Parameters:
fDistanceThreshold The new threshold
void XnVPointDenoiser::SetFarRatio ( XnFloat  fFarRatio  ) 

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

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

Handle the current state

Parameters:
pMessage The current state

Reimplemented from XnVPointFilter.

void XnVPointDenoiser::UpdatePointDenoise ( XnPoint3D &  ptToChange,
const XnPoint3D &  ptDontChange 
) [protected]
XnVPointDenoiser::XN_DECLARE_DEFAULT_HASH_DECL ( XNV_NITE_API  ,
XnUInt32  ,
LocalContext ,
XnVIntLocalHash   
) [protected]

Member Data Documentation

XnVIntLocalHash XnVPointDenoiser::m_ActivePoints [protected]

Definition at line 114 of file XnVPointDenoiser.h.

Definition at line 124 of file XnVPointDenoiser.h.

XnFloat XnVPointDenoiser::m_fCloseRatio [protected]

Definition at line 121 of file XnVPointDenoiser.h.

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.


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