-
- All Known Implementing Classes:
OCRTrain
public interface TrainThe main class that handles training of an image/font.- Since:
- April 25, 2019
-
-
Method Summary
Modifier and Type Method Description TrainedCharacterDatagetTrainedCharacter(java.util.List<TrainedCharacterData> trainedCharacterDataList, char current, int finalModifier)Gets theTrainedCharacterDatawith the known letter value of the given character, with the same modifier.voidtrainImage(java.io.File file)Scans the input image and creates training data based off of it.voidtrainImage(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 fromComputerTrainGeneratoror 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 fromComputerTrainGeneratoror 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 theTrainedCharacterDatawith 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 ofTrainedCharacterDatas to search thoughcurrent- The character to findfinalModifier- The modifier for the character to find- Returns:
- The
TrainedCharacterDatawith the same character and modifier
-
-