amazonka-rekognition-2.0: Amazon Rekognition SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

  • maxResults :: Maybe Natural

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

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

  • 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
ToJSON GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.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

AWSRequest GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Associated Types

type AWSResponse GetTextDetection #

Generic GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Associated Types

type Rep GetTextDetection :: Type -> Type #

Read GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Show GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

NFData GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Methods

rnf :: GetTextDetection -> () #

Eq GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Hashable GetTextDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

type AWSResponse 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" "amazonka-rekognition-2.0-EaCrS9R3rWADqefEZvOx5B" 'False) (C1 ('MetaCons "GetTextDetection'" 'PrefixI 'True) (S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

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:maxResults:GetTextDetection', getTextDetection_maxResults - Maximum number of results to return per paginated call. The largest value you can specify is 1000.

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: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_maxResults :: Lens' GetTextDetection (Maybe Natural) Source #

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

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_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
Generic GetTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Associated Types

type Rep GetTextDetectionResponse :: Type -> Type #

Read GetTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Show GetTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

NFData GetTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetTextDetection

Eq 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" "amazonka-rekognition-2.0-EaCrS9R3rWADqefEZvOx5B" 'False) (C1 ('MetaCons "GetTextDetectionResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "jobStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe VideoJobStatus)) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "statusMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "textDetections") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TextDetectionResult])) :*: S1 ('MetaSel ('Just "textModelVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "videoMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe VideoMetadata)) :*: 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:jobStatus:GetTextDetectionResponse', getTextDetectionResponse_jobStatus - Current status of the text detection job.

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.

GetTextDetectionResponse, getTextDetectionResponse_statusMessage - If the job fails, StatusMessage provides a descriptive error message.

$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:textModelVersion:GetTextDetectionResponse', getTextDetectionResponse_textModelVersion - Version number of the text detection model that was used to detect text.

$sel:videoMetadata:GetTextDetectionResponse', getTextDetectionResponse_videoMetadata - Undocumented member.

$sel:httpStatus:GetTextDetectionResponse', getTextDetectionResponse_httpStatus - The response's http status code.

Response Lenses

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_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_textModelVersion :: Lens' GetTextDetectionResponse (Maybe Text) Source #

Version number of the text detection model that was used to detect text.