public class Text 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.
| 构造器 | 说明 |
|---|---|
Text() |
A constructor used to create a
Text instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
List<TextBlock> |
getBlocks() |
Obtains the detection result of text blocks in a given image.
|
CvPoint[] |
getCornerPoints() |
Obtains the vertex array specified by
CvPoint
for determining the position of curved text in a given image. |
int |
getPageLanguage() |
Obtains the language type for text detection on a given image.
|
CvRect |
getTextRect() |
Obtains the rectangle for determining the position of non-curved text on a given image.
|
String |
getValue() |
Obtains the value for text detection on a given image.
|
void |
setBlocks(List<TextBlock> blocks) |
Sets the detection result of text blocks in a given image.
|
void |
setCornerPoints(CvPoint[] cornerPoints) |
Sets the vertex array specified by
CvPoint for determining the position of curved text in a given image. |
void |
setPageLanguage(int language) |
Sets the language type for text detection on a given image.
|
void |
setText(Text text) |
Creates a
Text instance based on the member variables of an existing Text object. |
void |
setTextRect(CvRect textRect) |
Sets the rectangle for determining the position of non-curved text on a given image.
|
void |
setValue(String value) |
Sets the value for text to be detected on a given image.
|
public void setPageLanguage(int language)
language - Indicates the language type, which is defined in TextConfiguration.public int getPageLanguage()
TextConfiguration.public CvRect getTextRect()
CvRect.public void setTextRect(CvRect textRect)
textRect - Indicates the rectangle specified by CvRect
for determining the position of non-curved text on the given image.public void setValue(String value)
value - Indicates the value for text to be detected on the given image.public String getValue()
public List<TextBlock> getBlocks()
TextBlock detection result.public void setBlocks(List<TextBlock> blocks)
blocks - Indicates the TextBlock detection result.public CvPoint[] getCornerPoints()
CvPoint
for determining the position of curved text in a given image.CvPoint.public void setCornerPoints(CvPoint[] cornerPoints)
CvPoint for determining the position of curved text in a given image.cornerPoints - Indicates the vertex array, which is specified by CvPoint.public void setText(Text text)
Text instance based on the member variables of an existing Text object.text - Indicates the existing Text object.