[Home](./README.md) | [Exercise 1 - Kinect Streams](./exo1_subject.md) | [Exercise 2 - Introduction](./exo2_subject.md) | **Exercise 2 part 1 - Postures** | [Exercise 2 part 2 - Gestures](./exo2_2_subject.md) | [Exercise 2 part 3 - Mapping](./exo2_3_subject.md) | [Exercise 3 - Free App](./exo3_subject.md) # Exercise 2: Gesture Recognition part1 (Postures) # Prerequisites - the ```KinectManager``` from exercise 1 - inheritance in C# and abstract classes and methods - polymorphism - static methods and classes - event in C# and Event Standard Pattern # Resources - πŸ”œ event and Event Standard Pattern - πŸ”œ inheritance in C# # Requested Work As indicating in the introduction, the goal is to prepare the base classes of the gesture recognition system, and to develop and test postures. ```mermaid classDiagram class BaseGesture { +TestGesture(Body body)* +GestureRecognized : EventHandler~GestureRecognizedEventArgs~ #OnGestureRecognized() +GestureName : string } class Posture { +TestGesture(Body body)* #TestPosture(Body body)* bool } class GestureManager { <> +EventHandler~GestureRecognizedEventArgs~ GestureRecognized$ +AddGestures(IGestureFactory: factory)$ +AddGestures(params BaseGesture[])$ +RemoveGesture(BaseGesture)$ +StartAcquiringFrames(KinectManager)$ +StopAcquiringFrame()$ } BaseGesture <|-- Posture Posture <|-- PostureRightHandUp Posture <|-- PostureTwoHandsDragon BaseGesture "*" <-- GestureManager : +KnownGestures GestureManager --> "1" KinectManager : KinectManager ``` # Steps to reproduce This part is given as a set of advises to realize your application. I use some symbols in it: symbol | signification --- | --- πŸ’‘ | be smart: this can obviously be done before practical works and without the kinect sensor! 🎬 | evaluated at the end of all the practical works 🚨 | mandatory if you want at least 10/20 🟒 | difficulty: low 🟑 | difficulty: medium πŸ”΄ | difficulty: high πŸ”– | quality (it's always better when it's beautiful πŸ₯Ή) > Note about difficulty: > It's obviously completely subjective... ## πŸš¨πŸŸ’πŸ”– KinectUtils class library - Create a .NET Framework class library - Add your KinectManager - Create all the base classes (```BaseGesture``` and ```Posture```) ## πŸš¨πŸŸ‘πŸ”– MyGesturesBank class library - Create a .NET Framework class library - Add 2 concrete postures to it > Suggestions: > Hand up, Hand on the head, Join hands, hands on hips... - Test your postures in a Console App (.NET Framework) ## πŸš¨πŸŸ‘πŸ”– GestureManager - add the ```GestureManager``` class to your KinectUtils class library - manage the collection of gestures - manage the acquisition of frames - manage the ```GestureRecognized``` event so that the user subscribe only once to an event (this one) in order to be subscribed to all events of ```GestureManager``` gestures - (not mandatory) find a way (or make your teacher talk) to allow automatic subscriptions to all gestures event, without event bouncing. In other words, ```GestureManager``` should not be subscribed to all gestures event, and re-fire an event if one occurs. - (not mandatory) find a way (or...) to allow late subscriptions to gestures event. In other words, if the user has already subscribed to ```GestureRecognized``` of ```GestureManager```, if she adds a new gesture to the collection, she should be also subscribed without having to reset the subscription. - Test your ```GestureManager``` in a Console App ## πŸŸ‘πŸ”– Posture specific events As your posture is tested at every frame, it should send the event everytime it is recognized, so a dozen of times if you keep the pose. Modify your ```Posture``` class so that it sends to more events: - PostureRecognized if it is recognized although it wasn't at the previous frame - PostureUnrecognized if it is not recognized although it was at the previous frame - Test it in a Console App # Evaluation criteria To earned points, remember that you must validate your knowledge with your teacher, during the practical work. **Signification** symbol | signification --- | --- ☒️ | if not respected => 0/20 🎬 | evaluated at the end of all the practical works 🚨 | mandatory 🟒 | difficulty: low 🟑 | difficulty: medium πŸ”΄ | difficulty: high πŸ”– | quality **Criteria** @ | category | description | coeff --- | --- | --- | --- ☒️ | | the repositories must be accessible by the teacher | ☒️ ☒️ | | a .gitignore file must be use at the creation of the repository or at the first push | ☒️ 🎬 | | all *class libraries* and *applications* build | 4 🎬 | | *applications* run without any bug | 4 πŸš¨πŸŸ’πŸ”– | KinectUtils class library | with KinectManager | 1 πŸš¨πŸŸ’πŸ”– | KinectUtils class library | BaseGesture with event | 4 πŸš¨πŸŸ’πŸ”– | KinectUtils class library | Posture | 1 🚨🟒 | KinectUtils class library | Posture.TestPosture | 1 πŸš¨πŸŸ‘πŸ”– | MyGesturesBank class library | 1st posture | 6 🟑 | MyGesturesBank class library | 2nd posture | 2 🚨🟑 | Test | Console test | 4 πŸš¨πŸŸ’πŸ”– | GestureManager | collection of gestures | 1 πŸš¨πŸŸ‘πŸ”– | GestureManager | acquiring frames | 6 🚨🟑 | GestureManager | event (dirty but working) | 6 πŸ”΄πŸ”– | GestureManager | event automatic subscriptions to collection of gestures | 6 πŸ”΄πŸ”– | GestureManager | event late subscriptions | 6 🚨🟑 | Test | Console test | 4 πŸŸ‘πŸ”– | Posture specific events | PostureRecognized and PostureUnrecognized | 6 πŸŸ‘πŸ”– | Posture specific events | Update GestureManager | 6 🟑 | Test | Console test | 4 🎬🟒 | Documentation | ReadMe, comments, wiki... | 4 > Some samples if you wonder... > - if you do only the 🚨 criteria and your application is building and running, you get => 11,05/20 > - for the Bases of *KinectUtils* class library (```BaseGesture``` and ```Posture```) => 1,84 pt > - for two concrete postures => 2,1 pts > - for ```GestureManager``` => 6,6 pts > - for the management of the two specific events on ```Posture``` and ```GestureManager``` => 3,2 pts > - for all your tests (the three ones) => 3,2 pts > - quality (building, running and documentation) => 3,2 pts > Note : > Coefficients may change and are here only indicative --- [Home](./README.md) | [Exercise 1 - Kinect Streams](./exo1_subject.md) | [Exercise 2 - Introduction](./exo2_subject.md) | **Exercise 2 part 1 - Postures** | [Exercise 2 part 2 - Gestures](./exo2_2_subject.md) | [Exercise 2 part 3 - Mapping](./exo2_3_subject.md) | [Exercise 3 - Free App](./exo3_subject.md) --- Copyright Β© 2023-2024 Marc ChevaldonnΓ© --- While preparing these practical works, I was listening to...

After The Gold Rush

Neil Young (1970)

Monk's Music

Thelonious Monk Septet (1957)

Special Identity

Joanne Brackeen (1982)

Where Have I Known You Before

Return To Forever (1974)

Live

Bozilo (2009)

Look Out!

Stanley Turrentine (1960)

Moanin'

Art Blakey and The Jazz Messengers (1958)