Class CompareFacesResponse
- java.lang.Object
-
- software.amazon.awssdk.core.SdkResponse
-
- software.amazon.awssdk.awscore.AwsResponse
-
- software.amazon.awssdk.services.rekognition.model.RekognitionResponse
-
- software.amazon.awssdk.services.rekognition.model.CompareFacesResponse
-
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<CompareFacesResponse.Builder,CompareFacesResponse>
@Generated("software.amazon.awssdk:codegen") public final class CompareFacesResponse extends RekognitionResponse implements ToCopyableBuilder<CompareFacesResponse.Builder,CompareFacesResponse>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCompareFacesResponse.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CompareFacesResponse.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)List<CompareFacesMatch>faceMatches()An array of faces in the target image that match the source image face.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasFaceMatches()For responses, this returns true if the service returned a value for the FaceMatches property.inthashCode()booleanhasUnmatchedFaces()For responses, this returns true if the service returned a value for the UnmatchedFaces property.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends CompareFacesResponse.Builder>serializableBuilderClass()ComparedSourceImageFacesourceImageFace()The face in the source image that was used for comparison.OrientationCorrectionsourceImageOrientationCorrection()The value ofSourceImageOrientationCorrectionis always null.StringsourceImageOrientationCorrectionAsString()The value ofSourceImageOrientationCorrectionis always null.OrientationCorrectiontargetImageOrientationCorrection()The value ofTargetImageOrientationCorrectionis always null.StringtargetImageOrientationCorrectionAsString()The value ofTargetImageOrientationCorrectionis always null.CompareFacesResponse.BuildertoBuilder()StringtoString()Returns a string representation of this object.List<ComparedFace>unmatchedFaces()An array of faces in the target image that did not match the source image face.-
Methods inherited from class software.amazon.awssdk.services.rekognition.model.RekognitionResponse
responseMetadata
-
Methods inherited from class software.amazon.awssdk.core.SdkResponse
sdkHttpResponse
-
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
-
sourceImageFace
public final ComparedSourceImageFace sourceImageFace()
The face in the source image that was used for comparison.
- Returns:
- The face in the source image that was used for comparison.
-
hasFaceMatches
public final boolean hasFaceMatches()
For responses, this returns true if the service returned a value for the FaceMatches property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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.
-
faceMatches
public final List<CompareFacesMatch> faceMatches()
An array of faces in the target image that match the source image face. Each
CompareFacesMatchobject provides the bounding box, the confidence level that the bounding box contains a face, and the similarity score for the face in the bounding box and the face in the source image.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
hasFaceMatches()method.- Returns:
- An array of faces in the target image that match the source image face. Each
CompareFacesMatchobject provides the bounding box, the confidence level that the bounding box contains a face, and the similarity score for the face in the bounding box and the face in the source image.
-
hasUnmatchedFaces
public final boolean hasUnmatchedFaces()
For responses, this returns true if the service returned a value for the UnmatchedFaces property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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.
-
unmatchedFaces
public final List<ComparedFace> unmatchedFaces()
An array of faces in the target image that did not match the source image face.
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
hasUnmatchedFaces()method.- Returns:
- An array of faces in the target image that did not match the source image face.
-
sourceImageOrientationCorrection
public final OrientationCorrection sourceImageOrientationCorrection()
The value of
SourceImageOrientationCorrectionis always null.If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.
Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.
If the service returns an enum value that is not available in the current SDK version,
sourceImageOrientationCorrectionwill returnOrientationCorrection.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsourceImageOrientationCorrectionAsString().- Returns:
- The value of
SourceImageOrientationCorrectionis always null.If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.
Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.
- See Also:
OrientationCorrection
-
sourceImageOrientationCorrectionAsString
public final String sourceImageOrientationCorrectionAsString()
The value of
SourceImageOrientationCorrectionis always null.If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.
Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.
If the service returns an enum value that is not available in the current SDK version,
sourceImageOrientationCorrectionwill returnOrientationCorrection.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsourceImageOrientationCorrectionAsString().- Returns:
- The value of
SourceImageOrientationCorrectionis always null.If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.
Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.
- See Also:
OrientationCorrection
-
targetImageOrientationCorrection
public final OrientationCorrection targetImageOrientationCorrection()
The value of
TargetImageOrientationCorrectionis always null.If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.
Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.
If the service returns an enum value that is not available in the current SDK version,
targetImageOrientationCorrectionwill returnOrientationCorrection.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtargetImageOrientationCorrectionAsString().- Returns:
- The value of
TargetImageOrientationCorrectionis always null.If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.
Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.
- See Also:
OrientationCorrection
-
targetImageOrientationCorrectionAsString
public final String targetImageOrientationCorrectionAsString()
The value of
TargetImageOrientationCorrectionis always null.If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.
Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.
If the service returns an enum value that is not available in the current SDK version,
targetImageOrientationCorrectionwill returnOrientationCorrection.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtargetImageOrientationCorrectionAsString().- Returns:
- The value of
TargetImageOrientationCorrectionis always null.If the input image is in .jpeg format, it might contain exchangeable image file format (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation information to perform image correction. The bounding box coordinates are translated to represent object locations after the orientation information in the Exif metadata is used to correct the image orientation. Images in .png format don't contain Exif metadata.
Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images without orientation information in the image Exif metadata. The bounding box coordinates aren't translated and represent the object locations before the image is rotated.
- See Also:
OrientationCorrection
-
toBuilder
public CompareFacesResponse.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<CompareFacesResponse.Builder,CompareFacesResponse>- Specified by:
toBuilderin classAwsResponse
-
builder
public static CompareFacesResponse.Builder builder()
-
serializableBuilderClass
public static Class<? extends CompareFacesResponse.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classAwsResponse
-
equals
public final boolean equals(Object obj)
- Overrides:
equalsin classAwsResponse
-
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.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForFieldin classSdkResponse
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-