Package adaptlil.data_classes
Class LeftEyePupil
java.lang.Object
adaptlil.data_classes.LeftEyePupil
-
Field Summary
-
Constructor Summary
ConstructorDescriptionEmpty default constructor for Jackson SerializationLeftEyePupil
(double x, double y, double diameter, double scale, boolean isValid) Pupil data for the left eye -
Method Summary
Modifier and TypeMethodDescriptiondouble
The diameter of the left eye pupil in pixels.static LeftEyePupil
getLeftEyePupilFromCsvLine
(int lpcxIndex, int lpcyIndex, int lpsIndex, int lpdIndex, int lpvIndex, String[] cells) Reads LeftEyePupil data from the csv generated via gazepoint.double
getScale()
The scale factor of the left eye pupil (unitless).double
getX()
The X-coordinate of the left eye pupil in the camera image, as a fraction of the camera image sizedouble
getY()
The Y-coordinate of the left eye pupil in the camera image, as a fraction of the camera image sizeinterpolate
(LeftEyePupil firstLeftEyePupil, LeftEyePupil nextLeftEyePupil, int nSteps) Performs Linear interpolation nSteps LeftEyePupil elements between the first LeftEyePupil and the next LeftEyePupilboolean
isValid()
The valid flag with value of 1 if the data is valid, and 0 if it is not.void
setDiameter
(double diameter) The diameter of the left eye pupil in pixels.void
setIsValid
(boolean isValid) void
setScale
(double scale) The scale factor of the left eye pupil (unitless).void
setX
(double x) X-Coordinate of left eyevoid
setY
(double y) Y-Coordinate of left eye
-
Field Details
-
x
private double x -
y
private double y -
diameter
private double diameter -
scale
private double scale -
isValid
private boolean isValid
-
-
Constructor Details
-
LeftEyePupil
public LeftEyePupil()Empty default constructor for Jackson Serialization -
LeftEyePupil
public LeftEyePupil(double x, double y, double diameter, double scale, boolean isValid) Pupil data for the left eye- Parameters:
x
- fraction of camera image sizey
- fraction of camera image sizediameter
- in pixelsscale
- depth of how far a user's eye is from the trackerisValid
- flag to determine if this object data is valid (determiend by tracker)
-
-
Method Details
-
getLeftEyePupilFromCsvLine
public static LeftEyePupil getLeftEyePupilFromCsvLine(int lpcxIndex, int lpcyIndex, int lpsIndex, int lpdIndex, int lpvIndex, String[] cells) Reads LeftEyePupil data from the csv generated via gazepoint.- Parameters:
lpcxIndex
-lpcyIndex
-lpsIndex
-lpdIndex
-lpvIndex
-cells
-- Returns:
-
interpolate
public LeftEyePupil[] interpolate(LeftEyePupil firstLeftEyePupil, LeftEyePupil nextLeftEyePupil, int nSteps) Performs Linear interpolation nSteps LeftEyePupil elements between the first LeftEyePupil and the next LeftEyePupil- Parameters:
firstLeftEyePupil
-nextLeftEyePupil
-nSteps
-- Returns:
-
setX
public void setX(double x) X-Coordinate of left eye- Parameters:
x
- fraction of camera image size
-
setY
public void setY(double y) Y-Coordinate of left eye- Parameters:
y
- fraction of camera image size
-
setDiameter
public void setDiameter(double diameter) The diameter of the left eye pupil in pixels.- Parameters:
diameter
- in pixels
-
setScale
public void setScale(double scale) The scale factor of the left eye pupil (unitless). Value equals 1 at calibration depth, is less than 1 when user is closer to the eye tracker and greater than 1 when user is further away.- Parameters:
scale
- [1,inf]
-
setIsValid
public void setIsValid(boolean isValid) - Parameters:
isValid
-
-
getX
public double getX()The X-coordinate of the left eye pupil in the camera image, as a fraction of the camera image size- Returns:
- double
-
getY
public double getY()The Y-coordinate of the left eye pupil in the camera image, as a fraction of the camera image size- Returns:
- double
-
getDiameter
public double getDiameter()The diameter of the left eye pupil in pixels.- Returns:
- double
-
getScale
public double getScale()The scale factor of the left eye pupil (unitless). Value equals 1 at calibration depth, is less than 1 when user is closer to the eye tracker and greater than 1 when user is further away- Returns:
- double
-
isValid
public boolean isValid()The valid flag with value of 1 if the data is valid, and 0 if it is not.- Returns:
-