hmi.sensors.eyebox2.directaccess
Class Position
java.lang.Object
hmi.sensors.eyebox2.directaccess.Position
public class Position
- extends Object
Stores the position of a detected face or detected eyes.
The position is stored as as 4 integers.
For the face these integers indicate the coordinates of the topleft corner (x1,y1)
and the bottomright corner (x2,y2).
For the eyes these integers indicate the position of the first eye (x1,y1)
and the position of the second eye (x2, y2).
All coordinates are relative to the resolution of the camera, and (0,0) is the topleft of the image.
- Author:
- Mark ter Maat
|
Field Summary |
private int |
x1
|
private int |
x2
|
private int |
y1
|
private int |
y2
|
|
Constructor Summary |
Position(int x1,
int y1,
int x2,
int y2)
Creates a new instance of Position with the given coordinates. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
x1
private int x1
x2
private int x2
y1
private int y1
y2
private int y2
Position
public Position(int x1,
int y1,
int x2,
int y2)
- Creates a new instance of Position with the given coordinates.
- Parameters:
x1 - the first x-coordinate.x2 - the second x-coordinate.y1 - the first y-coordinate.y2 - the second y-coordinate.
setPosition
public void setPosition(int x1,
int y1,
int x2,
int y2)
- Sets all coordinates
getX1
public int getX1()
- Returns:
- the x1
setX1
public void setX1(int x1)
- Parameters:
x1 - the x1 to set
getX2
public int getX2()
- Returns:
- the x2
setX2
public void setX2(int x2)
- Parameters:
x2 - the x2 to set
getY1
public int getY1()
- Returns:
- the y1
setY1
public void setY1(int y1)
- Parameters:
y1 - the y1 to set
getY2
public int getY2()
- Returns:
- the y2
setY2
public void setY2(int y2)
- Parameters:
y2 - the y2 to set