Example #1
0
        void Start()
        {
            _detector = new EyeLandmarkDetector(_resources);
            _material = new Material(_shader);
            _markers  = Enumerable.Range(0, 5)
                        .Select(x => Instantiate(_markerPrefab, _previewUI.transform))
                        .ToArray();

            if (_image != null)
            {
                RunDetector(_image);
            }
        }
Example #2
0
 UpperEyelidVertexArray(this EyeLandmarkDetector detector)
 => detector.VertexArray.Skip(13).Take(7);
Example #3
0
 LowerEyelidVertexArray(this EyeLandmarkDetector detector)
 => detector.VertexArray.Skip(5).Take(8);
Example #4
0
 IrisVertexArray(this EyeLandmarkDetector detector)
 => detector.VertexArray.Take(5);
Example #5
0
 public static Vector2 GetEyelidUpper(this EyeLandmarkDetector detector)
 => (detector.VertexArray.ElementAt(17) +
     detector.VertexArray.ElementAt(18)) * 0.5f;
Example #6
0
 public static Vector2 GetEyelidLower(this EyeLandmarkDetector detector)
 => (detector.VertexArray.ElementAt(8) +
     detector.VertexArray.ElementAt(9)) * 0.5f;
Example #7
0
 public static Vector2 GetEyelidRight(this EyeLandmarkDetector detector)
 => detector.VertexArray.ElementAt(13);
Example #8
0
 public static Vector2 GetIrisCenter(this EyeLandmarkDetector detector)
 => detector.VertexArray.ElementAt(0);