public class BoundingBox
extends java.lang.Object
implements java.io.Serializable
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 |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Float |
getHeight()
The height of the bounding box as a ratio of the overall document page
height.
|
java.lang.Float |
getLeft()
The left coordinate of the bounding box as a ratio of overall document
page width.
|
java.lang.Float |
getTop()
The top coordinate of the bounding box as a ratio of overall document
page height.
|
java.lang.Float |
getWidth()
The width of the bounding box as a ratio of the overall document page
width.
|
int |
hashCode() |
void |
setHeight(java.lang.Float height)
The height of the bounding box as a ratio of the overall document page
height.
|
void |
setLeft(java.lang.Float left)
The left coordinate of the bounding box as a ratio of overall document
page width.
|
void |
setTop(java.lang.Float top)
The top coordinate of the bounding box as a ratio of overall document
page height.
|
void |
setWidth(java.lang.Float width)
The width of the bounding box as a ratio of the overall document page
width.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
BoundingBox |
withHeight(java.lang.Float height)
The height of the bounding box as a ratio of the overall document page
height.
|
BoundingBox |
withLeft(java.lang.Float left)
The left coordinate of the bounding box as a ratio of overall document
page width.
|
BoundingBox |
withTop(java.lang.Float top)
The top coordinate of the bounding box as a ratio of overall document
page height.
|
BoundingBox |
withWidth(java.lang.Float width)
The width of the bounding box as a ratio of the overall document page
width.
|
public java.lang.Float getWidth()
The width of the bounding box as a ratio of the overall document page width.
The width of the bounding box as a ratio of the overall document page width.
public void setWidth(java.lang.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 BoundingBox withWidth(java.lang.Float width)
The width of the bounding box as a ratio of the overall document page width.
Returns a reference to this object so that method calls can be chained together.
width
- The width of the bounding box as a ratio of the overall document page width.
public java.lang.Float getHeight()
The height of the bounding box as a ratio of the overall document page height.
The height of the bounding box as a ratio of the overall document page height.
public void setHeight(java.lang.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 BoundingBox withHeight(java.lang.Float height)
The height of the bounding box as a ratio of the overall document page height.
Returns a reference to this object so that method calls can be chained together.
height
- The height of the bounding box as a ratio of the overall document page height.
public java.lang.Float getLeft()
The left coordinate of the bounding box as a ratio of overall document page width.
The left coordinate of the bounding box as a ratio of overall document page width.
public void setLeft(java.lang.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 BoundingBox withLeft(java.lang.Float left)
The left coordinate of the bounding box as a ratio of overall document page width.
Returns a reference to this object so that method calls can be chained together.
left
- The left coordinate of the bounding box as a ratio of overall document page width.
public java.lang.Float getTop()
The top coordinate of the bounding box as a ratio of overall document page height.
The top coordinate of the bounding box as a ratio of overall document page height.
public void setTop(java.lang.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 BoundingBox withTop(java.lang.Float top)
The top coordinate of the bounding box as a ratio of overall document page height.
Returns a reference to this object so that method calls can be chained together.
top
- The top coordinate of the bounding box as a ratio of overall document page height.
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.