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

Contents

Description

Compares a face in the source input image with each face detected in the target input image.

In response, the operation returns an array of face matches ordered by similarity score with the highest similarity scores first. For each face match, the response provides a bounding box of the face and confidence value (indicating the level of confidence that the bounding box contains a face). The response also provides a similarity score, which indicates how closely the faces match.

In addition to the face matches, the response returns information about the face in the source image, including the bounding box of the face and confidence value.

For an example, see 'get-started-exercise-compare-faces'

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

Synopsis

Creating a Request

compareFaces #

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

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

  • cfSimilarityThreshold - The minimum level of confidence in the match you want included in the result.
  • cfSourceImage - Source image either as bytes or an Amazon S3 object
  • cfTargetImage - Target image either as bytes or an Amazon S3 object

data CompareFaces #

See: compareFaces smart constructor.

Instances

Eq CompareFaces # 
Data CompareFaces # 

Methods

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

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

toConstr :: CompareFaces -> Constr #

dataTypeOf :: CompareFaces -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CompareFaces # 
Show CompareFaces # 
Generic CompareFaces # 

Associated Types

type Rep CompareFaces :: * -> * #

Hashable CompareFaces # 
ToJSON CompareFaces # 
NFData CompareFaces # 

Methods

rnf :: CompareFaces -> () #

AWSRequest CompareFaces # 
ToQuery CompareFaces # 
ToPath CompareFaces # 
ToHeaders CompareFaces # 
type Rep CompareFaces # 
type Rep CompareFaces = D1 (MetaData "CompareFaces" "Network.AWS.Rekognition.CompareFaces" "amazonka-rekognition-1.4.5-7kQQXfpD3s0BAUEtxNCePO" False) (C1 (MetaCons "CompareFaces'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cfSimilarityThreshold") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Double))) ((:*:) (S1 (MetaSel (Just Symbol "_cfSourceImage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Image)) (S1 (MetaSel (Just Symbol "_cfTargetImage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Image)))))
type Rs CompareFaces # 

Request Lenses

cfSimilarityThreshold :: Lens' CompareFaces (Maybe Double) #

The minimum level of confidence in the match you want included in the result.

cfSourceImage :: Lens' CompareFaces Image #

Source image either as bytes or an Amazon S3 object

cfTargetImage :: Lens' CompareFaces Image #

Target image either as bytes or an Amazon S3 object

Destructuring the Response

compareFacesResponse #

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

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

  • cfrsFaceMatches - Provides an array of CompareFacesMatch objects. Each object provides the bounding box, confidence that the bounding box contains a face, and the similarity between the face in the bounding box and the face in the source image.
  • cfrsSourceImageFace - The face from the source image that was used for comparison.
  • cfrsResponseStatus - -- | The response status code.

data CompareFacesResponse #

See: compareFacesResponse smart constructor.

Instances

Eq CompareFacesResponse # 
Data CompareFacesResponse # 

Methods

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

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

toConstr :: CompareFacesResponse -> Constr #

dataTypeOf :: CompareFacesResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CompareFacesResponse # 
Show CompareFacesResponse # 
Generic CompareFacesResponse # 
NFData CompareFacesResponse # 

Methods

rnf :: CompareFacesResponse -> () #

type Rep CompareFacesResponse # 
type Rep CompareFacesResponse = D1 (MetaData "CompareFacesResponse" "Network.AWS.Rekognition.CompareFaces" "amazonka-rekognition-1.4.5-7kQQXfpD3s0BAUEtxNCePO" False) (C1 (MetaCons "CompareFacesResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cfrsFaceMatches") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [CompareFacesMatch]))) ((:*:) (S1 (MetaSel (Just Symbol "_cfrsSourceImageFace") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ComparedSourceImageFace))) (S1 (MetaSel (Just Symbol "_cfrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)))))

Response Lenses

cfrsFaceMatches :: Lens' CompareFacesResponse [CompareFacesMatch] #

Provides an array of CompareFacesMatch objects. Each object provides the bounding box, confidence that the bounding box contains a face, and the similarity between the face in the bounding box and the face in the source image.

cfrsSourceImageFace :: Lens' CompareFacesResponse (Maybe ComparedSourceImageFace) #

The face from the source image that was used for comparison.

cfrsResponseStatus :: Lens' CompareFacesResponse Int #

  • - | The response status code.