Module NewOCR

Class CoordinateCharacter

  • All Implemented Interfaces:
    Direct Known Subclasses:
    ImageLetter, SearchCharacter

    public abstract class CoordinateCharacter
    extends Character
    The superclass for characters containing data from the input image.
    April 25, 2019
    • Constructor Detail

      • CoordinateCharacter

        public CoordinateCharacter()
    • Method Detail

      • getCoordinates

        public java.util.List<IntPair> getCoordinates()
        Gets the coordinates of the character.
        The coordinates
      • getValues

        public boolean[][] getValues()
        Gets the black (true) and white (false) pixels of the scanned character.
        The grid of black or white values
      • setValues

        public void setValues​(boolean[][] values)
        Sets the black (true) and white (false) pixels of the scanned character.
        values - The grid of black or white values. Will return `null` for spaces
      • getAmountOfMerges

        public int getAmountOfMerges()
        Gets how many times the current ImageLetter has been merged via merge(CoordinateCharacter) with another ImageLetter. This value is added every time merge(CoordinateCharacter) is invoked, and adds the amount of merges the argument of that method to the current merge value, as well as incrementing normally.
        The amount of merge operations affecting the current ImageLetter
      • getMergedPieces

        public java.util.Optional<java.util.Map<Letter,​CoordinateCharacter>> getMergedPieces()
        Gets the individual pieces before merging.
        The CoordinateCharacters that have been merged, or null if there have been no merges
      • equals

        public boolean equals​(java.lang.Object obj)
        equals in class Character