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

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