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 |
Detects faces within an image that is provided as input.
DetectFaces
detects the 100 largest faces in the image. For each face detected, the operation returns face details including a bounding box of the face, a confidence value (that the bounding box contains a face), and a fixed set of attributes such as facial landmarks (for example, coordinates of eye and mouth), gender, presence of beard, sunglasses, etc.
The face-detection algorithm is most effective on frontal faces. For non-frontal or obscured faces, the algorithm may not detect the faces or might detect faces with lower confidence.
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.
For an example, see 'procedure-detecting-faces-in-images' .
This operation requires permissions to perform the rekognition:DetectFaces
action.
- detectFaces :: Image -> DetectFaces
- data DetectFaces
- dfAttributes :: Lens' DetectFaces [Attribute]
- dfImage :: Lens' DetectFaces Image
- detectFacesResponse :: Int -> DetectFacesResponse
- data DetectFacesResponse
- dfrsOrientationCorrection :: Lens' DetectFacesResponse (Maybe OrientationCorrection)
- dfrsFaceDetails :: Lens' DetectFacesResponse [FaceDetail]
- dfrsResponseStatus :: Lens' DetectFacesResponse Int
Creating a Request
:: Image | |
-> DetectFaces |
Creates a value of DetectFaces
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dfAttributes
- An array of facial attributes you want to be returned. This can be the default list of attributes or all attributes. If you don't specify a value forAttributes
or if you specify[DEFAULT]
, the API returns the following subset of facial attributes:BoundingBox
,Confidence
,Pose
,Quality
andLandmarks
. If you provide[ALL]
, all facial attributes are returned but the operation will take longer to complete. If you provide both,[ALL, DEFAULT]
, the service uses a logical AND operator to determine which attributes to return (in this case, all attributes).dfImage
- 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 DetectFaces Source #
See: detectFaces
smart constructor.
Request Lenses
dfAttributes :: Lens' DetectFaces [Attribute] Source #
An array of facial attributes you want to be returned. This can be the default list of attributes or all attributes. If you don't specify a value for Attributes
or if you specify [DEFAULT]
, the API returns the following subset of facial attributes: BoundingBox
, Confidence
, Pose
, Quality
and Landmarks
. If you provide [ALL]
, all facial attributes are returned but the operation will take longer to complete. If you provide both, [ALL, DEFAULT]
, the service uses a logical AND operator to determine which attributes to return (in this case, all attributes).
dfImage :: Lens' DetectFaces 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
Creates a value of DetectFacesResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dfrsOrientationCorrection
- The orientation of the input image (counter-clockwise direction). If your application displays the image, you can use this value to correct image orientation. The bounding box coordinates returned inFaceDetails
represent face locations before the image orientation is corrected.dfrsFaceDetails
- Details of each face found in the image.dfrsResponseStatus
- -- | The response status code.
data DetectFacesResponse Source #
See: detectFacesResponse
smart constructor.
Response Lenses
dfrsOrientationCorrection :: Lens' DetectFacesResponse (Maybe OrientationCorrection) Source #
The orientation of the input image (counter-clockwise direction). If your application displays the image, you can use this value to correct image orientation. The bounding box coordinates returned in FaceDetails
represent face locations before the image orientation is corrected.
dfrsFaceDetails :: Lens' DetectFacesResponse [FaceDetail] Source #
Details of each face found in the image.
dfrsResponseStatus :: Lens' DetectFacesResponse Int Source #
- - | The response status code.