I read single characters with C++ and tesseract/leptonica. Below is chunk I use.
is it possible to improve accuracy to use some special function, in case if I read only one character. Of course I have openCV mat with cropped image to fit the character size.
char *outText1;
tesseract::TessBaseAPI *api1 = new tesseract::TessBaseAPI();
if (api1->Init(NULL, "eng")) {
fprintf(stderr, "Could not initialize tesseract.\n");
exit(1); }
api1->SetImage((uchar*)imgWarpCopy1.data, imgWarpCopy1.size().width, imgWarpCopy1.size().height, imgWarpCopy1.channels(), imgWarpCopy1.step1());
outText1 = api1->GetUTF8Text();
int temp1 = strlen(outText1);
string_read = outText1[temp1-3];
api1->End();
delete api1;
delete [] outText1;