I'd move the SetVariable statement after the Init.
hi
the code which i hav used to find word level confidence is given below, but i need character level confidence. please let me know if u hav any clues or pointers regarding tat...
api.SetVariable("save_blob_choices","T");
api.SetPageSegMode(tesseract::PSM_AUTO);
api.SetImage(pixs);
rc=api.Init(argv[0],lang);
api.Recognize(NULL);
tesseract::ResultIterator* it = api.GetIterator();
if(it!=0)
{
do
{
const char* symbol = it->GetUTF8Text(tesseract::RIL_SYMBOL);
if(symbol!=0)
{
float confi=it->Confidence(tesseract::RIL_SYMBOL);
const tesseract::ResultIterator itr=*it;
}
delete[] symbol;
} while((it->Next(tesseract::RIL_SYMBOL)));
}