See https://tesseract-ocr.github.io/tessdoc/TrainingTesseract-4.00#creating-training-data for more details.