libZSservicesZSamazonka-rekognitionZSamazonka-rekognition
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Rekognition.GetTextDetection

Description

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

Creating a Request

data GetTextDetection Source #

See: newGetTextDetection smart constructor.

Constructors

GetTextDetection' 

Fields

  • nextToken :: Maybe Text

    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.

  • maxResults :: Maybe Natural

    Maximum number of results to return per paginated call. The largest value you can specify is 1000.

  • jobId :: Text

    Job identifier for the text detection operation for which you want results returned. You get the job identifer from an initial call to StartTextDetection.

Instances

Instances details
Eq GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Read GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Show GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Generic GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Associated Types

type Rep GetTextDetection :: Type -> Type #

NFData GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Methods

rnf :: GetTextDetection -> () #

Hashable GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

ToJSON GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

AWSRequest GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Associated Types

type AWSResponse GetTextDetection #

ToHeaders GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

ToPath GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

ToQuery GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

type Rep GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

type Rep GetTextDetection = D1 ('MetaData "GetTextDetection" "Amazonka.Rekognition.GetTextDetection" "libZSservicesZSamazonka-rekognitionZSamazonka-rekognition" 'False) (C1 ('MetaCons "GetTextDetection'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

newGetTextDetection Source #

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.

Constructors

GetTextDetectionResponse' 

Fields

Instances

Instances details
Eq GetTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Read GetTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Show GetTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Generic GetTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Associated Types

type Rep GetTextDetectionResponse :: Type -> Type #

NFData GetTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

type Rep GetTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

type Rep GetTextDetectionResponse = D1 ('MetaData "GetTextDetectionResponse" "Amazonka.Rekognition.GetTextDetection" "libZSservicesZSamazonka-rekognitionZSamazonka-rekognition" 'False) (C1 ('MetaCons "GetTextDetectionResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "textDetections") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TextDetectionResult])) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "videoMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe VideoMetadata)))) :*: ((S1 ('MetaSel ('Just "statusMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "textModelVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "jobStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe VideoJobStatus)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

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_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.