Class CompareFacesResponse

    • 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 the 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.
      • faceMatches

        public final List<CompareFacesMatch> faceMatches()

        An array of faces in the target image that match the source image face. Each CompareFacesMatch object 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 CompareFacesMatch object 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 the 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.
      • 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 SourceImageOrientationCorrection is 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, sourceImageOrientationCorrection will return OrientationCorrection.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from sourceImageOrientationCorrectionAsString().

        Returns:
        The value of SourceImageOrientationCorrection is 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 SourceImageOrientationCorrection is 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, sourceImageOrientationCorrection will return OrientationCorrection.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from sourceImageOrientationCorrectionAsString().

        Returns:
        The value of SourceImageOrientationCorrection is 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 TargetImageOrientationCorrection is 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, targetImageOrientationCorrection will return OrientationCorrection.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from targetImageOrientationCorrectionAsString().

        Returns:
        The value of TargetImageOrientationCorrection is 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 TargetImageOrientationCorrection is 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, targetImageOrientationCorrection will return OrientationCorrection.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from targetImageOrientationCorrectionAsString().

        Returns:
        The value of TargetImageOrientationCorrection is 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
      • 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.
        Overrides:
        toString in class Object