Replacing Obsolete MapSkeletonPointToDepth with CoordinateMapper.MapSkeletonPointToDepthPoint RRS feed

  • Question

  • Hi all

    I am quite new to c# and I am following an old kinect programming book (2012), trying to create a view of the skeleton tracker

    I have one warning that will not let me build and run the project. The code line is

    DepthImagePoint point = this.KinectDevice.MapSkeletonPointToDepth(joint.Position, this.KinectDevice.DepthStream.Format);

    'This method is obsolete replace with:'


    So after looking up CoordinateMapper and MapSkeletonPointToDepthPoint and

    I created this line of code to replace the old one:

    DepthImagePoint point = this.CoordinateMapper.MapSkeletonPointToDepthPoint( joint.Position, this.KinectDevice.DepthStream.Format);

    But now I get an error under 'CoordinateMapper' saying: 

    'ColourStreamTest.MainWindow' does not contain a definition for 'CoordinateMapper' and no extension method 'CoordinateMapper' accepting a first argument of type 'ColourStreamTest.MainWindow' could be found (are you missing a using directive or an assembly reference?)

    I am including the Microsoft.Kinect.dll reference, which should include the CoordinateMapper Class, I have even tried to create a new Coordinate mapper object but that throws up more errors

    Can anybody help me?

    Wednesday, April 16, 2014 1:26 PM


  • Elliott,

    You don't have an instance of Microsoft.Kinect.CoordinateMapper named CoordinateMapper defined.

    Based on your previcous code, just try this instead (where KinectDevice is an instance of the KinectSensor type):



    James Ashley - Presentation Layer Architect at Razorfish Emerging Experiences

    Wednesday, April 16, 2014 3:38 PM