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 |
Gets the celebrity recognition results for a Amazon Rekognition Video analysis started by StartCelebrityRecognition.
Celebrity recognition in a video is an asynchronous operation. Analysis
is started by a call to StartCelebrityRecognition which returns a job
identifier (JobId
). When the celebrity recognition operation finishes,
Amazon Rekognition Video publishes a completion status to the Amazon
Simple Notification Service topic registered in the initial call to
StartCelebrityRecognition
. To get the results of the celebrity
recognition analysis, first check that the status value published to the
Amazon SNS topic is SUCCEEDED
. If so, call GetCelebrityDetection
and
pass the job identifier (JobId
) from the initial call to
StartCelebrityDetection
.
For more information, see Working With Stored Videos in the Amazon Rekognition Developer Guide.
GetCelebrityRecognition
returns detected celebrities and the time(s)
they are detected in an array (Celebrities
) of CelebrityRecognition
objects. Each CelebrityRecognition
contains information about the
celebrity in a CelebrityDetail object and the time, Timestamp
, the
celebrity was detected.
GetCelebrityRecognition
only returns the default facial attributes
(BoundingBox
, Confidence
, Landmarks
, Pose
, and Quality
). The
other facial attributes listed in the Face
object of the following
response syntax are not returned. For more information, see FaceDetail
in the Amazon Rekognition Developer Guide.
By default, the Celebrities
array is sorted by time (milliseconds from
the start of the video). You can also sort the array by celebrity by
specifying the value ID
in the SortBy
input parameter.
The CelebrityDetail
object includes the celebrity identifer and
additional information urls. If you don't store the additional
information urls, you can get them later by calling GetCelebrityInfo
with the celebrity identifer.
No information is returned for faces not recognized as celebrities.
Use MaxResults parameter to limit the number of labels returned. If
there are more results than specified in MaxResults
, the value of
NextToken
in the operation response contains a pagination token for
getting the next set of results. To get the next page of results, call
GetCelebrityDetection
and populate the NextToken
request parameter
with the token value returned from the previous call to
GetCelebrityRecognition
.
Synopsis
- data GetCelebrityRecognition = GetCelebrityRecognition' {}
- newGetCelebrityRecognition :: Text -> GetCelebrityRecognition
- getCelebrityRecognition_nextToken :: Lens' GetCelebrityRecognition (Maybe Text)
- getCelebrityRecognition_maxResults :: Lens' GetCelebrityRecognition (Maybe Natural)
- getCelebrityRecognition_sortBy :: Lens' GetCelebrityRecognition (Maybe CelebrityRecognitionSortBy)
- getCelebrityRecognition_jobId :: Lens' GetCelebrityRecognition Text
- data GetCelebrityRecognitionResponse = GetCelebrityRecognitionResponse' {}
- newGetCelebrityRecognitionResponse :: Int -> GetCelebrityRecognitionResponse
- getCelebrityRecognitionResponse_nextToken :: Lens' GetCelebrityRecognitionResponse (Maybe Text)
- getCelebrityRecognitionResponse_videoMetadata :: Lens' GetCelebrityRecognitionResponse (Maybe VideoMetadata)
- getCelebrityRecognitionResponse_statusMessage :: Lens' GetCelebrityRecognitionResponse (Maybe Text)
- getCelebrityRecognitionResponse_celebrities :: Lens' GetCelebrityRecognitionResponse (Maybe [CelebrityRecognition])
- getCelebrityRecognitionResponse_jobStatus :: Lens' GetCelebrityRecognitionResponse (Maybe VideoJobStatus)
- getCelebrityRecognitionResponse_httpStatus :: Lens' GetCelebrityRecognitionResponse Int
Creating a Request
data GetCelebrityRecognition Source #
See: newGetCelebrityRecognition
smart constructor.
GetCelebrityRecognition' | |
|
Instances
newGetCelebrityRecognition Source #
Create a value of GetCelebrityRecognition
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:nextToken:GetCelebrityRecognition'
, getCelebrityRecognition_nextToken
- If the previous response was incomplete (because there is more
recognized celebrities to retrieve), Amazon Rekognition Video returns a
pagination token in the response. You can use this pagination token to
retrieve the next set of celebrities.
$sel:maxResults:GetCelebrityRecognition'
, getCelebrityRecognition_maxResults
- Maximum number of results to return per paginated call. The largest
value you can specify is 1000. If you specify a value greater than 1000,
a maximum of 1000 results is returned. The default value is 1000.
$sel:sortBy:GetCelebrityRecognition'
, getCelebrityRecognition_sortBy
- Sort to use for celebrities returned in Celebrities
field. Specify
ID
to sort by the celebrity identifier, specify TIMESTAMP
to sort by
the time the celebrity was recognized.
$sel:jobId:GetCelebrityRecognition'
, getCelebrityRecognition_jobId
- Job identifier for the required celebrity recognition analysis. You can
get the job identifer from a call to StartCelebrityRecognition
.
Request Lenses
getCelebrityRecognition_nextToken :: Lens' GetCelebrityRecognition (Maybe Text) Source #
If the previous response was incomplete (because there is more recognized celebrities to retrieve), Amazon Rekognition Video returns a pagination token in the response. You can use this pagination token to retrieve the next set of celebrities.
getCelebrityRecognition_maxResults :: Lens' GetCelebrityRecognition (Maybe Natural) Source #
Maximum number of results to return per paginated call. The largest value you can specify is 1000. If you specify a value greater than 1000, a maximum of 1000 results is returned. The default value is 1000.
getCelebrityRecognition_sortBy :: Lens' GetCelebrityRecognition (Maybe CelebrityRecognitionSortBy) Source #
Sort to use for celebrities returned in Celebrities
field. Specify
ID
to sort by the celebrity identifier, specify TIMESTAMP
to sort by
the time the celebrity was recognized.
getCelebrityRecognition_jobId :: Lens' GetCelebrityRecognition Text Source #
Job identifier for the required celebrity recognition analysis. You can
get the job identifer from a call to StartCelebrityRecognition
.
Destructuring the Response
data GetCelebrityRecognitionResponse Source #
See: newGetCelebrityRecognitionResponse
smart constructor.
GetCelebrityRecognitionResponse' | |
|
Instances
newGetCelebrityRecognitionResponse Source #
Create a value of GetCelebrityRecognitionResponse
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:nextToken:GetCelebrityRecognition'
, getCelebrityRecognitionResponse_nextToken
- If the response is truncated, Amazon Rekognition Video returns this
token that you can use in the subsequent request to retrieve the next
set of celebrities.
$sel:videoMetadata:GetCelebrityRecognitionResponse'
, getCelebrityRecognitionResponse_videoMetadata
- Information about a video that Amazon Rekognition Video analyzed.
Videometadata
is returned in every page of paginated responses from a
Amazon Rekognition Video operation.
$sel:statusMessage:GetCelebrityRecognitionResponse'
, getCelebrityRecognitionResponse_statusMessage
- If the job fails, StatusMessage
provides a descriptive error message.
$sel:celebrities:GetCelebrityRecognitionResponse'
, getCelebrityRecognitionResponse_celebrities
- Array of celebrities recognized in the video.
$sel:jobStatus:GetCelebrityRecognitionResponse'
, getCelebrityRecognitionResponse_jobStatus
- The current status of the celebrity recognition job.
$sel:httpStatus:GetCelebrityRecognitionResponse'
, getCelebrityRecognitionResponse_httpStatus
- The response's http status code.
Response Lenses
getCelebrityRecognitionResponse_nextToken :: Lens' GetCelebrityRecognitionResponse (Maybe Text) Source #
If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of celebrities.
getCelebrityRecognitionResponse_videoMetadata :: Lens' GetCelebrityRecognitionResponse (Maybe VideoMetadata) Source #
Information about a video that Amazon Rekognition Video analyzed.
Videometadata
is returned in every page of paginated responses from a
Amazon Rekognition Video operation.
getCelebrityRecognitionResponse_statusMessage :: Lens' GetCelebrityRecognitionResponse (Maybe Text) Source #
If the job fails, StatusMessage
provides a descriptive error message.
getCelebrityRecognitionResponse_celebrities :: Lens' GetCelebrityRecognitionResponse (Maybe [CelebrityRecognition]) Source #
Array of celebrities recognized in the video.
getCelebrityRecognitionResponse_jobStatus :: Lens' GetCelebrityRecognitionResponse (Maybe VideoJobStatus) Source #
The current status of the celebrity recognition job.
getCelebrityRecognitionResponse_httpStatus :: Lens' GetCelebrityRecognitionResponse Int Source #
The response's http status code.