Share via


NUI_TRANSFORM_SMOOTH_PARAMETERS Structure

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Contains parameters for smoothing skeleton data using a mathematical transform.

Syntax

typedef struct _NUI_TRANSFORM_SMOOTH_PARAMETERS {
    FLOAT fSmoothing;
    FLOAT fCorrection;
    FLOAT fPrediction;
    FLOAT fJitterRadius;
    FLOAT fMaxDeviationRadius;
} NUI_TRANSFORM_SMOOTH_PARAMETERS;

Members

  • fSmoothing
    Smoothing value. The range is [0.0, 1.0] and the default value is 0.5 meters. A higher value corresponds to more smoothing; passing 0 causes the raw data to be returned. As the smoothing value is increased, responsiveness to the raw data decreases; therefore, increased smoothing leads to increased latency.
  • fCorrection
    Amount of correction. The range is [0.0, 1.0] and the default value is 0.5 meters. A higher value corrects toward the raw data more quickly; a lower value corrects more slowly and appears smoother.
  • fPrediction
    Number of frames to predict into the future. The number is >= 0 and the default value is 0.0. A value greater than 0.5 will likely lead to overshoot when the data changes quickly; dampen the overshoot effect by using a smaller value of fMaxDeviationRadius.
  • fJitterRadius
    Jitter-reduction radius (in meters), which determines how aggressively to remove jitter from the raw data. The jitter radius is >= 0 and the default value is 0.05 meters. Any jitter beyond this radius is clamped to the jitter reduction radius.
  • fMaxDeviationRadius
    Maximum radius (in meters) that a filtered position can deviate from raw data. The maximum deviation value is >= 0 and the default value is 0.04 meters. A filtered value that exceeds this radius is clamped at the maximum radius in the direction of the filtered value.

Remarks

Smoothing parameters are used by the NuiTransformSmooth function and the INuiSensor::NuiTransformSmooth method.

Here are some example smoothing combinations for different scenarios:

// Some smoothing with little latency (defaults).
// Only filters out small jitters.
// Good for gesture recognition.
const NUI_TRANSFORM_SMOOTH_PARAMETERS DefaultParams = 
{0.5f, 0.5f, 0.5f, 0.05f, 0.04f};
 
// Smoothed with some latency.
// Filters out medium jitters.
// Good for a menu system that needs to be smooth but
// doesn't need the reduced latency as much as gesture recognition does.
const NUI_TRANSFORM_SMOOTH_PARAMETERS SomewhatLatentParams = 
{0.5f, 0.1f, 0.5f, 0.1f, 0.1f};
 
// Very smooth, but with a lot of latency.
// Filters out large jitters.
// Good for situations where smooth data is absolutely required
// and latency is not an issue.
const NUI_TRANSFORM_SMOOTH_PARAMETERS VerySmoothParams = 
{0.7f, 0.3f, 1.0f, 1.0f, 1.0f};

Requirements

Header: Declared in NuiSkeleton.h; however, include NuiApi.h in your project.