amazonka-rekognition-1.4.5: Amazon Rekognition SDK.

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

Network.AWS.Rekognition.IndexFaces

Contents

Description

Detects faces in the input image and adds them to the specified collection.

Amazon Rekognition does not save the actual faces detected. Instead, the underlying detection algorithm first detects the faces in the input image, and for each face extracts facial features into a feature vector, and stores it in the back-end database. Amazon Rekognition uses feature vectors when performing face match and search operations using the and operations.

If you provide the optional externalImageID for the input image you provided, Amazon Rekognition associates this ID with all faces that it detects. When you call the operation, the response returns the external ID. You can use this external image ID to create a client-side index to associate the faces with each image. You can then use the index to find all faces in an image.

In response, the operation returns an array of metadata for all detected faces. This includes, the bounding box of the detected face, confidence value (indicating the bounding box contains a face), a face ID assigned by the service for each face that is detected and stored, and an image ID assigned by the service for the input image If you request all facial attributes (using the detectionAttributes parameter, Rekognition returns detailed facial attributes such as facial landmarks (for example, location of eye and mount) and other facial attributes such gender. If you provide the same image, specify the same collection, and use the same external ID in the IndexFaces operation, Rekognition doesn't save duplicate face metadata.

For an example, see example2 .

This operation requires permissions to perform the rekognition:IndexFaces action.

Synopsis

Creating a Request

indexFaces Source #

Creates a value of IndexFaces with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • ifExternalImageId - ID you want to assign to all the faces detected in the image.
  • ifDetectionAttributes - (Optional) Returns detailed attributes of indexed faces. By default, the operation returns a subset of the facial attributes. For example, you can specify the value as, [ALL] or [DEFAULT]. If you provide both, [ALL, DEFAULT], Rekognition uses the logical AND operator to determine which attributes to return (in this case, it is all attributes). If you specify all attributes, the service performs additional detection, in addition to the default.
  • ifCollectionId - ID of an existing collection to which you want to add the faces that are detected in the input images.
  • ifImage - Undocumented member.

data IndexFaces Source #

See: indexFaces smart constructor.

Instances

Eq IndexFaces Source # 
Data IndexFaces Source # 

Methods

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

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

toConstr :: IndexFaces -> Constr #

dataTypeOf :: IndexFaces -> DataType #

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

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

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

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

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

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

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

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

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

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

Read IndexFaces Source # 
Show IndexFaces Source # 
Generic IndexFaces Source # 

Associated Types

type Rep IndexFaces :: * -> * #

Hashable IndexFaces Source # 
ToJSON IndexFaces Source # 
NFData IndexFaces Source # 

Methods

rnf :: IndexFaces -> () #

AWSRequest IndexFaces Source # 
ToPath IndexFaces Source # 
ToHeaders IndexFaces Source # 

Methods

toHeaders :: IndexFaces -> [Header] #

ToQuery IndexFaces Source # 
type Rep IndexFaces Source # 
type Rep IndexFaces = D1 (MetaData "IndexFaces" "Network.AWS.Rekognition.IndexFaces" "amazonka-rekognition-1.4.5-JLr9ZFBNFwFGjCyEdV0gv" False) (C1 (MetaCons "IndexFaces'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_ifExternalImageId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_ifDetectionAttributes") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Attribute])))) ((:*:) (S1 (MetaSel (Just Symbol "_ifCollectionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_ifImage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Image)))))
type Rs IndexFaces Source # 

Request Lenses

ifExternalImageId :: Lens' IndexFaces (Maybe Text) Source #

ID you want to assign to all the faces detected in the image.

ifDetectionAttributes :: Lens' IndexFaces [Attribute] Source #

(Optional) Returns detailed attributes of indexed faces. By default, the operation returns a subset of the facial attributes. For example, you can specify the value as, [ALL] or [DEFAULT]. If you provide both, [ALL, DEFAULT], Rekognition uses the logical AND operator to determine which attributes to return (in this case, it is all attributes). If you specify all attributes, the service performs additional detection, in addition to the default.

ifCollectionId :: Lens' IndexFaces Text Source #

ID of an existing collection to which you want to add the faces that are detected in the input images.

ifImage :: Lens' IndexFaces Image Source #

Undocumented member.

Destructuring the Response

indexFacesResponse Source #

Creates a value of IndexFacesResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • ifrsFaceRecords - An array of faces detected and added to the collection. For more information, see 'howitworks-index-faces' .
  • ifrsOrientationCorrection - The algorithm detects the image orientation. If it detects that the image was rotated, it returns the degree of rotation. You can use this value to correct the orientation and also appropriately analyze the bounding box coordinates that are returned.
  • ifrsResponseStatus - -- | The response status code.

data IndexFacesResponse Source #

See: indexFacesResponse smart constructor.

Instances

Eq IndexFacesResponse Source # 
Data IndexFacesResponse Source # 

Methods

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

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

toConstr :: IndexFacesResponse -> Constr #

dataTypeOf :: IndexFacesResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read IndexFacesResponse Source # 
Show IndexFacesResponse Source # 
Generic IndexFacesResponse Source # 
NFData IndexFacesResponse Source # 

Methods

rnf :: IndexFacesResponse -> () #

type Rep IndexFacesResponse Source # 
type Rep IndexFacesResponse = D1 (MetaData "IndexFacesResponse" "Network.AWS.Rekognition.IndexFaces" "amazonka-rekognition-1.4.5-JLr9ZFBNFwFGjCyEdV0gv" False) (C1 (MetaCons "IndexFacesResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ifrsFaceRecords") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [FaceRecord]))) ((:*:) (S1 (MetaSel (Just Symbol "_ifrsOrientationCorrection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe OrientationCorrection))) (S1 (MetaSel (Just Symbol "_ifrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)))))

Response Lenses

ifrsFaceRecords :: Lens' IndexFacesResponse [FaceRecord] Source #

An array of faces detected and added to the collection. For more information, see 'howitworks-index-faces' .

ifrsOrientationCorrection :: Lens' IndexFacesResponse (Maybe OrientationCorrection) Source #

The algorithm detects the image orientation. If it detects that the image was rotated, it returns the degree of rotation. You can use this value to correct the orientation and also appropriately analyze the bounding box coordinates that are returned.

ifrsResponseStatus :: Lens' IndexFacesResponse Int Source #

  • - | The response status code.