public class TextDetection
extends java.lang.Object
implements java.io.Serializable
Information about a word or line of text detected by DetectText.
The DetectedText
field contains the text that Amazon Rekognition
detected in the image.
Every word and line has an identifier (Id
). Each word belongs to
a line and has a parent identifier (ParentId
) that identifies
the line of text in which the word appears. The word Id
is also
an index for the word within a line of words.
For more information, see Detecting Text in the Amazon Rekognition Developer Guide.
Constructor and Description |
---|
TextDetection() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Float |
getConfidence()
The confidence that Amazon Rekognition has in the accuracy of the
detected text and the accuracy of the geometry points around the detected
text.
|
java.lang.String |
getDetectedText()
The word or line of text recognized by Amazon Rekognition.
|
Geometry |
getGeometry()
The location of the detected text on the image.
|
java.lang.Integer |
getId()
The identifier for the detected text.
|
java.lang.Integer |
getParentId()
The Parent identifier for the detected text identified by the value of
ID . |
java.lang.String |
getType()
The type of text that was detected.
|
int |
hashCode() |
void |
setConfidence(java.lang.Float confidence)
The confidence that Amazon Rekognition has in the accuracy of the
detected text and the accuracy of the geometry points around the detected
text.
|
void |
setDetectedText(java.lang.String detectedText)
The word or line of text recognized by Amazon Rekognition.
|
void |
setGeometry(Geometry geometry)
The location of the detected text on the image.
|
void |
setId(java.lang.Integer id)
The identifier for the detected text.
|
void |
setParentId(java.lang.Integer parentId)
The Parent identifier for the detected text identified by the value of
ID . |
void |
setType(java.lang.String type)
The type of text that was detected.
|
void |
setType(TextTypes type)
The type of text that was detected.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
TextDetection |
withConfidence(java.lang.Float confidence)
The confidence that Amazon Rekognition has in the accuracy of the
detected text and the accuracy of the geometry points around the detected
text.
|
TextDetection |
withDetectedText(java.lang.String detectedText)
The word or line of text recognized by Amazon Rekognition.
|
TextDetection |
withGeometry(Geometry geometry)
The location of the detected text on the image.
|
TextDetection |
withId(java.lang.Integer id)
The identifier for the detected text.
|
TextDetection |
withParentId(java.lang.Integer parentId)
The Parent identifier for the detected text identified by the value of
ID . |
TextDetection |
withType(java.lang.String type)
The type of text that was detected.
|
TextDetection |
withType(TextTypes type)
The type of text that was detected.
|
public java.lang.String getDetectedText()
The word or line of text recognized by Amazon Rekognition.
The word or line of text recognized by Amazon Rekognition.
public void setDetectedText(java.lang.String detectedText)
The word or line of text recognized by Amazon Rekognition.
detectedText
- The word or line of text recognized by Amazon Rekognition.
public TextDetection withDetectedText(java.lang.String detectedText)
The word or line of text recognized by Amazon Rekognition.
Returns a reference to this object so that method calls can be chained together.
detectedText
- The word or line of text recognized by Amazon Rekognition.
public java.lang.String getType()
The type of text that was detected.
Constraints:
Allowed Values: LINE, WORD
The type of text that was detected.
TextTypes
public void setType(java.lang.String type)
The type of text that was detected.
Constraints:
Allowed Values: LINE, WORD
type
- The type of text that was detected.
TextTypes
public TextDetection withType(java.lang.String type)
The type of text that was detected.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: LINE, WORD
type
- The type of text that was detected.
TextTypes
public void setType(TextTypes type)
The type of text that was detected.
Constraints:
Allowed Values: LINE, WORD
type
- The type of text that was detected.
TextTypes
public TextDetection withType(TextTypes type)
The type of text that was detected.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: LINE, WORD
type
- The type of text that was detected.
TextTypes
public java.lang.Integer getId()
The identifier for the detected text. The identifier is only unique for a
single call to DetectText
.
Constraints:
Range: 0 -
The identifier for the detected text. The identifier is only
unique for a single call to DetectText
.
public void setId(java.lang.Integer id)
The identifier for the detected text. The identifier is only unique for a
single call to DetectText
.
Constraints:
Range: 0 -
id
-
The identifier for the detected text. The identifier is only
unique for a single call to DetectText
.
public TextDetection withId(java.lang.Integer id)
The identifier for the detected text. The identifier is only unique for a
single call to DetectText
.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 0 -
id
-
The identifier for the detected text. The identifier is only
unique for a single call to DetectText
.
public java.lang.Integer getParentId()
The Parent identifier for the detected text identified by the value of
ID
. If the type of detected text is LINE
, the
value of ParentId
is Null
.
Constraints:
Range: 0 -
The Parent identifier for the detected text identified by the
value of ID
. If the type of detected text is
LINE
, the value of ParentId
is
Null
.
public void setParentId(java.lang.Integer parentId)
The Parent identifier for the detected text identified by the value of
ID
. If the type of detected text is LINE
, the
value of ParentId
is Null
.
Constraints:
Range: 0 -
parentId
-
The Parent identifier for the detected text identified by the
value of ID
. If the type of detected text is
LINE
, the value of ParentId
is
Null
.
public TextDetection withParentId(java.lang.Integer parentId)
The Parent identifier for the detected text identified by the value of
ID
. If the type of detected text is LINE
, the
value of ParentId
is Null
.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 0 -
parentId
-
The Parent identifier for the detected text identified by the
value of ID
. If the type of detected text is
LINE
, the value of ParentId
is
Null
.
public java.lang.Float getConfidence()
The confidence that Amazon Rekognition has in the accuracy of the detected text and the accuracy of the geometry points around the detected text.
Constraints:
Length: 0 - 100
The confidence that Amazon Rekognition has in the accuracy of the detected text and the accuracy of the geometry points around the detected text.
public void setConfidence(java.lang.Float confidence)
The confidence that Amazon Rekognition has in the accuracy of the detected text and the accuracy of the geometry points around the detected text.
Constraints:
Length: 0 - 100
confidence
- The confidence that Amazon Rekognition has in the accuracy of the detected text and the accuracy of the geometry points around the detected text.
public TextDetection withConfidence(java.lang.Float confidence)
The confidence that Amazon Rekognition has in the accuracy of the detected text and the accuracy of the geometry points around the detected text.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 100
confidence
- The confidence that Amazon Rekognition has in the accuracy of the detected text and the accuracy of the geometry points around the detected text.
public Geometry getGeometry()
The location of the detected text on the image. Includes an axis aligned coarse bounding box surrounding the text and a finer grain polygon for more accurate spatial information.
The location of the detected text on the image. Includes an axis aligned coarse bounding box surrounding the text and a finer grain polygon for more accurate spatial information.
public void setGeometry(Geometry geometry)
The location of the detected text on the image. Includes an axis aligned coarse bounding box surrounding the text and a finer grain polygon for more accurate spatial information.
geometry
- The location of the detected text on the image. Includes an axis aligned coarse bounding box surrounding the text and a finer grain polygon for more accurate spatial information.
public TextDetection withGeometry(Geometry geometry)
The location of the detected text on the image. Includes an axis aligned coarse bounding box surrounding the text and a finer grain polygon for more accurate spatial information.
Returns a reference to this object so that method calls can be chained together.
geometry
- The location of the detected text on the image. Includes an axis aligned coarse bounding box surrounding the text and a finer grain polygon for more accurate spatial information.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.