- java.lang.Object
-
- com.uddernetworks.newocr.recognition.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 newTrainLine
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.
-
-
-
Constructor Detail
-
TrainLine
public TrainLine(java.util.List<SearchCharacter> letters, int topY, int bottomY)
Creates a newTrainLine
with a list of characters populating it.- Parameters:
letters
- The list ofSearchCharacter
s to initially populate the linetopY
- The top Y coordinate of the image the line starts atbottomY
- The bottom Y coordinate of the image the line ends at
-
-
Method Detail
-
getLetters
public java.util.List<SearchCharacter> getLetters()
Description copied from interface:CharacterLine
Gets the letters in the line ordered by X value.- Specified by:
getLetters
in interfaceCharacterLine
- Returns:
- The letters in the line
-
topY
public int topY()
Description copied from interface:CharacterLine
Gets the top Y coordinate of the line.- Specified by:
topY
in interfaceCharacterLine
- 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 interfaceCharacterLine
- Returns:
- The top Y coordinate of the line
-
-