static void Main(string[] args) { GlobalConstant.initializeConstants("init.txt"); onlineDetector = OnlineDetector.getInstance(); gesturesDetector = GesturesDetector.getInstance(); Actions actions = Actions.getInstance(); actions.initializeMSRDatasetActionsArray(); connectWithUnity = true; asyncClientSocket = new AsynchronousClient(); if (connectWithUnity) { Console.WriteLine("Connecting with Unity."); while (!asyncClientSocket.canOpenSocketAndConnect()) { ; } initializeGameState(); Console.WriteLine("Connection Opened With Unity."); } if (FROM_FILE) { Console.WriteLine("\nWorking from file. Pls w8, This will take a bit to run."); setJointsIdsMap(); loadFromFile(); } else { connectKinect(); Console.WriteLine("Kinect Connected!"); Console.ReadLine(); closeKinectConnections(); } Console.WriteLine("\nProgram Fininshed, Press any key to exit."); Console.ReadLine(); }
public void initializeMSRDatasetActionsArray() { GesturesDetector gestureDetector = GesturesDetector.getInstance(); actionsMap = new Dictionary <int, String>(); actionsMap.Add(0, "High Arm Wave"); actionsMap.Add(1, "Horizontal Arm Wave"); actionsMap.Add(2, "Hammer"); actionsMap.Add(3, "Hand Catch"); actionsMap.Add(4, "Forward Punch"); actionsMap.Add(5, "High Throw"); actionsMap.Add(6, "Draw X"); actionsMap.Add(7, "Draw Tick"); actionsMap.Add(8, "Draw Circle"); actionsMap.Add(9, "Hand Clap"); actionsMap.Add(10, "Two Hand Wave"); actionsMap.Add(11, "Side - Boxing"); actionsMap.Add(12, "Bend"); actionsMap.Add(13, "Forward Kick"); actionsMap.Add(14, "Side Kick"); actionsMap.Add(15, "Jogging"); actionsMap.Add(16, "Tennis Swing"); actionsMap.Add(17, "Tennis Serve"); actionsMap.Add(18, "Golf Swing"); actionsMap.Add(19, "Pickup & Throw"); actionsMap.Add(gestureDetector.FRONT_GESTURE_ID, "Front Gesture"); actionsMap.Add(gestureDetector.BACK_GESTURE_ID, "Back Gesture"); actionsMap.Add(gestureDetector.RIGHT_GESTURE_ID, "Right Gesture"); actionsMap.Add(gestureDetector.LEFT_GESTURE_ID, "Left Gesture"); actionsMap.Add(gestureDetector.FRONT_RIGHT_GESTURE_ID, "Front Right Gesture"); actionsMap.Add(gestureDetector.FRONT_LEFT_GESTURE_ID, "Front Left Gesture"); actionsMap.Add(gestureDetector.BACK_RIGHT_GESTURE_ID, "Back Right Gesture"); actionsMap.Add(gestureDetector.BACK_LEFT_GESTURE_ID, "Back Left Gesture"); actionsMap.Add(gestureDetector.IDLE_ID, "Idle"); actionsMap.Add(gestureDetector.IDLE_Defending_ID, "Defending"); }