Created
April 19, 2022 21:26
-
-
Save smartium/8007c5fcae92d8e54fe8ce9f0152185f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WebCamTexture webCamTexture; | |
| WebCamDevice[] devices; | |
| // List devices | |
| devices = WebCamTexture.devices; | |
| for (int i = 0; i < devices.Length; i++) | |
| Debug.Log(devices[i].name); | |
| // Configure WebCam | |
| webCamTexture = new WebCamTexture(1280, 720, 30); | |
| // Set device | |
| webCamTexture.deviceName = devices[1].name; | |
| // Start webcam | |
| webCamTexture.Play(); | |
| // Create and display the destination segmentation image | |
| while (webCamTexture.width == 16 || webCamTexture.height == 16) | |
| await Task.Yield(); | |
| // Display webcam | |
| visualizer.Render(webCamTexture); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment