@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class BoundingBox extends Object implements Serializable, Cloneable, StructuredPojo
The bounding box around the detected page, text, key-value pair, table, table cell, or selection element on a
document page. The left
(x-coordinate) and top
(y-coordinate) are coordinates that
represent the top and left sides of the bounding box. Note that the upper-left corner of the image is the origin
(0,0).
The top
and left
values returned are ratios of the overall document page size. For example,
if the input image is 700 x 200 pixels, and the top-left coordinate of the bounding box is 350 x 50 pixels, the API
returns a left
value of 0.5 (350/700) and a top
value of 0.25 (50/200).
The width
and height
values represent the dimensions of the bounding box as a ratio of the
overall document page dimension. For example, if the document page size is 700 x 200 pixels, and the bounding box
width is 70 pixels, the width returned is 0.1.
Constructor and Description |
---|
BoundingBox() |
Modifier and Type | Method and Description |
---|---|
BoundingBox |
clone() |
boolean |
equals(Object obj) |
Float |
getHeight()
The height of the bounding box as a ratio of the overall document page height.
|
Float |
getLeft()
The left coordinate of the bounding box as a ratio of overall document page width.
|
Float |
getTop()
The top coordinate of the bounding box as a ratio of overall document page height.
|
Float |
getWidth()
The width of the bounding box as a ratio of the overall document page width.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setHeight(Float height)
The height of the bounding box as a ratio of the overall document page height.
|
void |
setLeft(Float left)
The left coordinate of the bounding box as a ratio of overall document page width.
|
void |
setTop(Float top)
The top coordinate of the bounding box as a ratio of overall document page height.
|
void |
setWidth(Float width)
The width of the bounding box as a ratio of the overall document page width.
|
String |
toString()
Returns a string representation of this object.
|
BoundingBox |
withHeight(Float height)
The height of the bounding box as a ratio of the overall document page height.
|
BoundingBox |
withLeft(Float left)
The left coordinate of the bounding box as a ratio of overall document page width.
|
BoundingBox |
withTop(Float top)
The top coordinate of the bounding box as a ratio of overall document page height.
|
BoundingBox |
withWidth(Float width)
The width of the bounding box as a ratio of the overall document page width.
|
public void setWidth(Float width)
The width of the bounding box as a ratio of the overall document page width.
width
- The width of the bounding box as a ratio of the overall document page width.public Float getWidth()
The width of the bounding box as a ratio of the overall document page width.
public BoundingBox withWidth(Float width)
The width of the bounding box as a ratio of the overall document page width.
width
- The width of the bounding box as a ratio of the overall document page width.public void setHeight(Float height)
The height of the bounding box as a ratio of the overall document page height.
height
- The height of the bounding box as a ratio of the overall document page height.public Float getHeight()
The height of the bounding box as a ratio of the overall document page height.
public BoundingBox withHeight(Float height)
The height of the bounding box as a ratio of the overall document page height.
height
- The height of the bounding box as a ratio of the overall document page height.public void setLeft(Float left)
The left coordinate of the bounding box as a ratio of overall document page width.
left
- The left coordinate of the bounding box as a ratio of overall document page width.public Float getLeft()
The left coordinate of the bounding box as a ratio of overall document page width.
public BoundingBox withLeft(Float left)
The left coordinate of the bounding box as a ratio of overall document page width.
left
- The left coordinate of the bounding box as a ratio of overall document page width.public void setTop(Float top)
The top coordinate of the bounding box as a ratio of overall document page height.
top
- The top coordinate of the bounding box as a ratio of overall document page height.public Float getTop()
The top coordinate of the bounding box as a ratio of overall document page height.
public BoundingBox withTop(Float top)
The top coordinate of the bounding box as a ratio of overall document page height.
top
- The top coordinate of the bounding box as a ratio of overall document page height.public String toString()
toString
in class Object
Object.toString()
public BoundingBox clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.