// 进入AR阶段 void InitializeGroundPlane(string item) { API2Start(item); treeTransform = groundPlaneStage.GetComponentsInChildren <Transform>()[1]; TrackingFlag = 3; groundPlaneFinder.SetActive(true); // 初始化groundPlaneFinder trackers.Dispose(); // 销毁cubeButton for (int c = 0; c < items.Length; c++) { Destroy(cubeButton[c]); } }
TrackerMOSSE Tracker; //追踪算法 /// <summary> /// 更新跟踪目标 /// </summary> public void updateTracker() { while (cal) { ; //等 } tgt = bbox; //设置跟踪框 if (Tracker != null) { Tracker.Dispose(); //毙了之前的进程 } GC.Collect(); //资源回收 Tracker = TrackerMOSSE.Create(); //设置新的跟踪进程 Tracker.Init(src, tgt); //初始化 }