From 6d178a9ee435e4d3fcf7dbca8cfa4e8405727f26 Mon Sep 17 00:00:00 2001 From: jesse-nsquared Date: Mon, 16 Mar 2015 17:40:29 +1100 Subject: [PATCH] lab12 --- Kinect2Sample/Database/HandsAboveHead.gbd | Bin 0 -> 132821 bytes Kinect2Sample/GestureDetector.cs | 247 ++++++++++++++++++++++ Kinect2Sample/GestureResultView.cs | 181 ++++++++++++++++ Kinect2Sample/Kinect2Sample.csproj | 8 + Kinect2Sample/MainPage.xaml | 13 +- Kinect2Sample/MainPage.xaml.cs | 141 +++++++++++- Kinect2Sample/Package.appxmanifest | 1 + 7 files changed, 587 insertions(+), 4 deletions(-) create mode 100644 Kinect2Sample/Database/HandsAboveHead.gbd create mode 100644 Kinect2Sample/GestureDetector.cs create mode 100644 Kinect2Sample/GestureResultView.cs diff --git a/Kinect2Sample/Database/HandsAboveHead.gbd b/Kinect2Sample/Database/HandsAboveHead.gbd new file mode 100644 index 0000000000000000000000000000000000000000..6533db94abe944f850174aab5b7e87034d58fb9f GIT binary patch literal 132821 zcmd?wgSTbZy0!5W+jhmaZQDjAsU($Ds**x%+qP}nwr$(yH=li+myElUUFkbf-XusL$9U#^&T{+?>2q=3>?&}_uyV@ z4e39)?~Z+Vp3jE)pXXVwZ@t0Ls88o=N z0`~2{ZLc+Y5A40;f9XseUB6G?ZMPfTYxQkpgz6U7%-^s;J&-`8Psc;Aw7TO zzt7cSj>Y*?tM=|cq<24`*k@g+SNHOJE!Ta4?hmiS*XOJ9l7{OZysZEKpIT?Tfqe#T zH=tk7C&YlU4_s)*jxIA~r+$66>OHtmuO++hV%5F_2M!q6Ynk4Id*@}XGq88x{@u5f zZ+qy2py!_8%~?Pgln_gL^GG zaL0_s{NK@9J#SK(jrG5?RR-+ZwXoEHt#{8K9IYF!F>t_6eFhHReTCkGwwr^OvFy`( zztj%qWH9DN>u=Q#=3;Q}%d?-+4(4Vs)hzRGIcj%adO-idefkgn@0S?(>ZS`cdCyna zbl8PgZ1SEj@X_Hb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*xY=K3;&`o|=S|$a7Wxx$aJaYG^ao6{eZy7g zIfI?wsyLZ|6v_h`sL$tCcltq#9w4iM9RD zZ$rH1cD|x@&k;jZ6FXls^^^8PROr6_x~~4_5V~&@^R(Z_x3iPdVgTZQp%_TM|tm0t%{1&f!`spCAtv!zUo{c{Sd0(0LP59kP z@!^BKnI>-5s#?;0kbMq=F<+5pkjh~CU#ZHFnnzM1ywK+`C+qR$BJA}V&m1n5ilAry zGxY$oAG&`IOKSA^SFfWT!w!1ZfM01YiUuk)`jwvR<_^?6GLWvh=k)k_1HI7iO~R7) zemc-gG+xxsg4+XB=mi*HZec z)^?5g64Q3?ubSHar1}%q^;7SgeJ~fI`>8gT39FU6dq4ZU(cH5o)%mKQI&Ar{S}Th8 z^UhL#Ha_jE@b`F8?~CX6wa=;SwYY9yZ=ap(ruw?-OY1XQw{80iJwxuJb5#6=;u!*+ z{_f+Av-5skSDVp?&a38{J-m;XVCDtq{I|OGQN`^%77sKi*~eRF`J#dLZ}+zMoVai7 z^RySekMPBp+TP3ih|b~ukv-KqJ3hYnA$NPI{HBgDp4a_7)a&+`l>#Z*d(d;6RR690 zKdTQ+j<{#|tABT|s$C}ylQw7VZpRsGV`GtS_8A4v)%zxN^#XR>*6HdyyV&~&ynk8# zV;8C^U;K_1UA)3(OmMCqQmqS}AAIpm%XLxpO+BK<58Umna1OzJaT(F)`T>Vk4H^;&I)4g|p@RU7H;lSDd{h%`0{Y-((g@3TW>p_o})b6P8x5x20 zv9Z0{)4jwxt#Y@s_k_5H=55qQ)wSagrFYe7L%+)|8_3lDTRNx3*1Ggv3vaRQTZH#n z))rm{vyU7n?`!52rg=$O(M*-KeK4O3n%zwG4Dl**S7Yyljr-!C6#Yc4GX4KQHnw=! literal 0 HcmV?d00001 diff --git a/Kinect2Sample/GestureDetector.cs b/Kinect2Sample/GestureDetector.cs new file mode 100644 index 0000000..75bdc0c --- /dev/null +++ b/Kinect2Sample/GestureDetector.cs @@ -0,0 +1,247 @@ +//------------------------------------------------------------------------------ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +//------------------------------------------------------------------------------ + +namespace Kinect2Sample +{ + using System; + using System.Collections.Generic; + using Microsoft.Kinect; + using Microsoft.Kinect.VisualGestureBuilder; + using WindowsPreview.Kinect; + using Windows.UI.Xaml; + using WindowsPreview.Data; + + /// + /// Gesture Detector class which listens for VisualGestureBuilderFrame events from the service + /// and updates the associated GestureResultView object with the latest results for the gesture + /// + public class GestureDetector : IDisposable + { + //public RoutedEventHandler GestureRecognized { get; set; } + + //important lab 13 + /// Path to the gesture database that was trained with VGB + private readonly string gestureDatabase = @"Database\HandsAboveHead.gbd"; + + //important lab 13 + /// Name of the discrete gesture in the database that we want to track + private readonly string handsAboveHeadGestureName = "HandsAboveHead"; + + /// Gesture frame source which should be tied to a body tracking ID + private VisualGestureBuilderFrameSource vgbFrameSource = null; + + /// Gesture frame reader which will handle gesture events coming from the sensor + private VisualGestureBuilderFrameReader vgbFrameReader = null; + + /// + /// Initializes a new instance of the GestureDetector class along with the gesture frame source and reader + /// + /// Active sensor to initialize the VisualGestureBuilderFrameSource object with + /// GestureResultView object to store gesture results of a single body to + public GestureDetector(KinectSensor kinectSensor, GestureResultView gestureResultView) + { + if (kinectSensor == null) + { + throw new ArgumentNullException("kinectSensor"); + } + + if (gestureResultView == null) + { + throw new ArgumentNullException("gestureResultView"); + } + + this.GestureResultView = gestureResultView; + + // create the vgb source. The associated body tracking ID will be set when a valid body frame arrives from the sensor. + this.vgbFrameSource = new VisualGestureBuilderFrameSource(kinectSensor, 0); + this.vgbFrameSource.TrackingIdLost += this.Source_TrackingIdLost; + + // open the reader for the vgb frames + this.vgbFrameReader = this.vgbFrameSource.OpenReader(); + if (this.vgbFrameReader != null) + { + this.vgbFrameReader.IsPaused = true; + this.vgbFrameReader.FrameArrived += this.Reader_GestureFrameArrived; + } + + // load the 'Seated' gesture from the gesture database + using (VisualGestureBuilderDatabase database = new VisualGestureBuilderDatabase(this.gestureDatabase)) + { + // we could load all available gestures in the database with a call to vgbFrameSource.AddGestures(database.AvailableGestures), + // but for this program, we only want to track one discrete gesture from the database, so we'll load it by name + //foreach (Gesture gesture in database.AvailableGestures) + //{ + // if (gesture.Name.Equals(this.seatedGestureName)) + // { + // this.vgbFrameSource.AddGesture(gesture); + // } + //} + + // we could load all available gestures in the database with a call to vgbFrameSource.AddGestures(database.AvailableGestures), + // but for this program, we only want to track one discrete gesture from the database, so we'll load it by name + foreach (Gesture gesture in database.AvailableGestures) + { + if (gesture.Name.Equals(this.handsAboveHeadGestureName)) + { + this.vgbFrameSource.AddGesture(gesture); + } + } + } + } + + /// Gets the GestureResultView object which stores the detector results for display in the UI + public GestureResultView GestureResultView { get; private set; } + + /// + /// Gets or sets the body tracking ID associated with the current detector + /// The tracking ID can change whenever a body comes in/out of scope + /// + public ulong TrackingId + { + get + { + return this.vgbFrameSource.TrackingId; + } + + set + { + if (this.vgbFrameSource.TrackingId != value) + { + this.vgbFrameSource.TrackingId = value; + } + } + } + + /// + /// Gets or sets a value indicating whether or not the detector is currently paused + /// If the body tracking ID associated with the detector is not valid, then the detector should be paused + /// + public bool IsPaused + { + get + { + return this.vgbFrameReader.IsPaused; + } + + set + { + if (this.vgbFrameReader.IsPaused != value) + { + this.vgbFrameReader.IsPaused = value; + } + } + } + + public bool GestureRecognized + { + get + { + return this.GestureRecognized; + } + + set + { + if (this.GestureRecognized != value) + { + this.GestureRecognized = value; + } + } + } + + /// + /// Disposes all unmanaged resources for the class + /// + public void Dispose() + { + this.Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Disposes the VisualGestureBuilderFrameSource and VisualGestureBuilderFrameReader objects + /// + /// True if Dispose was called directly, false if the GC handles the disposing + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (this.vgbFrameReader != null) + { + this.vgbFrameReader.FrameArrived -= this.Reader_GestureFrameArrived; + this.vgbFrameReader.Dispose(); + this.vgbFrameReader = null; + } + + if (this.vgbFrameSource != null) + { + this.vgbFrameSource.TrackingIdLost -= this.Source_TrackingIdLost; + this.vgbFrameSource.Dispose(); + this.vgbFrameSource = null; + } + } + } + + /// + /// Handles gesture detection results arriving from the sensor for the associated body tracking Id + /// + /// object sending the event + /// event arguments + private void Reader_GestureFrameArrived(object sender, VisualGestureBuilderFrameArrivedEventArgs e) + { + VisualGestureBuilderFrameReference frameReference = e.FrameReference; + using (VisualGestureBuilderFrame frame = frameReference.AcquireFrame()) + { + if (frame != null) + { + // get the discrete gesture results which arrived with the latest frame + IReadOnlyDictionary discreteResults = frame.DiscreteGestureResults; + + if (discreteResults != null) + { + // we only have one gesture in this source object, but you can get multiple gestures + foreach (Gesture gesture in this.vgbFrameSource.Gestures) + { + //if (gesture.Name.Equals(this.seatedGestureName) && gesture.GestureType == GestureType.Discrete) + //{ + // DiscreteGestureResult result = null; + // discreteResults.TryGetValue(gesture, out result); + + // if (result != null) + // { + // // update the GestureResultView object with new gesture result values + // this.GestureResultView.UpdateGestureResult(true, result.Detected, result.Confidence); + // } + //} + + if (gesture.Name.Equals(this.handsAboveHeadGestureName) && gesture.GestureType == GestureType.Discrete) + { + DiscreteGestureResult result = null; + discreteResults.TryGetValue(gesture, out result); + + if (result != null) + { + // update the GestureResultView object with new gesture result values + this.GestureResultView.UpdateGestureResult(true, result.Detected, result.Confidence); + } + } + } + } + } + } + } + + /// + /// Handles the TrackingIdLost event for the VisualGestureBuilderSource object + /// + /// object sending the event + /// event arguments + private void Source_TrackingIdLost(object sender, TrackingIdLostEventArgs e) + { + // update the GestureResultView object to show the 'Not Tracked' image in the UI + this.GestureResultView.UpdateGestureResult(false, false, 0.0f); + } + } +} diff --git a/Kinect2Sample/GestureResultView.cs b/Kinect2Sample/GestureResultView.cs new file mode 100644 index 0000000..c44407a --- /dev/null +++ b/Kinect2Sample/GestureResultView.cs @@ -0,0 +1,181 @@ +//------------------------------------------------------------------------------ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +//------------------------------------------------------------------------------ + +namespace Kinect2Sample +{ + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.Runtime.CompilerServices; + using Windows.Graphics.Display; + using Windows.Graphics.Imaging; + using Windows.Storage; + using Windows.Storage.Pickers; + using Windows.UI.Xaml; + using Windows.UI.Xaml.Media; + using Windows.UI.Xaml.Media.Imaging; + + /// + /// Stores discrete gesture results for the GestureDetector. + /// Properties are stored/updated for display in the UI. + /// + public sealed class GestureResultView : INotifyPropertyChanged + { + /// The body index (0-5) associated with the current gesture detector + private int bodyIndex = 0; + + /// Current confidence value reported by the discrete gesture + private float confidence = 0.0f; + + /// True, if the discrete gesture is currently being detected + private bool detected = false; + + /// True, if the body is currently being tracked + private bool isTracked = false; + + /// + /// Initializes a new instance of the GestureResultView class and sets initial property values + /// + /// Body Index associated with the current gesture detector + /// True, if the body is currently tracked + /// True, if the gesture is currently detected for the associated body + /// Confidence value for detection of the 'Seated' gesture + public GestureResultView(int bodyIndex, bool isTracked, bool detected, float confidence) + { + this.BodyIndex = bodyIndex; + this.IsTracked = isTracked; + this.Detected = detected; + this.Confidence = confidence; + } + + /// + /// INotifyPropertyChangedPropertyChanged event to allow window controls to bind to changeable data + /// + public event PropertyChangedEventHandler PropertyChanged; + + /// + /// Gets the body index associated with the current gesture detector result + /// + public int BodyIndex + { + get + { + return this.bodyIndex; + } + + private set + { + if (this.bodyIndex != value) + { + this.bodyIndex = value; + this.NotifyPropertyChanged(); + } + } + } + + /// + /// Gets a value indicating whether or not the body associated with the gesture detector is currently being tracked + /// + public bool IsTracked + { + get + { + return this.isTracked; + } + + private set + { + if (this.IsTracked != value) + { + this.isTracked = value; + this.NotifyPropertyChanged(); + } + } + } + + /// + /// Gets a value indicating whether or not the discrete gesture has been detected + /// + public bool Detected + { + get + { + return this.detected; + } + + private set + { + if (this.detected != value) + { + this.detected = value; + this.NotifyPropertyChanged(); + } + } + } + + /// + /// Gets a float value which indicates the detector's confidence that the gesture is occurring for the associated body + /// + public float Confidence + { + get + { + return this.confidence; + } + + private set + { + if (this.confidence != value) + { + this.confidence = value; + this.NotifyPropertyChanged(); + } + } + } + + /// + /// Updates the values associated with the discrete gesture detection result + /// + /// True, if the body associated with the GestureResultView object is still being tracked + /// True, if the discrete gesture is currently detected for the associated body + /// Confidence value for detection of the discrete gesture + public void UpdateGestureResult(bool isBodyTrackingIdValid, bool isGestureDetected, float detectionConfidence) + { + this.IsTracked = isBodyTrackingIdValid; + this.Confidence = 0.0f; + + if (!this.IsTracked) + { + this.Detected = false; + } + else + { + this.Detected = isGestureDetected; + + if (this.Detected) + { + this.Confidence = detectionConfidence; + } + else + { + + } + } + } + + /// + /// Notifies UI that a property has changed + /// + /// Name of property that has changed + private void NotifyPropertyChanged([CallerMemberName] string propertyName = "") + { + if (this.PropertyChanged != null) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } +} diff --git a/Kinect2Sample/Kinect2Sample.csproj b/Kinect2Sample/Kinect2Sample.csproj index 913ba8e..282f2e5 100644 --- a/Kinect2Sample/Kinect2Sample.csproj +++ b/Kinect2Sample/Kinect2Sample.csproj @@ -47,6 +47,8 @@ + + MainPage.xaml @@ -88,6 +90,9 @@ Microsoft.Kinect.Toolkit.Input + + Microsoft.Kinect.VisualGestureBuilder + Microsoft.Kinect.Xaml.Controls @@ -99,6 +104,9 @@ + + Always + diff --git a/Kinect2Sample/MainPage.xaml b/Kinect2Sample/MainPage.xaml index 3379e32..a1b7adf 100644 --- a/Kinect2Sample/MainPage.xaml +++ b/Kinect2Sample/MainPage.xaml @@ -99,17 +99,28 @@ + + +