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.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 in descending order. For each face match, the response provides a bounding box of the face, facial landmarks, pose details (pitch, role, and yaw), quality (brightness and sharpness), 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.

CompareFaces also returns an array of faces that don't match the source image. For each face, it returns a bounding box, confidence value, landmarks, pose details, and quality. The response also returns information about the face in the source image, including the bounding box of the face and confidence value.

If the image doesn't contain Exif metadata, CompareFaces returns orientation information for the source and target images. Use these values to display the images with the correct image orientation.

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 face matches that a match must meet to be included in the FaceMatches array.
  • cfSourceImage - The source image, either as bytes or as an S3 object.
  • cfTargetImage - The target image, either as bytes or as an 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 # 
ToQuery CompareFaces Source # 
ToPath CompareFaces Source # 
ToHeaders CompareFaces Source # 
type Rep CompareFaces Source # 
type Rep CompareFaces = D1 (MetaData "CompareFaces" "Network.AWS.Rekognition.CompareFaces" "amazonka-rekognition-1.5.0-B4jtpxqOYsT3vpCV9vDK91" 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 face matches that a match must meet to be included in the FaceMatches array.

cfSourceImage :: Lens' CompareFaces Image Source #

The source image, either as bytes or as an S3 object.

cfTargetImage :: Lens' CompareFaces Image Source #

The target image, either as bytes or as an 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 - An array of faces in the target image that match the source image face. Each CompareFacesMatch object provides the bounding box, the confidence level that the bounding box contains a face, and the similarity score for the face in the bounding box and the face in the source image.
  • cfrsUnmatchedFaces - An array of faces in the target image that did not match the source image face.
  • cfrsTargetImageOrientationCorrection - The orientation of the target image (in counterclockwise direction). If your application displays the target image, you can use this value to correct the orientation of the image. The bounding box coordinates returned in FaceMatches and UnmatchedFaces represent face locations before the image orientation is corrected.
  • cfrsSourceImageOrientationCorrection - The orientation of the source image (counterclockwise direction). If your application displays the source image, you can use this value to correct image orientation. The bounding box coordinates returned in SourceImageFace represent the location of the face before the image orientation is corrected.
  • cfrsSourceImageFace - The face in 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.5.0-B4jtpxqOYsT3vpCV9vDK91" False) (C1 (MetaCons "CompareFacesResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_cfrsFaceMatches") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [CompareFacesMatch]))) ((:*:) (S1 (MetaSel (Just Symbol "_cfrsUnmatchedFaces") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [ComparedFace]))) (S1 (MetaSel (Just Symbol "_cfrsTargetImageOrientationCorrection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe OrientationCorrection))))) ((:*:) (S1 (MetaSel (Just Symbol "_cfrsSourceImageOrientationCorrection") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe OrientationCorrection))) ((:*:) (S1 (MetaSel (Just Symbol "_cfrsSourceImageFace") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ComparedSourceImageFace))) (S1 (MetaSel (Just Symbol "_cfrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))))

Response Lenses

cfrsFaceMatches :: Lens' CompareFacesResponse [CompareFacesMatch] Source #

An array of faces in the target image that match the source image face. Each CompareFacesMatch object provides the bounding box, the confidence level that the bounding box contains a face, and the similarity score for the face in the bounding box and the face in the source image.

cfrsUnmatchedFaces :: Lens' CompareFacesResponse [ComparedFace] Source #

An array of faces in the target image that did not match the source image face.

cfrsTargetImageOrientationCorrection :: Lens' CompareFacesResponse (Maybe OrientationCorrection) Source #

The orientation of the target image (in counterclockwise direction). If your application displays the target image, you can use this value to correct the orientation of the image. The bounding box coordinates returned in FaceMatches and UnmatchedFaces represent face locations before the image orientation is corrected.

cfrsSourceImageOrientationCorrection :: Lens' CompareFacesResponse (Maybe OrientationCorrection) Source #

The orientation of the source image (counterclockwise direction). If your application displays the source image, you can use this value to correct image orientation. The bounding box coordinates returned in SourceImageFace represent the location of the face before the image orientation is corrected.

cfrsSourceImageFace :: Lens' CompareFacesResponse (Maybe ComparedSourceImageFace) Source #

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

cfrsResponseStatus :: Lens' CompareFacesResponse Int Source #

  • - | The response status code.