Exemplo n.º 1
0
 void Start()
 {
     _canny1Bar.onValueChanged.AddListener(Canny1Changed);
     _canny2Bar.onValueChanged.AddListener(Canny2Changed);
     _threshold1Bar.onValueChanged.AddListener(Threshold1Changed);
     _threshold2Bar.onValueChanged.AddListener(Threshold2Changed);
     m_canShow = false;
     core      = CoreWrapper.GetInstance();
     core.InitCore();
     core.OpenVideoStream(0);
     core.GetCameraFrame();
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        core     = CoreWrapper.GetInstance();
        cameraOk = core.OpenVideoStream(0);

        if (!cameraOk)
        {
            showPopUp = true;
            return;
        }

        this.frame   = core.GetCameraFrame();
        this.texture = new Texture2D(core.GetFrameWidth(), core.GetFrameHeight(), TextureFormat.BGRA32, false);
        this.transform.localScale = new Vector3(core.GetFrameWidth(), core.GetFrameHeight(), 1);

        //  Camera.main.transform.position = this.transform.position;
        //  Camera.main.transform.Translate(Vector3.back);
        Camera.main.orthographicSize = core.GetFrameHeight() / 2f + 2;
        m_FinishedBuild = false;
    }