public class TextOcrElement extends BasicElement
Represent an OCR block.
Constructor and Description |
---|
TextOcrElement(String name,
Point2D.Float position,
Dimension2D 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.
|
getDataCollections, getName, getPosition, getSize, loadProperties, saveProperties, setName, setPosition, setSize
public TextOcrElement(String name, Point2D.Float position, Dimension2D 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 BasicElement
image
- The image to extract data from.ignored
- Configuration for OMR extraction algorithm (ignored.)public static String getResource()
Gets path to the OCR resources file.
public static void setResource(String value)
Sets path to the OCR resources file. This must be set before data extraction.
Copyright © 2017. All Rights Reserved.