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 text detection results of a Amazon Rekognition Video analysis started by StartTextDetection.
Text detection with Amazon Rekognition Video is an asynchronous
operation. You start text detection by calling StartTextDetection which
returns a job identifier (JobId
) When the text detection operation
finishes, Amazon Rekognition publishes a completion status to the Amazon
Simple Notification Service topic registered in the initial call to
StartTextDetection
. To get the results of the text detection
operation, first check that the status value published to the Amazon SNS
topic is SUCCEEDED
. if so, call GetTextDetection
and pass the job
identifier (JobId
) from the initial call of StartLabelDetection
.
GetTextDetection
returns an array of detected text (TextDetections
)
sorted by the time the text was detected, up to 50 words per frame of
video.
Each element of the array includes the detected text, the precentage confidence in the acuracy of the detected text, the time the text was detected, bounding box information for where the text was located, and unique identifiers for words and their lines.
Use MaxResults parameter to limit the number of text detections
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 GetTextDetection
and populate the NextToken
request
parameter with the token value returned from the previous call to
GetTextDetection
.
Synopsis
- data GetTextDetection = GetTextDetection' {}
- newGetTextDetection :: Text -> GetTextDetection
- getTextDetection_nextToken :: Lens' GetTextDetection (Maybe Text)
- getTextDetection_maxResults :: Lens' GetTextDetection (Maybe Natural)
- getTextDetection_jobId :: Lens' GetTextDetection Text
- data GetTextDetectionResponse = GetTextDetectionResponse' {}
- newGetTextDetectionResponse :: Int -> GetTextDetectionResponse
- getTextDetectionResponse_textDetections :: Lens' GetTextDetectionResponse (Maybe [TextDetectionResult])
- getTextDetectionResponse_nextToken :: Lens' GetTextDetectionResponse (Maybe Text)
- getTextDetectionResponse_videoMetadata :: Lens' GetTextDetectionResponse (Maybe VideoMetadata)
- getTextDetectionResponse_statusMessage :: Lens' GetTextDetectionResponse (Maybe Text)
- getTextDetectionResponse_textModelVersion :: Lens' GetTextDetectionResponse (Maybe Text)
- getTextDetectionResponse_jobStatus :: Lens' GetTextDetectionResponse (Maybe VideoJobStatus)
- getTextDetectionResponse_httpStatus :: Lens' GetTextDetectionResponse Int
Creating a Request
data GetTextDetection Source #
See: newGetTextDetection
smart constructor.
GetTextDetection' | |
|
Instances
Create a value of GetTextDetection
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:GetTextDetection'
, getTextDetection_nextToken
- If the previous response was incomplete (because there are more labels
to retrieve), Amazon Rekognition Video returns a pagination token in the
response. You can use this pagination token to retrieve the next set of
text.
$sel:maxResults:GetTextDetection'
, getTextDetection_maxResults
- Maximum number of results to return per paginated call. The largest
value you can specify is 1000.
$sel:jobId:GetTextDetection'
, getTextDetection_jobId
- Job identifier for the text detection operation for which you want
results returned. You get the job identifer from an initial call to
StartTextDetection
.
Request Lenses
getTextDetection_nextToken :: Lens' GetTextDetection (Maybe Text) Source #
If the previous response was incomplete (because there are more labels to retrieve), Amazon Rekognition Video returns a pagination token in the response. You can use this pagination token to retrieve the next set of text.
getTextDetection_maxResults :: Lens' GetTextDetection (Maybe Natural) Source #
Maximum number of results to return per paginated call. The largest value you can specify is 1000.
getTextDetection_jobId :: Lens' GetTextDetection Text Source #
Job identifier for the text detection operation for which you want
results returned. You get the job identifer from an initial call to
StartTextDetection
.
Destructuring the Response
data GetTextDetectionResponse Source #
See: newGetTextDetectionResponse
smart constructor.
GetTextDetectionResponse' | |
|
Instances
newGetTextDetectionResponse Source #
Create a value of GetTextDetectionResponse
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:textDetections:GetTextDetectionResponse'
, getTextDetectionResponse_textDetections
- An array of text detected in the video. Each element contains the
detected text, the time in milliseconds from the start of the video that
the text was detected, and where it was detected on the screen.
$sel:nextToken:GetTextDetection'
, getTextDetectionResponse_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 text.
$sel:videoMetadata:GetTextDetectionResponse'
, getTextDetectionResponse_videoMetadata
- Undocumented member.
$sel:statusMessage:GetTextDetectionResponse'
, getTextDetectionResponse_statusMessage
- If the job fails, StatusMessage
provides a descriptive error message.
$sel:textModelVersion:GetTextDetectionResponse'
, getTextDetectionResponse_textModelVersion
- Version number of the text detection model that was used to detect text.
$sel:jobStatus:GetTextDetectionResponse'
, getTextDetectionResponse_jobStatus
- Current status of the text detection job.
$sel:httpStatus:GetTextDetectionResponse'
, getTextDetectionResponse_httpStatus
- The response's http status code.
Response Lenses
getTextDetectionResponse_textDetections :: Lens' GetTextDetectionResponse (Maybe [TextDetectionResult]) Source #
An array of text detected in the video. Each element contains the detected text, the time in milliseconds from the start of the video that the text was detected, and where it was detected on the screen.
getTextDetectionResponse_nextToken :: Lens' GetTextDetectionResponse (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 text.
getTextDetectionResponse_videoMetadata :: Lens' GetTextDetectionResponse (Maybe VideoMetadata) Source #
Undocumented member.
getTextDetectionResponse_statusMessage :: Lens' GetTextDetectionResponse (Maybe Text) Source #
If the job fails, StatusMessage
provides a descriptive error message.
getTextDetectionResponse_textModelVersion :: Lens' GetTextDetectionResponse (Maybe Text) Source #
Version number of the text detection model that was used to detect text.
getTextDetectionResponse_jobStatus :: Lens' GetTextDetectionResponse (Maybe VideoJobStatus) Source #
Current status of the text detection job.
getTextDetectionResponse_httpStatus :: Lens' GetTextDetectionResponse Int Source #
The response's http status code.