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

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

See: compareFaces smart constructor.

Instances

Eq CompareFaces Source # 
Data CompareFaces Source # 

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 Source # 
Show CompareFaces Source # 
Generic CompareFaces Source # 

Associated Types

type Rep CompareFaces :: * -> * #

Hashable CompareFaces Source # 
ToJSON CompareFaces Source # 
NFData CompareFaces Source # 

Methods

rnf :: CompareFaces -> () #

AWSRequest CompareFaces Source # 
ToPath CompareFaces Source # 
ToHeaders CompareFaces Source # 
ToQuery CompareFaces Source # 
type Rep CompareFaces Source # 
type Rep CompareFaces = D1 (MetaData "CompareFaces" "Network.AWS.Rekognition.CompareFaces" "amazonka-rekognition-1.4.5-JLr9ZFBNFwFGjCyEdV0gv" 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 Source # 

Request Lenses

cfSimilarityThreshold :: Lens' CompareFaces (Maybe Double) Source #

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

cfSourceImage :: Lens' CompareFaces Image Source #

Source image either as bytes or an Amazon S3 object

cfTargetImage :: Lens' CompareFaces Image Source #

Target image either as bytes or an Amazon S3 object

Destructuring the Response

compareFacesResponse Source #

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

See: compareFacesResponse smart constructor.

Instances

Eq CompareFacesResponse Source # 
Data CompareFacesResponse Source # 

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 Source # 
Show CompareFacesResponse Source # 
Generic CompareFacesResponse Source # 
NFData CompareFacesResponse Source # 

Methods

rnf :: CompareFacesResponse -> () #

type Rep CompareFacesResponse Source # 
type Rep CompareFacesResponse = D1 (MetaData "CompareFacesResponse" "Network.AWS.Rekognition.CompareFaces" "amazonka-rekognition-1.4.5-JLr9ZFBNFwFGjCyEdV0gv" 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] Source #

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

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

cfrsResponseStatus :: Lens' CompareFacesResponse Int Source #

  • - | The response status code.