IEnumerator PredictionCourutine() { while (true) { yield return(new WaitForSeconds(3f)); Vector3 accel = Input.acceleration; int label = TiltClassifierAPI.PredictTilt(Application.dataPath + "/SVMModel.txt", accel.x, accel.y, accel.z); Debug.Log("Predicted label: " + label); } }
void Start() { //StartCoroutine(RecordSamplesCourutine()); Debug.Log("GRT Ver: " + TiltClassifierAPI.GrtVersion()); StartCoroutine(PredictionCourutine()); }