private void Update() { if (OVRInput.GetDown(OVRInput.Button.One)) { rec.BeginRecording(); } else if (OVRInput.GetUp(OVRInput.Button.One)) { rec.EndRecording(); rec.CheckRecognized(); } }
void CheckSet(int numValues, int valuesUsed, string name) { MarlonsLegitLogger.Instance.FileName = name; MarlonsLegitLogger.Instance.CreateStream(); List <Gesture> tempGestures = new List <Gesture>(); for (int i = 8; i < 12; i++) { float globalCorrect = 0; float globalWrong = 0; MarlonsLegitLogger.Instance.SubHeading(i.ToString()); gestureManager.LearnGesture(numValues, i); for (int j = 0; j < gestures.Length; j++) { float correct = 0; float wrong = 0; tempGestures = gestureManager.LoadDatabase(testDatabaseLocations + gestures[j]); for (int k = 0; k < tempGestures.Count; k++) { string str = gestureManager.CheckRecognized(tempGestures[k].points, valuesUsed); //MarlonsLegitLogger.Instance.Log(" [Acctual]: " + gestures[j] + "[Predicted]: " + str); if (gestures[j] == str) { correct++; } else { wrong++; } } MarlonsLegitLogger.Instance.Log("[Correct]: " + correct + "[Wrong]: " + wrong + "[Accuracy]: " + (correct / (correct + wrong))); globalCorrect += correct; globalWrong += wrong; } MarlonsLegitLogger.Instance.Log("[Total Correct]: " + globalCorrect + "[Total Wrong]: " + globalWrong + "[Accuracy]: " + (globalCorrect / (globalCorrect + globalWrong))); } }