TextFragment
Leave feedback
On this page
Inheritance: java.lang.Object
public class TextFragment
Represents a part of recognized text (word, symbol, etc), extracted by OCR engine.
| Constructor | Description |
|---|---|
| TextFragment(String text, Rectangle rectangle) | Initializes a new instance of the recognized text fragment. |
| Method | Description |
|---|---|
| getText() | Gets a textual content of the recognized text fragment. |
| getRectangle() | Gets a bounding rectangle of the recognized text fragment. |
public TextFragment(String text, Rectangle rectangle)
Initializes a new instance of the recognized text fragment.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| text | java.lang.String | textual content of the recognized text fragment |
| rectangle | java.awt.Rectangle | bounding rectangle of the recognized text fragment |
public String getText()
Gets a textual content of the recognized text fragment.
Returns: java.lang.String
public Rectangle getRectangle()
Gets a bounding rectangle of the recognized text fragment.
Returns: Rectangle
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.