コード例 #1
0
 void OnApplicationQuit()
 {
     if (OpenCV_ready == true)
     {
         OpenCV_Dll.Close();
     }
 }
コード例 #2
0
 private void OnDestroy()
 {
     if (OpenCV_ready == true)
     {
         OpenCV_Dll.Close();
     }
 }
コード例 #3
0
    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);
    }
コード例 #4
0
    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>();
    }