diff --git a/KinectSensorStreams.sln b/KinectSensorStreams.sln index ca21d97..ff8c597 100644 --- a/KinectSensorStreams.sln +++ b/KinectSensorStreams.sln @@ -7,6 +7,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KinectSensorStreams", "Kine EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KinectConnection", "KinectConnection\KinectConnection.csproj", "{E527438A-DFA2-4EC6-9891-D4956152B093}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KinectUtils", "KinectUtils\KinectUtils.csproj", "{2BC300E4-D3C1-4E17-A011-380EDB793182}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyGestureBank", "MyGestureBank\MyGestureBank.csproj", "{D70B7357-6FF8-4F35-A283-8DB4217C0C85}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +25,14 @@ Global {E527438A-DFA2-4EC6-9891-D4956152B093}.Debug|Any CPU.Build.0 = Debug|Any CPU {E527438A-DFA2-4EC6-9891-D4956152B093}.Release|Any CPU.ActiveCfg = Release|Any CPU {E527438A-DFA2-4EC6-9891-D4956152B093}.Release|Any CPU.Build.0 = Release|Any CPU + {2BC300E4-D3C1-4E17-A011-380EDB793182}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2BC300E4-D3C1-4E17-A011-380EDB793182}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2BC300E4-D3C1-4E17-A011-380EDB793182}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2BC300E4-D3C1-4E17-A011-380EDB793182}.Release|Any CPU.Build.0 = Release|Any CPU + {D70B7357-6FF8-4F35-A283-8DB4217C0C85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D70B7357-6FF8-4F35-A283-8DB4217C0C85}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D70B7357-6FF8-4F35-A283-8DB4217C0C85}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D70B7357-6FF8-4F35-A283-8DB4217C0C85}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/KinectUtils/BaseGesture.cs b/KinectUtils/BaseGesture.cs new file mode 100644 index 0000000..c97d0c1 --- /dev/null +++ b/KinectUtils/BaseGesture.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Kinect; + +namespace KinectUtils +{ + public abstract class BaseGesture + { + public BaseGesture() { } + + public string GestureName { get; set; } + + // + public EventHandler GestureRecognized { get; set; } + + public abstract void TestGesture(Body body); + + protected void OnGestureRecognized() { } + } +} diff --git a/KinectUtils/GestureManager.cs b/KinectUtils/GestureManager.cs new file mode 100644 index 0000000..0ec7c72 --- /dev/null +++ b/KinectUtils/GestureManager.cs @@ -0,0 +1,41 @@ +using KinectConnection; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KinectUtils +{ + // static ? + public class GestureManager + { + // Properties + public static KinectManager KinectManager { get; set; } = new KinectManager(); + + public static IEnumerable KnownGestures { get; private set; } = new List(); + + // + public static EventHandler GestureRecognized { get; set; } + + public static IGestureFactory Factory { get; set; } + + // Methods + public static void AddGestures(IGestureFactory factory) + { + throw new NotImplementedException(); + } + + public static void AddGestures(BaseGesture[] baseGestures) // params ??? + { + throw new NotImplementedException(); + } + + public static void RemoveGesture(BaseGesture baseGesture) { throw new NotImplementedException(); } + + public static void StartAcquiringFrames(KinectManager manager) { throw new NotImplementedException(); } + + public static void StopAcquiringFrame(KinectManager manager) { throw new NotImplementedException(); } + + } +} diff --git a/KinectUtils/IGestureFactory.cs b/KinectUtils/IGestureFactory.cs new file mode 100644 index 0000000..72844d9 --- /dev/null +++ b/KinectUtils/IGestureFactory.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; + +namespace KinectUtils +{ + public interface IGestureFactory + { + IEnumerable CreateGestures(); + } +} \ No newline at end of file diff --git a/KinectUtils/KinectUtils.csproj b/KinectUtils/KinectUtils.csproj new file mode 100644 index 0000000..fae58af --- /dev/null +++ b/KinectUtils/KinectUtils.csproj @@ -0,0 +1,64 @@ + + + + + Debug + AnyCPU + {2BC300E4-D3C1-4E17-A011-380EDB793182} + Library + Properties + KinectUtils + KinectUtils + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Microsoft.Kinect.2.0.1410.19000\lib\net45\Microsoft.Kinect.dll + + + + + + + + + + + + + + + + + + + + {e527438a-dfa2-4ec6-9891-d4956152b093} + KinectConnection + + + + + + + + \ No newline at end of file diff --git a/KinectUtils/Posture.cs b/KinectUtils/Posture.cs new file mode 100644 index 0000000..5d86ede --- /dev/null +++ b/KinectUtils/Posture.cs @@ -0,0 +1,14 @@ +using Microsoft.Kinect; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KinectUtils +{ + public abstract class Posture : BaseGesture + { + protected abstract bool TestPosture(Body body); + } +} diff --git a/KinectUtils/Properties/AssemblyInfo.cs b/KinectUtils/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..773b8a6 --- /dev/null +++ b/KinectUtils/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("KinectUtils")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("workgroup")] +[assembly: AssemblyProduct("KinectUtils")] +[assembly: AssemblyCopyright("Copyright © workgroup 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("2bc300e4-d3c1-4e17-a011-380edb793182")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/KinectUtils/app.config b/KinectUtils/app.config new file mode 100644 index 0000000..688b079 --- /dev/null +++ b/KinectUtils/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/KinectUtils/packages.config b/KinectUtils/packages.config new file mode 100644 index 0000000..f7f19c3 --- /dev/null +++ b/KinectUtils/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/MyGestureBank/MyGestureBank.csproj b/MyGestureBank/MyGestureBank.csproj new file mode 100644 index 0000000..fe715e5 --- /dev/null +++ b/MyGestureBank/MyGestureBank.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + {D70B7357-6FF8-4F35-A283-8DB4217C0C85} + Library + Properties + MyGestureBank + MyGestureBank + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Microsoft.Kinect.2.0.1410.19000\lib\net45\Microsoft.Kinect.dll + + + + + + + + + + + + + + + + + {2bc300e4-d3c1-4e17-a011-380edb793182} + KinectUtils + + + + + + + + \ No newline at end of file diff --git a/MyGestureBank/PostureHandUpRight.cs b/MyGestureBank/PostureHandUpRight.cs new file mode 100644 index 0000000..bb43f57 --- /dev/null +++ b/MyGestureBank/PostureHandUpRight.cs @@ -0,0 +1,23 @@ +using KinectUtils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Kinect; + +namespace MyGestureBank +{ + public class PostureHandUpRight : Posture + { + public override void TestGesture(Body body) + { + throw new NotImplementedException(); + } + + protected override bool TestPosture(Body body) + { + throw new NotImplementedException(); + } + } +} diff --git a/MyGestureBank/Properties/AssemblyInfo.cs b/MyGestureBank/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ef740a8 --- /dev/null +++ b/MyGestureBank/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("MyGestureBank")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("workgroup")] +[assembly: AssemblyProduct("MyGestureBank")] +[assembly: AssemblyCopyright("Copyright © workgroup 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("d70b7357-6ff8-4f35-a283-8db4217c0c85")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MyGestureBank/app.config b/MyGestureBank/app.config new file mode 100644 index 0000000..688b079 --- /dev/null +++ b/MyGestureBank/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MyGestureBank/packages.config b/MyGestureBank/packages.config new file mode 100644 index 0000000..f7f19c3 --- /dev/null +++ b/MyGestureBank/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file