Module NewOCR

Class TrainLine

  • All Implemented Interfaces:
    CharacterLine

    public class TrainLine
    extends java.lang.Object
    implements CharacterLine
    Stores characters at a top and bottom Y position after an image has been scanned.
    Since:
    April 25, 2019
    • Constructor Summary

      Constructors 
      Constructor Description
      TrainLine​(java.util.List<SearchCharacter> letters, int topY, int bottomY)
      Creates a new TrainLine with a list of characters populating it.
    • Method Summary

      Modifier and Type Method Description
      int bottomY()
      Gets the top Y coordinate of the line.
      java.util.List<SearchCharacter> getLetters()
      Gets the letters in the line ordered by X value.
      int topY()
      Gets the top Y coordinate of the line.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TrainLine

        public TrainLine​(java.util.List<SearchCharacter> letters,
                         int topY,
                         int bottomY)
        Creates a new TrainLine with a list of characters populating it.
        Parameters:
        letters - The list of SearchCharacters to initially populate the line
        topY - The top Y coordinate of the image the line starts at
        bottomY - The bottom Y coordinate of the image the line ends at
    • Method Detail

      • topY

        public int topY()
        Description copied from interface: CharacterLine
        Gets the top Y coordinate of the line.
        Specified by:
        topY in interface CharacterLine
        Returns:
        The top Y coordinate of the line
      • bottomY

        public int bottomY()
        Description copied from interface: CharacterLine
        Gets the top Y coordinate of the line.
        Specified by:
        bottomY in interface CharacterLine
        Returns:
        The top Y coordinate of the line