/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.rekognition.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* 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. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RegionOfInterest implements Serializable, Cloneable, StructuredPojo { /** ** The box representing a region of interest on screen. *
*/ private BoundingBox boundingBox; /** *
* Specifies a shape made up of up to 10 Point
objects to define a region of interest.
*
* The box representing a region of interest on screen. *
* * @param boundingBox * The box representing a region of interest on screen. */ public void setBoundingBox(BoundingBox boundingBox) { this.boundingBox = boundingBox; } /** ** The box representing a region of interest on screen. *
* * @return The box representing a region of interest on screen. */ public BoundingBox getBoundingBox() { return this.boundingBox; } /** ** The box representing a region of interest on screen. *
* * @param boundingBox * The box representing a region of interest on screen. * @return Returns a reference to this object so that method calls can be chained together. */ public RegionOfInterest withBoundingBox(BoundingBox boundingBox) { setBoundingBox(boundingBox); return this; } /** *
* 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 java.util.List
* 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(java.util.Collection
* 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 * {@link #setPolygon(java.util.Collection)} or {@link #withPolygon(java.util.Collection)} if you want to override * the existing values. *
* * @param polygon * Specifies a shape made up of up to 10Point
objects to define a region of interest.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RegionOfInterest withPolygon(Point... polygon) {
if (this.polygon == null) {
setPolygon(new java.util.ArrayList
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RegionOfInterest withPolygon(java.util.Collection