public class Point
extends java.lang.Object
implements java.io.Serializable
The X and Y coordinates of a point on an image. The X and Y values returned are ratios of the overall image size. For example, if the input image is 700x200 and the operation returns X=0.5 and Y=0.25, then the point is at the (350,50) pixel coordinate on the image.
An array of Point
objects, Polygon
, is returned by
DetectText and by DetectCustomLabels. Polygon
represents a fine-grained polygon around a detected item. For more
information, see Geometry in the Amazon Rekognition Developer Guide.
Constructor and Description |
---|
Point() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Float |
getX()
The value of the X coordinate for a point on a
Polygon . |
java.lang.Float |
getY()
The value of the Y coordinate for a point on a
Polygon . |
int |
hashCode() |
void |
setX(java.lang.Float x)
The value of the X coordinate for a point on a
Polygon . |
void |
setY(java.lang.Float y)
The value of the Y coordinate for a point on a
Polygon . |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Point |
withX(java.lang.Float x)
The value of the X coordinate for a point on a
Polygon . |
Point |
withY(java.lang.Float y)
The value of the Y coordinate for a point on a
Polygon . |
public java.lang.Float getX()
The value of the X coordinate for a point on a Polygon
.
The value of the X coordinate for a point on a
Polygon
.
public void setX(java.lang.Float x)
The value of the X coordinate for a point on a Polygon
.
x
-
The value of the X coordinate for a point on a
Polygon
.
public Point withX(java.lang.Float x)
The value of the X coordinate for a point on a Polygon
.
Returns a reference to this object so that method calls can be chained together.
x
-
The value of the X coordinate for a point on a
Polygon
.
public java.lang.Float getY()
The value of the Y coordinate for a point on a Polygon
.
The value of the Y coordinate for a point on a
Polygon
.
public void setY(java.lang.Float y)
The value of the Y coordinate for a point on a Polygon
.
y
-
The value of the Y coordinate for a point on a
Polygon
.
public Point withY(java.lang.Float y)
The value of the Y coordinate for a point on a Polygon
.
Returns a reference to this object so that method calls can be chained together.
y
-
The value of the Y coordinate for a point on a
Polygon
.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.