Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 1.9 KB

README.md

File metadata and controls

51 lines (40 loc) · 1.9 KB

Weight Lifting Bar Detection using Kinect

Detect a weight-lifting bar using Kinect for Windows version 2.

Kinect Weight Lifting Bar Detection - Vangos Pterneas

Video

Watch on YouTube

Prerequisites

Tutorial

Read the tutorial on Vangos Pterneas Blog

How to Use

// 1) Initialization
var barDetectionEngine = new BarDetectionEngine(
                             sensor.CoordinateMapper,
                             colorWidth,
                             colorHeight,
                             depthWidth,
                             depthHeight);

barDetectionEngine.BarDetected += BarDetectionEngine_BarDetected;

// 2) Update
barDetectionEngine.Update(depthData, bodyIndexData, body);

// 3) Event handling
private void BarDetectionEngine_BarDetected(object sender, BarDetectionResult e)
{
    if (e != null)
    {
        var center = e.Trail;
        var height = e.BarHeight;
        var length = e.barLength;
        var left = e.Minimum;
        var right = e.maximum;
    }
}

Contributors

License

You are free to use these libraries in personal and commercial projects by attributing the original creator of the project. View full License.