public class TextOcrElement extends OmrElement
Represent an OCR block.
| Constructor and Description |
|---|
TextOcrElement(String name,
Point2D.Float position,
Dimension2D.Float size)
Initializes a new instance of the
TextOcrElement class. |
| Modifier and Type | Method and Description |
|---|---|
String |
extractData(OmrImage image,
OmrConfig ignored)
Extracts data from a portion of scanned OMR sheet assigned to this element.
|
static String |
getResource()
Gets path to the OCR resources file.
|
static void |
setResource(String value)
Sets path to the OCR resources file.
|
getCells, getConfiguration, isHorizontal, isHorizontal, loadProperties, saveProperties, setConfigurationgetName, getPosition, getSize, setName, setPosition, setSizepublic TextOcrElement(String name, Point2D.Float position, Dimension2D.Float size)
Initializes a new instance of the TextOcrElement class.
name - The name of the element.position - Element position, in millimeters, relative to top left corner of an imagesize - Size of the element, in millimeters.public String extractData(OmrImage image, OmrConfig ignored)
Extracts data from a portion of scanned OMR sheet assigned to this element.
extractData in class BasicElementimage - The image to extract data from.ignored - Configuration for OMR extraction algorithm (ignored.)public static String getResource()
Gets path to the OCR resources file. This must be set before data extraction.
public static void setResource(String value)
Sets path to the OCR resources file. This must be set before data extraction.
value - path to the OCR resources fileCopyright © 2014. All rights reserved.