Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Detects faces within an image (JPEG or PNG) that is provided as input.
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.
For an example, see 'get-started-exercise-detect-faces' .
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
- A list of facial attributes you would like to be returned. By default, the API returns subset of facial attributes. For example, you can specify the value as, [ALL] or [DEFAULT]. If you provide both, [ALL, DEFAULT], the service uses a logical AND operator to determine which attributes to return (in this case, it is all attributes). If you specify all attributes, Rekognition performs additional detection.dfImage
- The image in which you want to detect faces. You can specify a blob or an S3 object.
data DetectFaces Source #
See: detectFaces
smart constructor.
Request Lenses
dfAttributes :: Lens' DetectFaces [Attribute] Source #
A list of facial attributes you would like to be returned. By default, the API returns subset of facial attributes. For example, you can specify the value as, [ALL] or [DEFAULT]. If you provide both, [ALL, DEFAULT], the service uses a logical AND operator to determine which attributes to return (in this case, it is all attributes). If you specify all attributes, Rekognition performs additional detection.
dfImage :: Lens' DetectFaces Image Source #
The image in which you want to detect faces. You can specify a blob or an S3 object.
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 algorithm detects the image orientation. If it detects that the image was rotated, it returns the degrees of rotation. If your application is displaying the image, you can use this value to adjust the orientation. For example, if the service detects that the input image was rotated by 90 degrees, it corrects orientation, performs face detection, and then returns the faces. That is, the bounding box coordinates in the response are based on the corrected orientation.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 algorithm detects the image orientation. If it detects that the image was rotated, it returns the degrees of rotation. If your application is displaying the image, you can use this value to adjust the orientation. For example, if the service detects that the input image was rotated by 90 degrees, it corrects orientation, performs face detection, and then returns the faces. That is, the bounding box coordinates in the response are based on the corrected orientation.
dfrsFaceDetails :: Lens' DetectFacesResponse [FaceDetail] Source #
Details of each face found in the image.
dfrsResponseStatus :: Lens' DetectFacesResponse Int Source #
- - | The response status code.