private void Initialize() { #if UNITY_ANDROID && !UNITY_EDITOR // Set the requestedFPS parameter to avoid the problem of the WebCamTexture image becoming low light on some Android devices. (Pixel, pixel 2) // https://forum.unity.com/threads/android-webcamtexture-in-low-light-only-some-models.520656/ // https://forum.unity.com/threads/released-opencv-for-unity.277080/page-33#post-3445178 rearCameraRequestedFPS = webCamTextureToMatHelper.requestedFPS; if (webCamTextureToMatHelper.requestedIsFrontFacing) { webCamTextureToMatHelper.requestedFPS = 15; webCamTextureToMatHelper.Initialize(); } else { webCamTextureToMatHelper.Initialize(); } #else webCamTextureToMatHelper.Initialize(); #endif }