Module NewOCR

Interface Train

  • All Known Implementing Classes:
    OCRTrain

    public interface Train
    The main class that handles training of an image/font.
    Since:
    April 25, 2019
    • 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 from ComputerTrainGenerator 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 from ComputerTrainGenerator or something of a similar format.
        Parameters:
        file - The input image to be trained from
        generatorOptions - The options to use, in order to detect font sizes
      • getTrainedCharacter

        TrainedCharacterData getTrainedCharacter​(java.util.List<TrainedCharacterData> trainedCharacterDataList,
                                                 char current,
                                                 int finalModifier)
        Gets the TrainedCharacterData 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 of TrainedCharacterDatas to search though
        current - The character to find
        finalModifier - The modifier for the character to find
        Returns:
        The TrainedCharacterData with the same character and modifier