Class CharacterLevelAnnotation

java.lang.Object
io.scanbot.sdk.documentqualityanalyzer.CharacterLevelAnnotation

public class CharacterLevelAnnotation extends Object
Character level annotation, contains information about the quality of a character in the document.
  • Constructor Details

    • CharacterLevelAnnotation

      public CharacterLevelAnnotation(PointF plotCenter, double plotWidth, double plotHeight, double ocrability, double contrast, double fontSize, double orientation, double orientationNormalized, double orientationDeviation)
      Constructs CharacterLevelAnnotation with the given params.
      Parameters:
      plotCenter - Coordinates of the character's center in the image. The coordinates are in pixels, with (0, 0) being the top-left corner of the image. The rectangle described by the `plotCenter`, `plotWidth`, and `plotHeight` fields serve as a rough estimate of the position of the character in the input image, intended for plotting.
      plotWidth - Width of the character in pixels.
      plotHeight - Height of the character in pixels.
      ocrability - Estimated OCRability of the character, in the range of [0, 1], where 0 means not readable and 1 means perfect readability.
      contrast - Estimated contrast of the character, in the range of [0, 1], where 0 means no contrast and 1 means perfect contrast.
      fontSize - Estimated height of the character in pixels.
      orientation - Orientation of the character in degrees counter-clockwise, where 0 means straight, and the value is in the range of [-180, 180].
      orientationNormalized - Same as `orientation`, but takes into account surrounding characters to smooth the orientation values of characters in a line.
      orientationDeviation - Deviation of the character's normalized orientation from dominant orientation of the line, in degrees.
  • Method Details

    • getPlotCenter

      public PointF getPlotCenter()
      Getter for plotCenter field. See constructor documentation for more information about the field.
      Returns:
      plotCenter
    • getPlotWidth

      public double getPlotWidth()
      Getter for plotWidth field. See constructor documentation for more information about the field.
      Returns:
      plotWidth
    • getPlotHeight

      public double getPlotHeight()
      Getter for plotHeight field. See constructor documentation for more information about the field.
      Returns:
      plotHeight
    • getOcrability

      public double getOcrability()
      Getter for ocrability field. See constructor documentation for more information about the field.
      Returns:
      ocrability
    • getContrast

      public double getContrast()
      Getter for contrast field. See constructor documentation for more information about the field.
      Returns:
      contrast
    • getFontSize

      public double getFontSize()
      Getter for fontSize field. See constructor documentation for more information about the field.
      Returns:
      fontSize
    • getOrientation

      public double getOrientation()
      Getter for orientation field. See constructor documentation for more information about the field.
      Returns:
      orientation
    • getOrientationNormalized

      public double getOrientationNormalized()
      Getter for orientationNormalized field. See constructor documentation for more information about the field.
      Returns:
      orientationNormalized
    • getOrientationDeviation

      public double getOrientationDeviation()
      Getter for orientationDeviation field. See constructor documentation for more information about the field.
      Returns:
      orientationDeviation