-
- All Known Implementing Classes:
OCRTrain
public interface Train
The main class that handles training of an image/font.- Since:
- April 25, 2019
-
-
Method Summary
Modifier and Type Method Description TrainedCharacterData
getTrainedCharacter(java.util.List<TrainedCharacterData> trainedCharacterDataList, char current, int finalModifier)
Gets theTrainedCharacterData
with the known letter value of the given character, with the same modifier.void
trainImage(java.io.File file)
Scans the input image and creates training data based off of it.void
trainImage(java.io.File file, TrainGeneratorOptions generatorOptions)
Scans the input image and creates training data based off of it.
-
-
-
Method Detail
-
trainImage
void trainImage(java.io.File file)
Scans the input image and creates training data based off of it. It must be an input image created fromComputerTrainGenerator
or something of a similar format.- Parameters:
file
- The input image to be trained from
-
trainImage
void trainImage(java.io.File file, TrainGeneratorOptions generatorOptions)
Scans the input image and creates training data based off of it. It must be an input image created fromComputerTrainGenerator
or something of a similar format.- Parameters:
file
- The input image to be trained fromgeneratorOptions
- The options to use, in order to detect font sizes
-
getTrainedCharacter
TrainedCharacterData getTrainedCharacter(java.util.List<TrainedCharacterData> trainedCharacterDataList, char current, int finalModifier)
Gets theTrainedCharacterData
with the known letter value of the given character, with the same modifier. If a character is not found, it will be created and added to the given list.- Parameters:
trainedCharacterDataList
- The list ofTrainedCharacterData
s to search thoughcurrent
- The character to findfinalModifier
- The modifier for the character to find- Returns:
- The
TrainedCharacterData
with the same character and modifier
-
-