public class GazeUtils extends Object
Constructor and Description |
---|
GazeUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
getDistancePoint2D(Point2D a,
Point2D b)
Calculates distance between two points.
|
static Point2D |
getEyesCenterNormalized(GazeData.Eye leftEye,
GazeData.Eye rightEye)
Find average pupil center of two eyes.
|
static Point2D |
getEyesCenterNormalized(GazeData gazeData) |
static Point2D |
getEyesCenterPixels(GazeData.Eye leftEye,
GazeData.Eye rightEye,
int screenWidth,
int screenHeight)
Find average pupil center of two eyes.
|
static Point2D |
getEyesCenterPixels(GazeData gazeData,
int screenWidth,
int screenHeight)
Find average pupil center of two eyes.
|
static double |
getEyesDistanceNormalized(GazeData.Eye leftEye,
GazeData.Eye rightEye)
Calculates distance between pupil centers based on previously recorded min and max values.
|
static double |
getEyesDistanceNormalized(GazeData gazeData)
Calculates distance between pupil centers based on previously recorded min and max values.
|
static Point2D |
getNormalizedCoords(Point2D point,
int screenWidth,
int screenHeight)
Normalizes a point on screen in screen dims
|
static Point2D |
getNormalizedMapping(Point2D point,
int screenWidth,
int screenHeight)
Maps eye position of gaze coords in pixels within normalized space [x: -1:1 , y: -1:1]
|
static Point2D |
getRelativeToScreenSpace(Point2D point,
int screenWidth,
int screenHeight)
Converts a relative point to screen point in pixels.
|
public static Point2D getEyesCenterNormalized(GazeData.Eye leftEye, GazeData.Eye rightEye)
leftEye
- rightEye
- public static Point2D getEyesCenterPixels(GazeData.Eye leftEye, GazeData.Eye rightEye, int screenWidth, int screenHeight)
leftEye
- rightEye
- screenWidth
- screenHeight
- public static Point2D getEyesCenterPixels(GazeData gazeData, int screenWidth, int screenHeight)
gazeData
- gaze data frame to base calculation uponscreenWidth
- screenHeight
- public static double getEyesDistanceNormalized(GazeData.Eye leftEye, GazeData.Eye rightEye)
leftEye
- rightEye
- public static double getEyesDistanceNormalized(GazeData gazeData)
gazeData
- gaze data frame to base calculation uponpublic static double getDistancePoint2D(Point2D a, Point2D b)
a
- b
- public static Point2D getRelativeToScreenSpace(Point2D point, int screenWidth, int screenHeight)
point
- in relative valuesscreenWidth
- in pixelsscreenHeight
- in pixelspublic static Point2D getNormalizedCoords(Point2D point, int screenWidth, int screenHeight)
point
- in pixelsscreenWidth
- in pixelsscreenHeight
- in pixelspublic static Point2D getNormalizedMapping(Point2D point, int screenWidth, int screenHeight)
point
- in pixelsscreenWidth
- in pixelsscreenHeight
- in pixelsProcessing library EyeTribeProcessing by Jorge C. S. Cardoso. (c) 2015