I would like to use tesseract to recognize only digits.So I set tesseract like following:
tesseract::TessBaseAPI tess;
tess.SetVariable("tessedit_char_whitelist","0123456789");
tess.Init(tessdata, "eng", tesseract::OEM_DEFAULT);
tess.SetImage((uchar*)im.data, im.size().width, im.size().height, im.channels(), im.step1());
const char* out = tess.GetUTF8Text();
But letters still appeared in the result. I'm new to tesseract, anyone could help to figure out my problem? Thank you.
By the way, the image is a little rotated.