Updating 'Microsoft.Kinect.KinectSensor.MapSkeletonPointToColor' to 'Microsoft.Kinect.CoordinateMapper.MapSkeletonPointToColorPoint' RRS feed

  • Question

  • Good day.

    I noticed that one of the updates to the Kinect for Windows SDK has thrown a warning (not error) in Visual Studio.

    The code that throws the warning is as follows:

    private Point SkeletonPointToScreen(SkeletonPoint skelPoint)
                    ColorImagePoint depthPoint = window.sensor.MapSkeletonPointToColor(skelPoint, ColorImageFormat.RgbResolution640x480Fps30);
                    return new Point(depthPoint.X, depthPoint.Y);

    Specifically, the first line after the first brace is out of date. The warning is:

    Warning 'Microsoft.Kinect.KinectSensor.MapSkeletonPointToColor(Microsoft.Kinect.SkeletonPoint, Microsoft.Kinect.ColorImageFormat)' is obsolete: '"This method is replaced by Microsoft.Kinect.CoordinateMapper.MapSkeletonPointToColorPoint"'

    So, I have to change the initialization statement for

    ColorImagePoint depthPoint
    to something that uses the 'Microsoft.Kinect.CoordinateMapper.MapSkeletonPointToColorPoint' method. How would this best be accomplished?

    I can post more code if needed. The method shown above is used to tell the program where to draw a representation of the skeleton from the Kinect on the WPF window.

    Wednesday, January 2, 2013 4:13 PM