INuiSensor::NuiTransformSmooth Method
Kinect for Windows 1.5, 1.6, 1.7, 1.8
Filters skeleton positions to reduce jitter between frames.
Syntax
public:
HRESULT NuiTransformSmooth(
NUI_SKELETON_FRAME *pSkeletonFrame,
const NUI_TRANSFORM_SMOOTH_PARAMETERS *pSmoothingParams
)
Parameters
- pSkeletonFrame
Type: NUI_SKELETON_FRAME
[in] On entry, points to a NUI_SKELETON_FRAME that contains the skeleton data to be smoothed. On exit, the skeleton data in the structure has been replaced by smoothed data. If NuiTransformSmooth does not return S_OK, the data is unchanged. - pSmoothingParams
Type: NUI_TRANSFORM_SMOOTH_PARAMETERS
[in] The parameters for the smoothing function. See the NUI_TRANSFORM_SMOOTH_PARAMETERS structure for a description of the parameters.
Return Value
Type: HRESULT
Returns S_OK if successful; otherwise, returns one of the failure codes in the following table.
Error | Description |
---|---|
E_OUTOFMEMORY | The allocation failed. |
E_POINTER | The value of the pSkeletonFrame parameter is NULL. |
Remarks
The filter used is based on the Holt double-exponential smoothing method used for statistical analysis of economic data, which provides smoothing with less latency than other smoothing filter algorithms. A single call of this function updates all currently tracked skeletons.
Requirements
Header: Declared in NuiSensor.h; however, include NuiApi.h in your project.