amazonka-rekognition-1.6.0: Amazon Rekognition SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Rekognition.DetectFaces

Contents

Description

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.

Synopsis

Creating a Request

detectFaces Source #

Arguments

:: Image

dfImage

-> 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 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 - 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.

Instances

Eq DetectFaces Source # 
Data DetectFaces Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DetectFaces -> c DetectFaces #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DetectFaces #

toConstr :: DetectFaces -> Constr #

dataTypeOf :: DetectFaces -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DetectFaces) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DetectFaces) #

gmapT :: (forall b. Data b => b -> b) -> DetectFaces -> DetectFaces #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DetectFaces -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DetectFaces -> r #

gmapQ :: (forall d. Data d => d -> u) -> DetectFaces -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DetectFaces -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DetectFaces -> m DetectFaces #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectFaces -> m DetectFaces #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectFaces -> m DetectFaces #

Read DetectFaces Source # 
Show DetectFaces Source # 
Generic DetectFaces Source # 

Associated Types

type Rep DetectFaces :: * -> * #

Hashable DetectFaces Source # 
ToJSON DetectFaces Source # 
NFData DetectFaces Source # 

Methods

rnf :: DetectFaces -> () #

AWSRequest DetectFaces Source # 
ToHeaders DetectFaces Source # 

Methods

toHeaders :: DetectFaces -> [Header] #

ToPath DetectFaces Source # 
ToQuery DetectFaces Source # 
type Rep DetectFaces Source # 
type Rep DetectFaces = D1 * (MetaData "DetectFaces" "Network.AWS.Rekognition.DetectFaces" "amazonka-rekognition-1.6.0-3jgXZy5HWud2mYhTRx5OTT" False) (C1 * (MetaCons "DetectFaces'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_dfAttributes") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [Attribute]))) (S1 * (MetaSel (Just Symbol "_dfImage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Image))))
type Rs DetectFaces Source # 

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

detectFacesResponse Source #

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 in FaceDetails 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.

Instances

Eq DetectFacesResponse Source # 
Data DetectFacesResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DetectFacesResponse -> c DetectFacesResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DetectFacesResponse #

toConstr :: DetectFacesResponse -> Constr #

dataTypeOf :: DetectFacesResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DetectFacesResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DetectFacesResponse) #

gmapT :: (forall b. Data b => b -> b) -> DetectFacesResponse -> DetectFacesResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DetectFacesResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DetectFacesResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> DetectFacesResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DetectFacesResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DetectFacesResponse -> m DetectFacesResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectFacesResponse -> m DetectFacesResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DetectFacesResponse -> m DetectFacesResponse #

Read DetectFacesResponse Source # 
Show DetectFacesResponse Source # 
Generic DetectFacesResponse Source # 
NFData DetectFacesResponse Source # 

Methods

rnf :: DetectFacesResponse -> () #

type Rep DetectFacesResponse Source # 
type Rep DetectFacesResponse = D1 * (MetaData "DetectFacesResponse" "Network.AWS.Rekognition.DetectFaces" "amazonka-rekognition-1.6.0-3jgXZy5HWud2mYhTRx5OTT" False) (C1 * (MetaCons "DetectFacesResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_dfrsOrientationCorrection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe OrientationCorrection))) ((:*:) * (S1 * (MetaSel (Just Symbol "_dfrsFaceDetails") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [FaceDetail]))) (S1 * (MetaSel (Just Symbol "_dfrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))

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.