Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Returns an array of celebrities recognized in the input image. For more information, see Recognizing Celebrities in the Amazon Rekognition Developer Guide.
RecognizeCelebrities
returns the 64 largest faces in the image. It
lists recognized celebrities in the CelebrityFaces
array and
unrecognized faces in the UnrecognizedFaces
array.
RecognizeCelebrities
doesn't return celebrities whose faces aren't
among the largest 64 faces in the image.
For each celebrity recognized, RecognizeCelebrities
returns a
Celebrity
object. The Celebrity
object contains the celebrity name,
ID, URL links to additional information, match confidence, and a
ComparedFace
object that you can use to locate the celebrity's face
on the image.
Amazon Rekognition doesn't retain information about which images a
celebrity has been recognized in. Your application must store this
information and use the Celebrity
ID property as a unique identifier
for the celebrity. If you don't store the celebrity name or additional
information URLs returned by RecognizeCelebrities
, you will need the
ID to identify the celebrity in a call to the GetCelebrityInfo
operation.
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 AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file.
For an example, see Recognizing Celebrities in an Image in the Amazon Rekognition Developer Guide.
This operation requires permissions to perform the
rekognition:RecognizeCelebrities
operation.
Synopsis
- data RecognizeCelebrities = RecognizeCelebrities' {}
- newRecognizeCelebrities :: Image -> RecognizeCelebrities
- recognizeCelebrities_image :: Lens' RecognizeCelebrities Image
- data RecognizeCelebritiesResponse = RecognizeCelebritiesResponse' {}
- newRecognizeCelebritiesResponse :: Int -> RecognizeCelebritiesResponse
- recognizeCelebritiesResponse_celebrityFaces :: Lens' RecognizeCelebritiesResponse (Maybe [Celebrity])
- recognizeCelebritiesResponse_orientationCorrection :: Lens' RecognizeCelebritiesResponse (Maybe OrientationCorrection)
- recognizeCelebritiesResponse_unrecognizedFaces :: Lens' RecognizeCelebritiesResponse (Maybe [ComparedFace])
- recognizeCelebritiesResponse_httpStatus :: Lens' RecognizeCelebritiesResponse Int
Creating a Request
data RecognizeCelebrities Source #
See: newRecognizeCelebrities
smart constructor.
RecognizeCelebrities' | |
|
Instances
newRecognizeCelebrities Source #
Create a value of RecognizeCelebrities
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:image:RecognizeCelebrities'
, recognizeCelebrities_image
- 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.
If you are using an AWS SDK to call Amazon Rekognition, you might not
need to base64-encode image bytes passed using the Bytes
field. For
more information, see Images in the Amazon Rekognition developer guide.
Request Lenses
recognizeCelebrities_image :: Lens' RecognizeCelebrities 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.
If you are using an AWS SDK to call Amazon Rekognition, you might not
need to base64-encode image bytes passed using the Bytes
field. For
more information, see Images in the Amazon Rekognition developer guide.
Destructuring the Response
data RecognizeCelebritiesResponse Source #
See: newRecognizeCelebritiesResponse
smart constructor.
RecognizeCelebritiesResponse' | |
|
Instances
newRecognizeCelebritiesResponse Source #
Create a value of RecognizeCelebritiesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:celebrityFaces:RecognizeCelebritiesResponse'
, recognizeCelebritiesResponse_celebrityFaces
- Details about each celebrity found in the image. Amazon Rekognition can
detect a maximum of 64 celebrities in an image. Each celebrity object
includes the following attributes: Face
, Confidence
, Emotions
,
Landmarks
, Pose
, Quality
, Smile
, Id
, KnownGender
,
MatchConfidence
, Name
, Urls
.
$sel:orientationCorrection:RecognizeCelebritiesResponse'
, recognizeCelebritiesResponse_orientationCorrection
- Support for estimating image orientation using the the
OrientationCorrection field has ceased as of August 2021. Any returned
values for this field included in an API response will always be NULL.
The orientation of the input image (counterclockwise direction). If your
application displays the image, you can use this value to correct the
orientation. The bounding box coordinates returned in CelebrityFaces
and UnrecognizedFaces
represent face locations before the image
orientation is corrected.
If the input image is in .jpeg format, it might contain exchangeable
image (Exif) metadata that includes the image's orientation. If so, and
the Exif metadata for the input image populates the orientation field,
the value of OrientationCorrection
is null. The CelebrityFaces
and
UnrecognizedFaces
bounding box coordinates represent face locations
after Exif metadata is used to correct the image orientation. Images in
.png format don't contain Exif metadata.
$sel:unrecognizedFaces:RecognizeCelebritiesResponse'
, recognizeCelebritiesResponse_unrecognizedFaces
- Details about each unrecognized face in the image.
$sel:httpStatus:RecognizeCelebritiesResponse'
, recognizeCelebritiesResponse_httpStatus
- The response's http status code.
Response Lenses
recognizeCelebritiesResponse_celebrityFaces :: Lens' RecognizeCelebritiesResponse (Maybe [Celebrity]) Source #
Details about each celebrity found in the image. Amazon Rekognition can
detect a maximum of 64 celebrities in an image. Each celebrity object
includes the following attributes: Face
, Confidence
, Emotions
,
Landmarks
, Pose
, Quality
, Smile
, Id
, KnownGender
,
MatchConfidence
, Name
, Urls
.
recognizeCelebritiesResponse_orientationCorrection :: Lens' RecognizeCelebritiesResponse (Maybe OrientationCorrection) Source #
Support for estimating image orientation using the the OrientationCorrection field has ceased as of August 2021. Any returned values for this field included in an API response will always be NULL.
The orientation of the input image (counterclockwise direction). If your
application displays the image, you can use this value to correct the
orientation. The bounding box coordinates returned in CelebrityFaces
and UnrecognizedFaces
represent face locations before the image
orientation is corrected.
If the input image is in .jpeg format, it might contain exchangeable
image (Exif) metadata that includes the image's orientation. If so, and
the Exif metadata for the input image populates the orientation field,
the value of OrientationCorrection
is null. The CelebrityFaces
and
UnrecognizedFaces
bounding box coordinates represent face locations
after Exif metadata is used to correct the image orientation. Images in
.png format don't contain Exif metadata.
recognizeCelebritiesResponse_unrecognizedFaces :: Lens' RecognizeCelebritiesResponse (Maybe [ComparedFace]) Source #
Details about each unrecognized face in the image.
recognizeCelebritiesResponse_httpStatus :: Lens' RecognizeCelebritiesResponse Int Source #
The response's http status code.