Class Image
- java.lang.Object
-
- software.amazon.awssdk.services.rekognition.model.Image
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Image.Builder,Image>
@Generated("software.amazon.awssdk:codegen") public final class Image extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Image.Builder,Image>
Provides the input image either as bytes or an S3 object.
You pass image bytes to an Amazon Rekognition API operation by using the
Bytesproperty. For example, you would use theBytesproperty to pass an image loaded from a local file system. Image bytes passed by using theBytesproperty must be base64-encoded. Your code may not need to encode image bytes if you are using an AWS SDK to call Amazon Rekognition API operations.For more information, see Analyzing an Image Loaded from a Local File System in the Amazon Rekognition Developer Guide.
You pass images stored in an S3 bucket to an Amazon Rekognition API operation by using the
S3Objectproperty. Images stored in an S3 bucket do not need to be base64-encoded.The region for the S3 bucket containing the S3 object must match the region you use for Amazon Rekognition operations.
If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes using the Bytes property is not supported. You must first upload the image to an Amazon S3 bucket and then call the operation using the S3Object property.
For Amazon Rekognition to process an S3 object, the user must have permission to access the S3 object. For more information, see How Amazon Rekognition works with IAM in the Amazon Rekognition Developer Guide.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceImage.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Image.Builderbuilder()SdkBytesbytes()Blob of image bytes up to 5 MBs.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()S3Objects3Object()Identifies an S3 object as the image source.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends Image.Builder>serializableBuilderClass()Image.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
bytes
public final SdkBytes bytes()
Blob of image bytes up to 5 MBs. Note that the maximum image size you can pass to
DetectCustomLabelsis 4MB.- Returns:
- Blob of image bytes up to 5 MBs. Note that the maximum image size you can pass to
DetectCustomLabelsis 4MB.
-
s3Object
public final S3Object s3Object()
Identifies an S3 object as the image source.
- Returns:
- Identifies an S3 object as the image source.
-
toBuilder
public Image.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Image.Builder,Image>
-
builder
public static Image.Builder builder()
-
serializableBuilderClass
public static Class<? extends Image.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-