Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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.
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, see 'search-face-with-image-procedure' .
This operation requires permissions to perform the rekognition:SearchFacesByImage
action.
- searchFacesByImage :: Text -> Image -> SearchFacesByImage
- data SearchFacesByImage
- sfbiFaceMatchThreshold :: Lens' SearchFacesByImage (Maybe Double)
- sfbiMaxFaces :: Lens' SearchFacesByImage (Maybe Natural)
- sfbiCollectionId :: Lens' SearchFacesByImage Text
- sfbiImage :: Lens' SearchFacesByImage Image
- searchFacesByImageResponse :: Int -> SearchFacesByImageResponse
- data SearchFacesByImageResponse
- sfbirsFaceMatches :: Lens' SearchFacesByImageResponse [FaceMatch]
- sfbirsFaceModelVersion :: Lens' SearchFacesByImageResponse (Maybe Text)
- sfbirsSearchedFaceBoundingBox :: Lens' SearchFacesByImageResponse (Maybe BoundingBox)
- sfbirsSearchedFaceConfidence :: Lens' SearchFacesByImageResponse (Maybe Double)
- sfbirsResponseStatus :: Lens' SearchFacesByImageResponse Int
Creating a Request
Creates a value of SearchFacesByImage
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sfbiFaceMatchThreshold
- (Optional) Specifies the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70%.sfbiMaxFaces
- Maximum number of faces to return. The operation returns the maximum number of faces with the highest confidence in the match.sfbiCollectionId
- ID of the collection to search.sfbiImage
- 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.
data SearchFacesByImage Source #
See: searchFacesByImage
smart constructor.
Request Lenses
sfbiFaceMatchThreshold :: Lens' SearchFacesByImage (Maybe Double) Source #
(Optional) Specifies the minimum confidence in the face match to return. For example, don't return any matches where confidence in matches is less than 70%.
sfbiMaxFaces :: Lens' SearchFacesByImage (Maybe Natural) Source #
Maximum number of faces to return. The operation returns the maximum number of faces with the highest confidence in the match.
sfbiCollectionId :: Lens' SearchFacesByImage Text Source #
ID of the collection to search.
sfbiImage :: Lens' SearchFacesByImage Image Source #
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.
Destructuring the Response
searchFacesByImageResponse Source #
Creates a value of SearchFacesByImageResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sfbirsFaceMatches
- An array of faces that match the input face, along with the confidence in the match.sfbirsFaceModelVersion
- Version number of the face detection model associated with the input collection (CollectionId
).sfbirsSearchedFaceBoundingBox
- The bounding box around the face in the input image that Amazon Rekognition used for the search.sfbirsSearchedFaceConfidence
- The level of confidence that thesearchedFaceBoundingBox
, contains a face.sfbirsResponseStatus
- -- | The response status code.
data SearchFacesByImageResponse Source #
See: searchFacesByImageResponse
smart constructor.
Response Lenses
sfbirsFaceMatches :: Lens' SearchFacesByImageResponse [FaceMatch] Source #
An array of faces that match the input face, along with the confidence in the match.
sfbirsFaceModelVersion :: Lens' SearchFacesByImageResponse (Maybe Text) Source #
Version number of the face detection model associated with the input collection (CollectionId
).
sfbirsSearchedFaceBoundingBox :: Lens' SearchFacesByImageResponse (Maybe BoundingBox) Source #
The bounding box around the face in the input image that Amazon Rekognition used for the search.
sfbirsSearchedFaceConfidence :: Lens' SearchFacesByImageResponse (Maybe Double) Source #
The level of confidence that the searchedFaceBoundingBox
, contains a face.
sfbirsResponseStatus :: Lens' SearchFacesByImageResponse Int Source #
- - | The response status code.