public void UpdateGesture() { //Aが押されたら、playからのrecordingデータを読み込む。 //選択した文字の認識情報データをLeapMotionのFrameの再生と追跡をするメソッドLeapRecorderでローディング.frames_に格納される。 player.Load(gesture.recording); //そのファイルのフレームの数を表示。 Debug.Log("読み込んでいるdataのFrameCount:" + player.GetFramesCount()); //そのファイルをFrame型にデシリアライズされたリスト型が入る。frames var newFrames = player.GetFrames(); //読み込んだデータの //newFrames.RemoveRange(player.GetFramesCount() - 200, 199); //plyaerに保存されていたフレームは削除。 player.Resets(); //Recordingデータを再び、frames_に戻す。 foreach (var f in newFrames) { player.AddFrame(f); } }
public void UpdateGesture() { player.Load(gesture.recording); Debug.Log(player.GetFramesCount()); var newFrames = player.GetFrames(); newFrames.RemoveRange(player.GetFramesCount() - 200, 199); player.Reset(); foreach (var f in newFrames) { player.AddFrame(f); } }
// Use this for initialization void Start() { loader = new LeapRecorder(); loader.Load(recorderFilePath); /*var original = ; * var clean = CleanFrames(original); * Debug.Log("Original: " + original.Count + " Cleaned: " + clean.Count);*/ trainer.loadFromFrames(recorderFilePath, loader.GetFrames(), false); }