com.aspose.omr.elements

Class TextOcrElement



  • public class TextOcrElement
    extends BasicElement

    Represent an OCR block.

    • Constructor Detail

      • TextOcrElement

        public TextOcrElement(String name,
                      Point2D.Float position,
                      Dimension2D size)

        Initializes a new instance of the TextOcrElement class.

        Parameters:
        name - The name of the element.
        position - Element position, in millimeters, relative to top left corner of an image
        size - Size of the element, in millimeters.
    • Method Detail

      • extractData

        public String extractData(OmrImage image,
                         OmrConfig ignored)

        Extracts data from a portion of scanned OMR sheet assigned to this element.

        Specified by:
        extractData in class BasicElement
        Parameters:
        image - The image to extract data from.
        ignored - Configuration for OMR extraction algorithm (ignored.)
        Returns:
        A string that contains data extracted from the sheet.
      • getResource

        public static String getResource()

        Gets path to the OCR resources file.

      • setResource

        public static void setResource(String value)

        Sets path to the OCR resources file. This must be set before data extraction.