AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the SearchUsersByImage operation. Searches for UserIDs using a supplied image. It first detects the largest face in the image, and then searches a specified collection for matching UserIDs.

The operation returns an array of UserIDs that match the face in the supplied image, ordered by similarity score with the highest similarity first. It also returns a bounding box for the face found in the input image.

Information about faces detected in the supplied image, but not used for the search, is returned in an array of UnsearchedFace objects. If no valid face is detected in the image, the response will contain an empty UserMatches list and no SearchedFace object.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Rekognition.AmazonRekognitionRequest
      Amazon.Rekognition.Model.SearchUsersByImageRequest

Namespace: Amazon.Rekognition.Model
Assembly: AWSSDK.Rekognition.dll
Version: 3.x.y.z

Syntax

C#
public class SearchUsersByImageRequest : AmazonRekognitionRequest
         IAmazonWebServiceRequest

The SearchUsersByImageRequest type exposes the following members

Constructors

NameDescription
Public Method SearchUsersByImageRequest()

Properties

NameTypeDescription
Public Property CollectionId System.String

Gets and sets the property CollectionId.

The ID of an existing collection containing the UserID.

Public Property Image Amazon.Rekognition.Model.Image

Gets and sets the property Image.

Public Property MaxUsers System.Int32

Gets and sets the property MaxUsers.

Maximum number of UserIDs to return.

Public Property QualityFilter Amazon.Rekognition.QualityFilter

Gets and sets the property QualityFilter.

A filter that specifies a quality bar for how much filtering is done to identify faces. Filtered faces aren't searched for in the collection. The default value is NONE.

Public Property UserMatchThreshold System.Single

Gets and sets the property UserMatchThreshold.

Specifies the minimum confidence in the UserID match to return. Default value is 80.

Examples

Searches for UserIDs using a supplied image.

SearchUsersByImage


var client = new AmazonRekognitionClient();
var response = client.SearchUsersByImage(new SearchUsersByImageRequest 
{
    CollectionId = "MyCollection",
    Image = new Image { S3Object = new S3Object {
        Bucket = "bucket",
        Name = "input.jpg"
    } },
    MaxUsers = 2,
    QualityFilter = "MEDIUM",
    UserMatchThreshold = 70
});

string faceModelVersion = response.FaceModelVersion;
SearchedFaceDetails searchedFace = response.SearchedFace;
List<UnsearchedFace> unsearchedFaces = response.UnsearchedFaces;
List<UserMatch> userMatches = response.UserMatches;

            

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5