@Generated(value="software.amazon.awssdk:codegen") public final class RegionOfInterest extends Object implements SdkPojo, Serializable, ToCopyableBuilder<RegionOfInterest.Builder,RegionOfInterest>
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.
| Modifier and Type | Class and Description |
|---|---|
static interface |
RegionOfInterest.Builder |
| Modifier and Type | Method and Description |
|---|---|
BoundingBox |
boundingBox()
The box representing a region of interest on screen.
|
static RegionOfInterest.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasPolygon()
For responses, this returns true if the service returned a value for the Polygon property.
|
List<Point> |
polygon()
Specifies a shape made up of up to 10
Point objects to define a region of interest. |
List<SdkField<?>> |
sdkFields() |
static Class<? extends RegionOfInterest.Builder> |
serializableBuilderClass() |
RegionOfInterest.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final BoundingBox boundingBox()
The box representing a region of interest on screen.
public final boolean hasPolygon()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<Point> polygon()
Specifies a shape made up of up to 10 Point objects to define a region of interest.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasPolygon() method.
Point objects to define a region of interest.public RegionOfInterest.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<RegionOfInterest.Builder,RegionOfInterest>public static RegionOfInterest.Builder builder()
public static Class<? extends RegionOfInterest.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.