如何在Kinect SDK 1.8中更改骨架的颜色?

时间:2014-03-02 13:48:51

标签: kinect kinect-sdk

作为问题,我不知道如何改变Skeleton - Basic WPF中骨架的颜色?任何人都可以帮助我

1 个答案:

答案 0 :(得分:1)

假设您正在使用Skeleton Sample中的代码,您可以更改这些画笔中的值:

    /// <summary>
    /// Brush used for drawing joints that are currently tracked
    /// </summary>
    private readonly Brush trackedJointBrush = new SolidColorBrush(Color.FromArgb(255, 68, 192, 68));

    /// <summary>
    /// Brush used for drawing joints that are currently inferred
    /// </summary>        
    private readonly Brush inferredJointBrush = Brushes.Yellow;

Brushes中的任何RGB值或任何预定义颜色,例如

    /// <summary>
    /// Brush used for drawing joints that are currently tracked (red)
    /// </summary>
    private readonly Brush trackedJointBrush = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0));

    /// <summary>
    /// Brush used for drawing joints that are currently inferred
    /// </summary>        
    private readonly Brush inferredJointBrush = Brushes.Blue;