Skip to content

dimyferdiana/kinect-coordinate-mapping

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kinect Coordinate Mapping

This project demonstrates Kinect for Windows coordinate mapping using SDK version 1.8.

Learn how to draw the joints on screen and PERFECTLY align them with the color or depth frame.

Tutorial

Read a thorough tutorial to understand Kinect coordiante mapping: [http://pterneas.com/?p=1554] (http://pterneas.com/?p=1554)

Example

foreach (Joint joint in body.Joints)
{
    // 3D coordinates in meters
    SkeletonPoint skeletonPoint = joint.Position;

    // 2D coordinates in pixels
    Point point = new Point();

    if (_mode == CameraMode.Color)
    {
        // Skeleton-to-Color mapping
        ColorImagePoint colorPoint = _sensor.CoordinateMapper.MapSkeletonPointToColorPoint(
                                                              skeletonPoint,
                                                              ColorImageFormat.RgbResolution640x480Fps30);

        point.X = colorPoint.X;
        point.Y = colorPoint.Y;
    }
    else if (_mode == CameraMode.Depth)
    {
        // Skeleton-to-Depth mapping
        DepthImagePoint depthPoint = _sensor.CoordinateMapper.MapSkeletonPointToDepthPoint(
                                                              skeletonPoint,
                                                              DepthImageFormat.Resolution320x240Fps30);

        point.X = depthPoint.X;
        point.Y = depthPoint.Y;
    }
}

Credits

Developed by Vangos Pterneas for LightBuzz

License

You are free to use these libraries in personal and commercial projects by attributing the original creator of Vitruvius. Licensed under MIT License.

Vitruvius

Remember to check my other project, [Vitruvius] (https://github.com/LightBuzz/Vitruvius). Vitruvius is an open-source Kinect library that will speed-up the development process of your projects and will save you a ton of time. Vitruvius supports WPF, WinForms and WinRT.

About

Kinect for Windows coordinate mapping (SDK version 1.8)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%