amazonka-rekognition-1.5.0: Amazon Rekognition SDK.

Copyright(c) 2013-2017 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.SearchFacesByImage

Contents

Description

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.

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

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

Synopsis

Creating a Request

searchFacesByImage Source #

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 bytes or an S3 object.

data SearchFacesByImage Source #

See: searchFacesByImage smart constructor.

Instances

Eq SearchFacesByImage Source # 
Data SearchFacesByImage Source # 

Methods

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

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

toConstr :: SearchFacesByImage -> Constr #

dataTypeOf :: SearchFacesByImage -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SearchFacesByImage Source # 
Show SearchFacesByImage Source # 
Generic SearchFacesByImage Source # 
Hashable SearchFacesByImage Source # 
ToJSON SearchFacesByImage Source # 
NFData SearchFacesByImage Source # 

Methods

rnf :: SearchFacesByImage -> () #

AWSRequest SearchFacesByImage Source # 
ToQuery SearchFacesByImage Source # 
ToPath SearchFacesByImage Source # 
ToHeaders SearchFacesByImage Source # 
type Rep SearchFacesByImage Source # 
type Rep SearchFacesByImage = D1 (MetaData "SearchFacesByImage" "Network.AWS.Rekognition.SearchFacesByImage" "amazonka-rekognition-1.5.0-B4jtpxqOYsT3vpCV9vDK91" False) (C1 (MetaCons "SearchFacesByImage'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_sfbiFaceMatchThreshold") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Double))) (S1 (MetaSel (Just Symbol "_sfbiMaxFaces") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat)))) ((:*:) (S1 (MetaSel (Just Symbol "_sfbiCollectionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_sfbiImage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Image)))))
type Rs SearchFacesByImage Source # 

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 bytes or an S3 object.

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:

data SearchFacesByImageResponse Source #

See: searchFacesByImageResponse smart constructor.

Instances

Eq SearchFacesByImageResponse Source # 
Data SearchFacesByImageResponse Source # 

Methods

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

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

toConstr :: SearchFacesByImageResponse -> Constr #

dataTypeOf :: SearchFacesByImageResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SearchFacesByImageResponse Source # 
Show SearchFacesByImageResponse Source # 
Generic SearchFacesByImageResponse Source # 
NFData SearchFacesByImageResponse Source # 
type Rep SearchFacesByImageResponse Source # 
type Rep SearchFacesByImageResponse = D1 (MetaData "SearchFacesByImageResponse" "Network.AWS.Rekognition.SearchFacesByImage" "amazonka-rekognition-1.5.0-B4jtpxqOYsT3vpCV9vDK91" False) (C1 (MetaCons "SearchFacesByImageResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_sfbirsFaceMatches") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [FaceMatch]))) (S1 (MetaSel (Just Symbol "_sfbirsSearchedFaceBoundingBox") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe BoundingBox)))) ((:*:) (S1 (MetaSel (Just Symbol "_sfbirsSearchedFaceConfidence") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Double))) (S1 (MetaSel (Just Symbol "_sfbirsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

sfbirsFaceMatches :: Lens' SearchFacesByImageResponse [FaceMatch] Source #

An array of faces that match the input face, along with the confidence in the match.

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.