fn search_faces_by_image(
        &self,
        input: SearchFacesByImageRequest,
    ) -> RusotoFuture<SearchFacesByImageResponse, SearchFacesByImageError> {
        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.SearchFacesByImage");
        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::<SearchFacesByImageResponse>(
                        String::from_utf8_lossy(body.as_ref()).as_ref(),
                    )
                    .unwrap()
                }))
            } else {
                Box::new(
                    response
                        .buffer()
                        .from_err()
                        .and_then(|response| Err(SearchFacesByImageError::from_response(response))),
                )
            }
        })
    }
/// <p>For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces. The operation compares the features of the input face with faces in the specified collection. </p> <note> <p>To search for all faces in an input image, you might first call the operation, and then use the face IDs returned in subsequent calls to the operation. </p> <p> You can also call the <code>DetectFaces</code> operation and use the bounding boxes in the response to make face crops, which then you can pass in to the <code>SearchFacesByImage</code> operation. </p> </note> <p>You pass the input image either as base64-encoded image bytes or as a reference to an image 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> The response returns an array of faces that match, ordered by similarity score with the highest similarity first. More specifically, it is an array of metadata for each face match found. Along with the metadata, the response also includes a <code>similarity</code> indicating how similar the face is to the input face. In the response, the operation also returns the bounding box (and a confidence level that the bounding box contains a face) of the face that Amazon Rekognition used for the input image. </p> <p>For an example, Searching for a Face Using an Image in the Amazon Rekognition Developer Guide.</p> <p>This operation requires permissions to perform the <code>rekognition:SearchFacesByImage</code> action.</p>
For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces. The operation compares the features of the input face with faces in the specified collection.   To search for all faces in an input image, you might first call the operation, and then use the face IDs returned in subsequent calls to the operation.   You can also call the DetectFaces operation and use the bounding boxes in the response to make face crops, which then you can pass in to the SearchFacesByImage operation.   You pass the input image either as base64-encoded image bytes or as a reference to an image 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.   The response returns an array of faces that match, ordered by similarity score with the highest similarity first. More specifically, it is an array of metadata for each face match found. Along with the metadata, the response also includes a similarity indicating how similar the face is to the input face. In the response, the operation also returns the bounding box (and a confidence level that the bounding box contains a face) of the face that Amazon Rekognition used for the input image.  For an example, Searching for a Face Using an Image in the Amazon Rekognition Developer Guide. This operation requires permissions to perform the rekognition:SearchFacesByImage action.
For a given input image first detects the largest face in the image and then searches the specified collection for matching faces . The operation compares the features of the input face with faces in the specified collection . To search for all faces in an input image you might first call the operation and then use the face IDs returned in subsequent calls to the operation . You can also call the DetectFaces operation and use the bounding boxes in the response to make face crops which then you can pass in to the SearchFacesByImage operation . You pass the input image either as base64 - encoded image bytes or as a reference to an image 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 . The response returns an array of faces that match ordered by similarity score with the highest similarity first . More specifically it is an array of metadata for each face match found . Along with the metadata the response also includes a similarity indicating how similar the face is to the input face . In the response the operation also returns the bounding box ( and a confidence level that the bounding box contains a face ) of the face that Amazon Rekognition used for the input image . For an example Searching for a Face Using an Image in the Amazon Rekognition Developer Guide . This operation requires permissions to perform the rekognition : SearchFacesByImage action .
fn search_faces_by_image(
        &self,
        input: SearchFacesByImageRequest,
    ) -> RusotoFuture<SearchFacesByImageResponse, SearchFacesByImageError> {
        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.SearchFacesByImage");
        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::<SearchFacesByImageResponse>(
                        String::from_utf8_lossy(body.as_ref()).as_ref(),
                    )
                    .unwrap()
                }))
            } else {
                Box::new(
                    response
                        .buffer()
                        .from_err()
                        .and_then(|response| Err(SearchFacesByImageError::from_response(response))),
                )
            }
        })
    }
fn search_faces_by_image ( & self , input : SearchFacesByImageRequest , ) -> RusotoFuture < SearchFacesByImageResponse , SearchFacesByImageError > { 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 :: < SearchFacesByImageResponse > ( String :: from_utf8_lossy ( body . as_ref ( ) ) . as_ref ( ) , ) . unwrap ( ) } ) ) } else { Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | Err ( SearchFacesByImageError :: from_response ( response ) ) ) , ) } } ) }
<p>For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces.
<p > For a given input image first detects the largest face in the image and then searches the specified collection for matching faces .
&self
input
SearchFacesByImageRequest
&self
input
SearchFacesByImageRequest