fn compare_faces(
        &self,
        input: CompareFacesRequest,
    ) -> RusotoFuture<CompareFacesResponse, CompareFacesError> {
        let mut request = SignedRequest::new("POST", "rekognition", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "RekognitionService.CompareFaces");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        self.client.sign_and_dispatch(request, |response| {
            if response.status.is_success() {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;

                    if body.is_empty() || body == b"null" {
                        body = b"{}".to_vec();
                    }

                    serde_json::from_str::<CompareFacesResponse>(
                        String::from_utf8_lossy(body.as_ref()).as_ref(),
                    )
                    .unwrap()
                }))
            } else {
                Box::new(
                    response
                        .buffer()
                        .from_err()
                        .and_then(|response| Err(CompareFacesError::from_response(response))),
                )
            }
        })
    }
/// <p>Compares a face in the <i>source</i> input image with each of the 100 largest faces detected in the <i>target</i> input image. </p> <note> <p> If the source image contains multiple faces, the service detects the largest face and compares it with each face detected in the target image. </p> </note> <p>You pass the input and target images either as base64-encoded image bytes or as a references to images in an Amazon S3 bucket. If you use the Amazon CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. </p> <p>In response, the operation returns an array of face matches ordered by similarity score in descending order. For each face match, the response provides a bounding box of the face, facial landmarks, pose details (pitch, role, and yaw), quality (brightness and sharpness), and confidence value (indicating the level of confidence that the bounding box contains a face). The response also provides a similarity score, which indicates how closely the faces match. </p> <note> <p>By default, only faces with a similarity score of greater than or equal to 80% are returned in the response. You can change this value by specifying the <code>SimilarityThreshold</code> parameter.</p> </note> <p> <code>CompareFaces</code> also returns an array of faces that don't match the source image. For each face, it returns a bounding box, confidence value, landmarks, pose details, and quality. The response also returns information about the face in the source image, including the bounding box of the face and confidence value.</p> <p>If the image doesn't contain Exif metadata, <code>CompareFaces</code> returns orientation information for the source and target images. Use these values to display the images with the correct image orientation.</p> <p>If no faces are detected in the source or target images, <code>CompareFaces</code> returns an <code>InvalidParameterException</code> error. </p> <note> <p> This is a stateless API operation. That is, data returned by this operation doesn't persist.</p> </note> <p>For an example, see Comparing Faces in Images in the Amazon Rekognition Developer Guide.</p> <p>This operation requires permissions to perform the <code>rekognition:CompareFaces</code> action.</p>
Compares a face in the source input image with each of the 100 largest faces detected in the target input image.    If the source image contains multiple faces, the service detects the largest face and compares it with each face detected in the target image.   You pass the input and target images either as base64-encoded image bytes or as a references to images in an Amazon S3 bucket. If you use the Amazon CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file.  In response, the operation returns an array of face matches ordered by similarity score in descending order. For each face match, the response provides a bounding box of the face, facial landmarks, pose details (pitch, role, and yaw), quality (brightness and sharpness), and confidence value (indicating the level of confidence that the bounding box contains a face). The response also provides a similarity score, which indicates how closely the faces match.   By default, only faces with a similarity score of greater than or equal to 80% are returned in the response. You can change this value by specifying the SimilarityThreshold parameter.   CompareFaces also returns an array of faces that don't match the source image. For each face, it returns a bounding box, confidence value, landmarks, pose details, and quality. The response also returns information about the face in the source image, including the bounding box of the face and confidence value. If the image doesn't contain Exif metadata, CompareFaces returns orientation information for the source and target images. Use these values to display the images with the correct image orientation. If no faces are detected in the source or target images, CompareFaces returns an InvalidParameterException error.    This is a stateless API operation. That is, data returned by this operation doesn't persist.  For an example, see Comparing Faces in Images in the Amazon Rekognition Developer Guide. This operation requires permissions to perform the rekognition:CompareFaces action.
Compares a face in the source input image with each of the 100 largest faces detected in the target input image . If the source image contains multiple faces the service detects the largest face and compares it with each face detected in the target image . You pass the input and target images either as base64 - encoded image bytes or as a references to images in an Amazon S3 bucket . If you use the Amazon CLI to call Amazon Rekognition operations passing image bytes is not supported . The image must be either a PNG or JPEG formatted file . In response the operation returns an array of face matches ordered by similarity score in descending order . For each face match the response provides a bounding box of the face facial landmarks pose details ( pitch role and yaw ) quality ( brightness and sharpness ) and confidence value ( indicating the level of confidence that the bounding box contains a face ) . The response also provides a similarity score which indicates how closely the faces match . By default only faces with a similarity score of greater than or equal to 80% are returned in the response . You can change this value by specifying the SimilarityThreshold parameter . CompareFaces also returns an array of faces that don ' t match the source image . For each face it returns a bounding box confidence value landmarks pose details and quality . The response also returns information about the face in the source image including the bounding box of the face and confidence value . If the image doesn ' t contain Exif metadata CompareFaces returns orientation information for the source and target images . Use these values to display the images with the correct image orientation . If no faces are detected in the source or target images CompareFaces returns an InvalidParameterException error . This is a stateless API operation . That is data returned by this operation doesn ' t persist . For an example see Comparing Faces in Images in the Amazon Rekognition Developer Guide . This operation requires permissions to perform the rekognition : CompareFaces action .
fn compare_faces(
        &self,
        input: CompareFacesRequest,
    ) -> RusotoFuture<CompareFacesResponse, CompareFacesError> {
        let mut request = SignedRequest::new("POST", "rekognition", &self.region, "/");
        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "RekognitionService.CompareFaces");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));
        self.client.sign_and_dispatch(request, |response| {
            if response.status.is_success() {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;
                    if body.is_empty() || body == b"null" {
                        body = b"{}".to_vec();
                    }
                    serde_json::from_str::<CompareFacesResponse>(
                        String::from_utf8_lossy(body.as_ref()).as_ref(),
                    )
                    .unwrap()
                }))
            } else {
                Box::new(
                    response
                        .buffer()
                        .from_err()
                        .and_then(|response| Err(CompareFacesError::from_response(response))),
                )
            }
        })
    }
fn compare_faces ( & self , input : CompareFacesRequest , ) -> RusotoFuture < CompareFacesResponse , CompareFacesError > { let mut request = SignedRequest :: new ( " " , " " , & self . region , " " ) ; request . set_content_type ( " " . to_owned ( ) ) ; request . add_header ( " " , " " ) ; let encoded = serde_json :: to_string ( & input ) . unwrap ( ) ; request . set_payload ( Some ( encoded . into_bytes ( ) ) ) ; self . client . sign_and_dispatch ( request , | response | { if response . status . is_success ( ) { Box :: new ( response . buffer ( ) . from_err ( ) . map ( | response | { let mut body = response . body ; if body . is_empty ( ) || body == b" " { body = b" " . to_vec ( ) ; } serde_json :: from_str :: < CompareFacesResponse > ( String :: from_utf8_lossy ( body . as_ref ( ) ) . as_ref ( ) , ) . unwrap ( ) } ) ) } else { Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | Err ( CompareFacesError :: from_response ( response ) ) ) , ) } } ) }
<p>Compares a face in the <i>source</i> input image with each of the 100 largest faces detected in the <i>target</i> input image.
<p > Compares a face in the <i > source< / i > input image with each of the 100 largest faces detected in the <i > target< / i > input image .
&self
input
CompareFacesRequest
&self
input
CompareFacesRequest