public class TextBlock extends Object
Text detection utility classes store textual content of different levels.
The specific class for storing textual content is subject to its particular level.
Specifically, text elements stored in TextElement are combined into a text line stored in TextLine;
text lines are combined into a text block stored in TextBlock;
text blocks are combined into text stored in Text of a given image.
| 构造器 | 说明 |
|---|---|
TextBlock() |
A constructor used to create a
TextBlock instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
BoundingBox |
getBoundingBox() |
Obtains the bounding box for detecting the text block.
|
CvPoint[] |
getCornerPoints() |
Obtains the vertex array specified by
CvPoint for determining the position of curved text blocks. |
List<TextLine> |
getTextLines() |
Obtains the detection result of text lines in the text block.
|
String |
getValue() |
Obtains the value for the text block.
|
void |
setBoundingBox(BoundingBox boundingBox) |
Sets the bounding box for detecting the text block.
|
void |
setCornerPoints(CvPoint[] cornerPoints) |
Sets the vertex array specified by
CvPoint for determining the position of curved text blocks. |
void |
setTextLines(List<TextLine> textLines) |
Sets the detection result of text lines in the text block.
|
void |
setValue(String value) |
Sets the value for the text block.
|
public BoundingBox getBoundingBox()
BoundingBox.public void setBoundingBox(BoundingBox boundingBox)
boundingBox - Indicates the bounding box, which is specified by BoundingBox.public String getValue()
public void setValue(String value)
value - Indicates the value for the text block.public List<TextLine> getTextLines()
List<TextLine>.public void setTextLines(List<TextLine> textLines)
textLines - Indicates the detection result of text lines in the text block.
The result is stored in List<TextLine>.public CvPoint[] getCornerPoints()
CvPoint for determining the position of curved text blocks.CvPoint.