Package adaptlil.data_classes
Class RightEyePupil
java.lang.Object
adaptlil.data_classes.RightEyePupil
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefault constructor for Jackson SerializationRightEyePupil
(double x, double y, double diameter, double scale, boolean isValid) -
Method Summary
Modifier and TypeMethodDescriptiondouble
The diameter of the right eye pupil in pixels.static RightEyePupil
getRightEyePupilFromCsvLine
(int rpcxIndex, int rpcyIndex, int rpsIndex, int rpdIndex, int rpvIndex, String[] cells) Constructs a RightEyePupil Object from an excel row as specified by gazepoint api.double
getScale()
The scale factor of the right eye pupil (unitless).double
getX()
The X-coordinate of the right eye pupil in the camera image, as a fraction of the camera image sizedouble
getY()
The Y-coordinate of the right eye pupil in the camera image, as a fraction of the camera image sizeinterpolate
(RightEyePupil firstRightEyePupil, RightEyePupil nextRightEyePupil, int nSteps) Performs Linear interpolation nSteps RightEyePupil elements between the first RightEyePupil and the next RightEyePupilboolean
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 right eye pupil in pixels.void
setIsValid
(boolean isValid) Set the validation flag to signify packet corruption.void
setScale
(double scale) The scale factor of the right eye pupil (unitless).void
setX
(double x) X-Coordinate of right eyevoid
setY
(double y) Y-Coordinate of right 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
-
RightEyePupil
public RightEyePupil()Default constructor for Jackson Serialization -
RightEyePupil
public RightEyePupil(double x, double y, double diameter, double scale, boolean isValid) - 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
-
getRightEyePupilFromCsvLine
public static RightEyePupil getRightEyePupilFromCsvLine(int rpcxIndex, int rpcyIndex, int rpsIndex, int rpdIndex, int rpvIndex, String[] cells) Constructs a RightEyePupil Object from an excel row as specified by gazepoint api. The index arguments correspond to the column rows of cells argument.- Parameters:
rpcxIndex
-rpcyIndex
-rpsIndex
-rpdIndex
-rpvIndex
-cells
-- Returns:
-
interpolate
public RightEyePupil[] interpolate(RightEyePupil firstRightEyePupil, RightEyePupil nextRightEyePupil, int nSteps) Performs Linear interpolation nSteps RightEyePupil elements between the first RightEyePupil and the next RightEyePupil- Parameters:
firstRightEyePupil
-nextRightEyePupil
-nSteps
-- Returns:
-
setX
public void setX(double x) X-Coordinate of right eye- Parameters:
x
- fraction of camera image size
-
setY
public void setY(double y) Y-Coordinate of right eye- Parameters:
y
- fraction of camera image size
-
setDiameter
public void setDiameter(double diameter) The diameter of the right eye pupil in pixels.- Parameters:
diameter
- in pixels
-
setScale
public void setScale(double scale) The scale factor of the right 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) Set the validation flag to signify packet corruption.- Parameters:
isValid
-
-
getX
public double getX()The X-coordinate of the right eye pupil in the camera image, as a fraction of the camera image size- Returns:
- float
-
getY
public double getY()The Y-coordinate of the right eye pupil in the camera image, as a fraction of the camera image size- Returns:
- float
-
getDiameter
public double getDiameter()The diameter of the right eye pupil in pixels.- Returns:
- float
-
getScale
public double getScale()The scale factor of the right 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:
- float
-
isValid
public boolean isValid()The valid flag with value of 1 if the data is valid, and 0 if it is not.- Returns:
-