void OnApplicationQuit() { if (OpenCV_ready == true) { OpenCV_Dll.Close(); } }
private void OnDestroy() { if (OpenCV_ready == true) { OpenCV_Dll.Close(); } }
void Update() { //Debug.Log("Before: code = " + code + " - x = " + x + " - y = " + y); if (useOperate) { OpenCV_Dll.Operate(ref code, ref mode); } //Debug.Log("After: code = " + code + " - x = " + x + " - y = " + y); SendPushNotification(code); }
void Start() { int result = OpenCV_Dll.Init(ref width, ref height); if (result == -1) { Debug.Log("Failed to open camera stream."); } else if (result == -2) { Debug.Log("Could not find CascadeClassifier."); } else { OpenCV_ready = true; Debug.Log("width: " + width + " - height: " + height); } subscribers = new List <IVideoSubscriber>(); }