IEnumerator Start() { Input.backButtonLeavesApp = true; Screen.sleepTimeout = SleepTimeout.NeverSleep; _detector = GetComponent <FaceDetector>(); _apiManager = GetComponent <FaceApiManager>(); _toMatHelperMgr = GetComponent <WebCamTextureToMatHelperManager>(); _toMatHelper = GetComponent <WebCamTextureToMatHelper>(); //カメラ等の初期化完了後,画像サイズを取得する _toMatHelper.Initialize(); yield return(WaitInitialization()); var imgSize = new Size(_toMatHelper.GetWidth(), _toMatHelper.GetHeight()); _zeroMat = new ZeroMat(imgSize); _volume.profile.TryGetSettings(out _distortion); }
void Start() { _apiManager = GetComponent <FaceApiManager>(); _cascade.load(getFilePath("haarcascade_frontalface_alt.xml")); // _cascade.load(getFilePath("lbpcascade_frontalface.xml")); }