amazonka-rekognition-1.6.1: 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.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.

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.

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 'search-face-with-image-procedure' .

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 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 SearchFacesByImage Source #

See: searchFacesByImage smart constructor.

Instances
Eq SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

Data SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

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 # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

Show SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

Generic SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

Associated Types

type Rep SearchFacesByImage :: Type -> Type #

Hashable SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

ToJSON SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

AWSRequest SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

Associated Types

type Rs SearchFacesByImage :: Type #

ToHeaders SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

ToPath SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

ToQuery SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

NFData SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

Methods

rnf :: SearchFacesByImage -> () #

type Rep SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

type Rep SearchFacesByImage = D1 (MetaData "SearchFacesByImage" "Network.AWS.Rekognition.SearchFacesByImage" "amazonka-rekognition-1.6.1-ELwOF0LSGWFp8S3Ef6QMe" False) (C1 (MetaCons "SearchFacesByImage'" PrefixI True) ((S1 (MetaSel (Just "_sfbiFaceMatchThreshold") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Double)) :*: S1 (MetaSel (Just "_sfbiMaxFaces") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat))) :*: (S1 (MetaSel (Just "_sfbiCollectionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_sfbiImage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Image))))
type Rs SearchFacesByImage Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

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

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 # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

Data SearchFacesByImageResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

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 # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

Show SearchFacesByImageResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

Generic SearchFacesByImageResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

Associated Types

type Rep SearchFacesByImageResponse :: Type -> Type #

NFData SearchFacesByImageResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

type Rep SearchFacesByImageResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.SearchFacesByImage

type Rep SearchFacesByImageResponse = D1 (MetaData "SearchFacesByImageResponse" "Network.AWS.Rekognition.SearchFacesByImage" "amazonka-rekognition-1.6.1-ELwOF0LSGWFp8S3Ef6QMe" False) (C1 (MetaCons "SearchFacesByImageResponse'" PrefixI True) ((S1 (MetaSel (Just "_sfbirsFaceMatches") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [FaceMatch])) :*: S1 (MetaSel (Just "_sfbirsFaceModelVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_sfbirsSearchedFaceBoundingBox") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe BoundingBox)) :*: (S1 (MetaSel (Just "_sfbirsSearchedFaceConfidence") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Double)) :*: S1 (MetaSel (Just "_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.

sfbirsFaceModelVersion :: Lens' SearchFacesByImageResponse (Maybe Text) Source #

Version number of the face detection model associated with the input collection (CollectionId ).

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.