コード例 #1
0
        public void RemoveFacesFromCollection(string collectionId, List <string> removedFaces)
        {
            AmazonRekognitionClient rekognitionClient = AmazonClient.GetInstance();

            DeleteFacesRequest deleteFacesRequest = new DeleteFacesRequest()
            {
                CollectionId = collectionId,
                FaceIds      = removedFaces
            };

            DeleteFacesResponse deleteFacesResponse = rekognitionClient.DeleteFaces(deleteFacesRequest);
        }
コード例 #2
0
        public void RekognitionDeleteFaces()
        {
            #region to-delete-a-face-1482182799377

            var client   = new AmazonRekognitionClient();
            var response = client.DeleteFaces(new DeleteFacesRequest
            {
                CollectionId = "myphotos",
                FaceIds      = new List <string> {
                    "ff43d742-0c13-5d16-a3e8-03d3f58e980b"
                }
            });

            List <string> deletedFaces = response.DeletedFaces;

            #endregion
        }
コード例 #3
0
    public static void Example()
    {
        String        collectionId = "MyCollection";
        List <String> faces        = new List <String>()
        {
            "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        };

        AmazonRekognitionClient rekognitionClient = new AmazonRekognitionClient();

        DeleteFacesRequest deleteFacesRequest = new DeleteFacesRequest()
        {
            CollectionId = collectionId,
            FaceIds      = faces
        };

        DeleteFacesResponse deleteFacesResponse = rekognitionClient.DeleteFaces(deleteFacesRequest);

        foreach (String face in deleteFacesResponse.DeletedFaces)
        {
            Console.WriteLine("FaceID: " + face);
        }
    }