0

Is it possible to limit recognition of tesseract to four characters only like this "abcdABCD" ? I've tried this link and created a ".cfg" file inside of my folder TESSDATA which is inside of my project folder.

C:\Users\Julian Concepcion\Desktop\MyProject\MyProject\tessdata

it is named config.cfg, inside the config.cfg is this "tessedit_char_whitelist abcdABCD " but I don't know how to use it inside the c#. This is how I call my tesseract

tess = new Tesseract("C:\\Users\\Julian Concepcion\\Desktop\\MyProject\\MyProject\\tessdata", "eng", Tesseract.OcrEngineMode.OEM_TESSERACT_CUBE_COMBINED);
Community
  • 1
  • 1
julianconcepcion
  • 187
  • 3
  • 18

1 Answers1

0

Do just like that link suggested:

tesseract->SetVariable("tessedit_char_whitelist", "abcdABCD");

No need to create any config file.

nguyenq
  • 8,212
  • 1
  • 16
  • 16