Tracking movement with KinectKit

Last reviewed: 9/1/2012

HOW Article ID: H101208

The information in this article applies to:

  • KinectKit

Summary

Tracking movement is the process of mapping movement from image and positional data captured by cameras.

Chant KinectKit is comprised of software components that handle the complexities of tracking movement with Microsoft Kinect sensors.

It simplifies the process of managing Kinect sensors with the Natural User Interface API (NAPI). You can process audio and visual data to map movement directly within software you develop and deploy.

Install Microsoft Kinect for Windows SDK and sensor and Chant KinectKit and you are ready to develop applications that track movement.

More Information

The KinectKit movement management component is designed to provide you a lot of flexiblity and minimize the programming necessary to manage the color, depth, skeleton, and audio data from a Microsoft Kinect sensor.

To start capturing data, simply use the Start method to turn on the sensor cameras. For example:

nChantKM.Start();

To stop capturing data, simply use the Stop method to turn off the sensor cameras. For example:

nChantKM.Stop();

The Start method initiates the session with the Microsoft Kinect sensor and enables the color, depth, and skeleton data streams by default. To process the stream data, you need to use the RegisterCallback method and declare a routine to handle the callback when data is available.

// Turn on KSStatusChanged events
NChantKM1.RegisterCallback(ChantCallback.CCKSStatusChanged);

private void NChantKM1_HasEvent(object sender, Chant.KinectKit.HasEventArgs e)
{
    // Get the number of events
    int numberOfEvents = NChantKM1.GetResourceCount(ChantSpeechResource.CSREvent, 0, 0);
    for (int i = 0; i < numberOfEvents; i++)
    {
        // Get the event from the event queue
        NChantKMEvent nChantKMEvent = NChantKM1.GetChantKMEvent(0);
        switch (nChantKMEvent.ChantCallback)
        {
            case ChantCallback.CCKSStatusChanged:
                ...
                break;
            ...
            default:
                break;
        }
        // Remove the event from the event queue
        NChantKM1.RemoveResource(ChantSpeechResource.CSREvent, 0);
    }
}

For additional help with KinectKit, contact Chant Support via Chant Support Contacts or web.