I'm using Kinect SDK 1.6, and I'm following the Skeleton Tracking Funamentals tutorial of Windows Kinect Quickstart Series, available here.
Even if these tutorials have been made for SDK 1.0, all was going pretty well until I followed the instructions to map the position of my hands on a custom-sized window (say 1280x720).
Dan Fernandez is using the following line of code to achieve this
private void ScalePosition(FrameworkElement element, Joint joint)
{
// Convert the value to X/Y;
Joint scaledJoint = joint.ScaleTo(1280, 720);
....
}
Well, the method ScaleTo
is not a custom function, it should be provided in the Kinect SDK, but according to my editor, there's no such method. I can't locate it, and I think it might have been moved/renamed/whatever since SDK 1.0.
Just to make sure everything is in order, here is my using
list, everyithing else (Skeleton tracking etc.) is working, so I really can't figure it out
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Kinect;
using Microsoft.Kinect.Toolkit;
using Microsoft.Samples.Kinect.WpfViewers;
I can give further details about my code on request.
If you have the correct reference to Coding4Fun, you are actually just missing this:
using Coding4Fun.Kinect.Wpf;
at the beginning of your code.