1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CompareFaces`](crate::operation::compare_faces::builders::CompareFacesFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`source_image(Image)`](crate::operation::compare_faces::builders::CompareFacesFluentBuilder::source_image) / [`set_source_image(Option<Image>)`](crate::operation::compare_faces::builders::CompareFacesFluentBuilder::set_source_image):<br>required: **true**<br><p>The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported. </p>  <p>If you are using an AWS SDK to call Amazon Rekognition, you might not need to base64-encode image bytes passed using the <code>Bytes</code> field. For more information, see Images in the Amazon Rekognition developer guide.</p><br>
    ///   - [`target_image(Image)`](crate::operation::compare_faces::builders::CompareFacesFluentBuilder::target_image) / [`set_target_image(Option<Image>)`](crate::operation::compare_faces::builders::CompareFacesFluentBuilder::set_target_image):<br>required: **true**<br><p>The target image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported. </p>  <p>If you are using an AWS SDK to call Amazon Rekognition, you might not need to base64-encode image bytes passed using the <code>Bytes</code> field. For more information, see Images in the Amazon Rekognition developer guide.</p><br>
    ///   - [`similarity_threshold(f32)`](crate::operation::compare_faces::builders::CompareFacesFluentBuilder::similarity_threshold) / [`set_similarity_threshold(Option<f32>)`](crate::operation::compare_faces::builders::CompareFacesFluentBuilder::set_similarity_threshold):<br>required: **false**<br><p>The minimum level of confidence in the face matches that a match must meet to be included in the <code>FaceMatches</code> array.</p><br>
    ///   - [`quality_filter(QualityFilter)`](crate::operation::compare_faces::builders::CompareFacesFluentBuilder::quality_filter) / [`set_quality_filter(Option<QualityFilter>)`](crate::operation::compare_faces::builders::CompareFacesFluentBuilder::set_quality_filter):<br>required: **false**<br><p>A filter that specifies a quality bar for how much filtering is done to identify faces. Filtered faces aren't compared. If you specify <code>AUTO</code>, Amazon Rekognition chooses the quality bar. If you specify <code>LOW</code>, <code>MEDIUM</code>, or <code>HIGH</code>, filtering removes all faces that don’t meet the chosen quality bar. The quality bar is based on a variety of common use cases. Low-quality detections can occur for a number of reasons. Some examples are an object that's misidentified as a face, a face that's too blurry, or a face with a pose that's too extreme to use. If you specify <code>NONE</code>, no filtering is performed. The default value is <code>NONE</code>. </p>  <p>To use quality filtering, the collection you are using must be associated with version 3 of the face model or higher.</p><br>
    /// - On success, responds with [`CompareFacesOutput`](crate::operation::compare_faces::CompareFacesOutput) with field(s):
    ///   - [`source_image_face(Option<ComparedSourceImageFace>)`](crate::operation::compare_faces::CompareFacesOutput::source_image_face): <p>The face in the source image that was used for comparison.</p>
    ///   - [`face_matches(Option<Vec::<CompareFacesMatch>>)`](crate::operation::compare_faces::CompareFacesOutput::face_matches): <p>An array of faces in the target image that match the source image face. Each <code>CompareFacesMatch</code> 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.</p>
    ///   - [`unmatched_faces(Option<Vec::<ComparedFace>>)`](crate::operation::compare_faces::CompareFacesOutput::unmatched_faces): <p>An array of faces in the target image that did not match the source image face.</p>
    ///   - [`source_image_orientation_correction(Option<OrientationCorrection>)`](crate::operation::compare_faces::CompareFacesOutput::source_image_orientation_correction): <p>The value of <code>SourceImageOrientationCorrection</code> is always null.</p>  <p>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.</p>  <p>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. </p>
    ///   - [`target_image_orientation_correction(Option<OrientationCorrection>)`](crate::operation::compare_faces::CompareFacesOutput::target_image_orientation_correction): <p>The value of <code>TargetImageOrientationCorrection</code> is always null.</p>  <p>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.</p>  <p>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. </p>
    /// - On failure, responds with [`SdkError<CompareFacesError>`](crate::operation::compare_faces::CompareFacesError)
    pub fn compare_faces(&self) -> crate::operation::compare_faces::builders::CompareFacesFluentBuilder {
        crate::operation::compare_faces::builders::CompareFacesFluentBuilder::new(self.handle.clone())
    }
}