Search code examples
c#ocrtesseract

Should I crop or pad Tesseract OCR learning boxes


I am currently teaching Tesseract v3.02 to recognise UK driver's license cards. I am using QT Box Editor to generate .box files so I can "train" tesseract to recognise the font and layout of these documents. So a question came up for me: Do I closely crop each letter, or would it be better to give it e.g. a 1px padding all-round?


Solution

  • So the answer is "whatever seems to make the engine recognise text the best". Which you'll only know once you've compiled your *.traineddata file and tested it.