Exemple #1
0
        public List <Point> MapPupilPositionToGazePosition(List <Point> pupilPositions)
        {
            if (xInterpolator == null)                  // not yet initialized
            {
                throw new InvalidOperationException();
            }

            List <Point> gazePositions = new List <Point>();

            for (int i = 0; i < pupilPositions.Count; i++)
            {
                gazePositions.Add(new Point(xInterpolator.Evaluate(pupilPositions[i].X, pupilPositions[i].Y),
                                            yInterpolator.Evaluate(pupilPositions[i].X, pupilPositions[i].Y)));
            }
            return(gazePositions);
        }
Exemple #2
0
 public Point Evaluate(double x, double y)
 {
     return(new Point(xInterpolator.Evaluate(x, y),
                      yInterpolator.Evaluate(x, y)));
 }