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

Description

Detects text in the input image and converts it into machine-readable text.

Pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, you must pass it as a reference to an image in an Amazon S3 bucket. For the AWS CLI, passing image bytes is not supported. The image must be either a .png or .jpeg formatted file.

The DetectText operation returns text in an array of TextDetection elements, TextDetections. Each TextDetection element provides information about a single word or line of text that was detected in the image.

A word is one or more ISO basic latin script characters that are not separated by spaces. DetectText can detect up to 100 words in an image.

A line is a string of equally spaced words. A line isn't necessarily a complete sentence. For example, a driver's license number is detected as a line. A line ends when there is no aligned text after it. Also, a line ends when there is a large gap between words, relative to the length of the words. This means, depending on the gap between words, Amazon Rekognition may detect multiple lines in text aligned in the same direction. Periods don't represent the end of a line. If a sentence spans multiple lines, the DetectText operation returns multiple lines.

To determine whether a TextDetection element is a line of text or a word, use the TextDetection object Type field.

To be detected, text must be within +/- 90 degrees orientation of the horizontal axis.

For more information, see DetectText in the Amazon Rekognition Developer Guide.

Synopsis

Creating a Request

data DetectText Source #

See: newDetectText smart constructor.

Constructors

DetectText' 

Fields

  • filters :: Maybe DetectTextFilters

    Optional parameters that let you set the criteria that the text must meet to be included in your response.

  • image :: Image

    The input image as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Rekognition operations, you can't pass image bytes.

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to base64-encode image bytes passed using the Bytes field. For more information, see Images in the Amazon Rekognition developer guide.

Instances

Instances details
Eq DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Read DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Show DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Generic DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Associated Types

type Rep DetectText :: Type -> Type #

NFData DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Methods

rnf :: DetectText -> () #

Hashable DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

ToJSON DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

AWSRequest DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Associated Types

type AWSResponse DetectText #

ToHeaders DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Methods

toHeaders :: DetectText -> [Header] #

ToPath DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

ToQuery DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

type Rep DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

type Rep DetectText = D1 ('MetaData "DetectText" "Amazonka.Rekognition.DetectText" "libZSservicesZSamazonka-rekognitionZSamazonka-rekognition" 'False) (C1 ('MetaCons "DetectText'" 'PrefixI 'True) (S1 ('MetaSel ('Just "filters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DetectTextFilters)) :*: S1 ('MetaSel ('Just "image") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Image)))
type AWSResponse DetectText Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

newDetectText Source #

Create a value of DetectText 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:filters:DetectText', detectText_filters - Optional parameters that let you set the criteria that the text must meet to be included in your response.

$sel:image:DetectText', detectText_image - The input image as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Rekognition operations, you can't pass image bytes.

If you are using an AWS SDK to call Amazon Rekognition, you might not need to base64-encode image bytes passed using the Bytes field. For more information, see Images in the Amazon Rekognition developer guide.

Request Lenses

detectText_filters :: Lens' DetectText (Maybe DetectTextFilters) Source #

Optional parameters that let you set the criteria that the text must meet to be included in your response.

detectText_image :: Lens' DetectText Image Source #

The input image as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Rekognition operations, you can't pass image bytes.

If you are using an AWS SDK to call Amazon Rekognition, you might not need to base64-encode image bytes passed using the Bytes field. For more information, see Images in the Amazon Rekognition developer guide.

Destructuring the Response

data DetectTextResponse Source #

See: newDetectTextResponse smart constructor.

Constructors

DetectTextResponse' 

Fields

Instances

Instances details
Eq DetectTextResponse Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Read DetectTextResponse Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Show DetectTextResponse Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Generic DetectTextResponse Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Associated Types

type Rep DetectTextResponse :: Type -> Type #

NFData DetectTextResponse Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

Methods

rnf :: DetectTextResponse -> () #

type Rep DetectTextResponse Source # 
Instance details

Defined in Amazonka.Rekognition.DetectText

type Rep DetectTextResponse = D1 ('MetaData "DetectTextResponse" "Amazonka.Rekognition.DetectText" "libZSservicesZSamazonka-rekognitionZSamazonka-rekognition" 'False) (C1 ('MetaCons "DetectTextResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "textDetections") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TextDetection])) :*: (S1 ('MetaSel ('Just "textModelVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newDetectTextResponse Source #

Create a value of DetectTextResponse 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:DetectTextResponse', detectTextResponse_textDetections - An array of text that was detected in the input image.

$sel:textModelVersion:DetectTextResponse', detectTextResponse_textModelVersion - The model version used to detect text.

$sel:httpStatus:DetectTextResponse', detectTextResponse_httpStatus - The response's http status code.

Response Lenses

detectTextResponse_textDetections :: Lens' DetectTextResponse (Maybe [TextDetection]) Source #

An array of text that was detected in the input image.