void Update()
 {
     if (_webCamTexture.isPlaying && _webCamTexture.didUpdateThisFrame)
     {
         openCVImage.TextureToMat(_webCamTexture.GetPixels32());
     }
 }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     if (CameraDevice.Instance.IsActive())
     {
         if (CameraDevice.Instance.SetFrameFormat(Image.PIXEL_FORMAT.RGBA8888, true))
         {
             CameraDevice.Instance.GetCameraImage(Image.PIXEL_FORMAT.RGBA8888).CopyToTexture(webCamImage);
             openCVImage.TextureToMat(webCamImage.GetPixels32());
         }
     }
 }
Пример #3
0
	void Update() {
		try
        {
            vuforiaCamera.targetTexture = renderTexture;
            vuforiaCamera.Render ();

            RenderTexture.active = renderTexture;

            screenShot.ReadPixels (screenShotRect, 0, 0);
            screenShot.Apply();

            openCVImage.TextureToMat(screenShot.GetPixels32());
        } finally
        {
            vuforiaCamera.targetTexture = null;
		}
	}