Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
Gets the person tracking results of a Rekognition Video analysis started by .
The person detection operation is started by a call to StartPersonTracking
which returns a job identifier (JobId
). When the person detection operation finishes, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartPersonTracking
.
To get the results of the person tracking operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED
. If so, call and pass the job identifier (JobId
) from the initial call to StartPersonTracking
.
GetPersonTracking
returns an array, Persons
, of tracked persons and the time(s) they were tracked in the video.
By default, the array is sorted by the time(s) a person is tracked in the video. You can sort by tracked persons by specifying INDEX
for the SortBy
input parameter.
Use the MaxResults
parameter to limit the number of items 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 GetPersonTracking
and populate the NextToken
request parameter with the token value returned from the previous call to GetPersonTracking
.
Synopsis
- getPersonTracking :: Text -> GetPersonTracking
- data GetPersonTracking
- gptNextToken :: Lens' GetPersonTracking (Maybe Text)
- gptMaxResults :: Lens' GetPersonTracking (Maybe Natural)
- gptSortBy :: Lens' GetPersonTracking (Maybe PersonTrackingSortBy)
- gptJobId :: Lens' GetPersonTracking Text
- getPersonTrackingResponse :: Int -> GetPersonTrackingResponse
- data GetPersonTrackingResponse
- gptrsNextToken :: Lens' GetPersonTrackingResponse (Maybe Text)
- gptrsVideoMetadata :: Lens' GetPersonTrackingResponse (Maybe VideoMetadata)
- gptrsStatusMessage :: Lens' GetPersonTrackingResponse (Maybe Text)
- gptrsJobStatus :: Lens' GetPersonTrackingResponse (Maybe VideoJobStatus)
- gptrsPersons :: Lens' GetPersonTrackingResponse [PersonDetection]
- gptrsResponseStatus :: Lens' GetPersonTrackingResponse Int
Creating a Request
Creates a value of GetPersonTracking
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gptNextToken
- If the previous response was incomplete (because there are more persons to retrieve), Rekognition Video returns a pagination token in the response. You can use this pagination token to retrieve the next set of persons.gptMaxResults
- 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.gptSortBy
- Sort to use for elements in thePersons
array. UseTIMESTAMP
to sort array elements by the time persons are detected. UseINDEX
to sort by the tracked persons. If you sort byINDEX
, the array elements for each person are sorted by detection confidence. The default sort is byTIMESTAMP
.gptJobId
- The identifier for a job that tracks persons in a video. You get theJobId
from a call toStartPersonTracking
.
data GetPersonTracking Source #
See: getPersonTracking
smart constructor.
Instances
Request Lenses
gptNextToken :: Lens' GetPersonTracking (Maybe Text) Source #
If the previous response was incomplete (because there are more persons to retrieve), Rekognition Video returns a pagination token in the response. You can use this pagination token to retrieve the next set of persons.
gptMaxResults :: Lens' GetPersonTracking (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.
gptSortBy :: Lens' GetPersonTracking (Maybe PersonTrackingSortBy) Source #
Sort to use for elements in the Persons
array. Use TIMESTAMP
to sort array elements by the time persons are detected. Use INDEX
to sort by the tracked persons. If you sort by INDEX
, the array elements for each person are sorted by detection confidence. The default sort is by TIMESTAMP
.
gptJobId :: Lens' GetPersonTracking Text Source #
The identifier for a job that tracks persons in a video. You get the JobId
from a call to StartPersonTracking
.
Destructuring the Response
getPersonTrackingResponse Source #
Creates a value of GetPersonTrackingResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gptrsNextToken
- If the response is truncated, Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of persons.gptrsVideoMetadata
- Information about a video that Rekognition Video analyzed.Videometadata
is returned in every page of paginated responses from a Rekognition Video operation.gptrsStatusMessage
- If the job fails,StatusMessage
provides a descriptive error message.gptrsJobStatus
- The current status of the person tracking job.gptrsPersons
- An array of the persons detected in the video and the times they are tracked throughout the video. An array element will exist for each time the person is tracked.gptrsResponseStatus
- -- | The response status code.
data GetPersonTrackingResponse Source #
See: getPersonTrackingResponse
smart constructor.
Instances
Response Lenses
gptrsNextToken :: Lens' GetPersonTrackingResponse (Maybe Text) Source #
If the response is truncated, Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of persons.
gptrsVideoMetadata :: Lens' GetPersonTrackingResponse (Maybe VideoMetadata) Source #
Information about a video that Rekognition Video analyzed. Videometadata
is returned in every page of paginated responses from a Rekognition Video operation.
gptrsStatusMessage :: Lens' GetPersonTrackingResponse (Maybe Text) Source #
If the job fails, StatusMessage
provides a descriptive error message.
gptrsJobStatus :: Lens' GetPersonTrackingResponse (Maybe VideoJobStatus) Source #
The current status of the person tracking job.
gptrsPersons :: Lens' GetPersonTrackingResponse [PersonDetection] Source #
An array of the persons detected in the video and the times they are tracked throughout the video. An array element will exist for each time the person is tracked.
gptrsResponseStatus :: Lens' GetPersonTrackingResponse Int Source #
- - | The response status code.