Class OcrElement

java.lang.Object
io.scanbot.sdk.ocr.OcrElement
Direct Known Subclasses:
Block, Glyph, Line, Page, Word

public abstract class OcrElement extends Object
Base class for units of text, e.g. glyphs, words, lines, blocks, pages.
  • Constructor Details

    • OcrElement

      public OcrElement(String text, double confidence, List<PointF> roi)
      Constructs OcrElement with the given params.
      Parameters:
      text - The recognized text.
      confidence - Text confidence. Range is [0-1].
      roi - Quad where the text was found in image coordinates. The order of the points is clockwise starting from the top left.
  • Method Details

    • getText

      public String getText()
      Getter for text field. See constructor documentation for more information about the field.
      Returns:
      text
    • getConfidence

      public double getConfidence()
      Getter for confidence field. See constructor documentation for more information about the field.
      Returns:
      confidence
    • getRoi

      public List<PointF> getRoi()
      Getter for roi field. See constructor documentation for more information about the field.
      Returns:
      roi