Module NewOCR

Class ComputerTrainGenerator

  • All Implemented Interfaces:
    TrainGenerator

    public class ComputerTrainGenerator
    extends java.lang.Object
    implements TrainGenerator
    Creates a simple image to train on from a given font.
    Since:
    April 25, 2019
    • Method Summary

      Modifier and Type Method Description
      void generateTrainingImage​(java.io.File file)
      Generates an image that can be used while training the OCR using default options of font bounds 90-30, and a font family of Comic Sans MS.
      void generateTrainingImage​(java.io.File file, TrainGeneratorOptions options)
      Generates an image that can be used while training the OCR using the given options.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ComputerTrainGenerator

        public ComputerTrainGenerator()
    • Method Detail

      • generateTrainingImage

        public void generateTrainingImage​(java.io.File file)
        Description copied from interface: TrainGenerator
        Generates an image that can be used while training the OCR using default options of font bounds 90-30, and a font family of Comic Sans MS.
        Specified by:
        generateTrainingImage in interface TrainGenerator
        Parameters:
        file - The file to write to
      • generateTrainingImage

        public void generateTrainingImage​(java.io.File file,
                                          TrainGeneratorOptions options)
        Description copied from interface: TrainGenerator
        Generates an image that can be used while training the OCR using the given options.
        Specified by:
        generateTrainingImage in interface TrainGenerator
        Parameters:
        file - The file to write to
        options - The options used during image generation