@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class RegionOfInterest extends Object implements Serializable, Cloneable, StructuredPojo
Specifies a location within the frame that Rekognition checks for objects of interest such as text, labels, or faces.
It uses a BoundingBox
or Polygon
to set a region of the screen.
A word, face, or label is included in the region if it is more than half in that region. If there is more than one region, the word, face, or label is compared with all regions of the screen. Any object of interest that is more than half in a region is kept in the results.
Constructor and Description |
---|
RegionOfInterest() |
Modifier and Type | Method and Description |
---|---|
RegionOfInterest |
clone() |
boolean |
equals(Object obj) |
BoundingBox |
getBoundingBox()
The box representing a region of interest on screen.
|
List<Point> |
getPolygon()
Specifies a shape made up of up to 10
Point objects to define a region of interest. |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setBoundingBox(BoundingBox boundingBox)
The box representing a region of interest on screen.
|
void |
setPolygon(Collection<Point> polygon)
Specifies a shape made up of up to 10
Point objects to define a region of interest. |
String |
toString()
Returns a string representation of this object.
|
RegionOfInterest |
withBoundingBox(BoundingBox boundingBox)
The box representing a region of interest on screen.
|
RegionOfInterest |
withPolygon(Collection<Point> polygon)
Specifies a shape made up of up to 10
Point objects to define a region of interest. |
RegionOfInterest |
withPolygon(Point... polygon)
Specifies a shape made up of up to 10
Point objects to define a region of interest. |
public void setBoundingBox(BoundingBox boundingBox)
The box representing a region of interest on screen.
boundingBox
- The box representing a region of interest on screen.public BoundingBox getBoundingBox()
The box representing a region of interest on screen.
public RegionOfInterest withBoundingBox(BoundingBox boundingBox)
The box representing a region of interest on screen.
boundingBox
- The box representing a region of interest on screen.public List<Point> getPolygon()
Specifies a shape made up of up to 10 Point
objects to define a region of interest.
Point
objects to define a region of interest.public void setPolygon(Collection<Point> polygon)
Specifies a shape made up of up to 10 Point
objects to define a region of interest.
polygon
- Specifies a shape made up of up to 10 Point
objects to define a region of interest.public RegionOfInterest withPolygon(Point... polygon)
Specifies a shape made up of up to 10 Point
objects to define a region of interest.
NOTE: This method appends the values to the existing list (if any). Use
setPolygon(java.util.Collection)
or withPolygon(java.util.Collection)
if you want to override
the existing values.
polygon
- Specifies a shape made up of up to 10 Point
objects to define a region of interest.public RegionOfInterest withPolygon(Collection<Point> polygon)
Specifies a shape made up of up to 10 Point
objects to define a region of interest.
polygon
- Specifies a shape made up of up to 10 Point
objects to define a region of interest.public String toString()
toString
in class Object
Object.toString()
public RegionOfInterest clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.