public class PixelCoordinate
Represents pixel coordinates on image. Top left corner of an image has PixelCoordinate(0, 0).
This coordinate system is used to represent the position of an object relative to the frame.
The origin is the left top corner of the frame. The position of an object is expressed as x, y
Constructor and Description |
---|
PixelCoordinate(int x,
int y)
Represents pixel coordinates on image. Top left corner of an image has PixelCoordinate(0, 0).
|
Modifier and Type | Method and Description |
---|---|
int |
component1()
Int is the horizontal distance in pixels from the origin to the object
|
int |
component2()
Int is the vertical distance in pixels from the origin to the object
|
PixelCoordinate |
copy(int x,
int y)
Represents pixel coordinates on image. Top left corner of an image has PixelCoordinate(0, 0).
|
boolean |
equals(java.lang.Object p) |
int |
getX()
Int is the horizontal distance in pixels from the origin to the object
|
int |
getY()
Int is the vertical distance in pixels from the origin to the object
|
int |
hashCode() |
java.lang.String |
toString() |
public PixelCoordinate(int x, int y)
Represents pixel coordinates on image. Top left corner of an image has PixelCoordinate(0, 0).
This coordinate system is used to represent the position of an object relative to the frame.
The origin is the left top corner of the frame. The position of an object is expressed as x, y
x
- Int is the horizontal distance in pixels from the origin to the objecty
- Int is the vertical distance in pixels from the origin to the objectx
- Int is the horizontal distance in pixels from the origin to the objecty
- Int is the vertical distance in pixels from the origin to the objectpublic int getX()
Int is the horizontal distance in pixels from the origin to the object
public int getY()
Int is the vertical distance in pixels from the origin to the object
public int component1()
Int is the horizontal distance in pixels from the origin to the object
public int component2()
Int is the vertical distance in pixels from the origin to the object
public PixelCoordinate copy(int x, int y)
Represents pixel coordinates on image. Top left corner of an image has PixelCoordinate(0, 0).
This coordinate system is used to represent the position of an object relative to the frame.
The origin is the left top corner of the frame. The position of an object is expressed as x, y
x
- Int is the horizontal distance in pixels from the origin to the objecty
- Int is the vertical distance in pixels from the origin to the objectpublic java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)