Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
 UpperEyelidVertexArray(this EyeLandmarkDetector detector)
 => detector.VertexArray.Skip(13).Take(7);
Exemplo n.º 3
0
 LowerEyelidVertexArray(this EyeLandmarkDetector detector)
 => detector.VertexArray.Skip(5).Take(8);
Exemplo n.º 4
0
 IrisVertexArray(this EyeLandmarkDetector detector)
 => detector.VertexArray.Take(5);
Exemplo n.º 5
0
 public static Vector2 GetEyelidUpper(this EyeLandmarkDetector detector)
 => (detector.VertexArray.ElementAt(17) +
     detector.VertexArray.ElementAt(18)) * 0.5f;
Exemplo n.º 6
0
 public static Vector2 GetEyelidLower(this EyeLandmarkDetector detector)
 => (detector.VertexArray.ElementAt(8) +
     detector.VertexArray.ElementAt(9)) * 0.5f;
Exemplo n.º 7
0
 public static Vector2 GetEyelidRight(this EyeLandmarkDetector detector)
 => detector.VertexArray.ElementAt(13);
Exemplo n.º 8
0
 public static Vector2 GetIrisCenter(this EyeLandmarkDetector detector)
 => detector.VertexArray.ElementAt(0);