Re: character confidence...

250 views
Skip to first unread message

Quan Nguyen

unread,
Apr 4, 2013, 8:33:33 AM4/4/13
to tesser...@googlegroups.com
Show us your code.

On Thursday, April 4, 2013 4:00:11 AM UTC-5, priya wrote:
hi,

Does any one know how to find character level confidence, i tried "save_blob_choices" code but it gives only word level confidence. Please let me know if you hav any pointers. 

Quan Nguyen

unread,
Apr 5, 2013, 8:13:17 AM4/5/13
to tesser...@googlegroups.com
I'd move the SetVariable statement after the Init.

On Friday, April 5, 2013 12:47:45 AM UTC-5, priya wrote:
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)));
  }

Quan Nguyen

unread,
Apr 5, 2013, 8:19:13 AM4/5/13
to tesser...@googlegroups.com
The confidence values embedded in the hOCR output are at the word, not character, level.

On Friday, April 5, 2013 1:52:19 AM UTC-5, satuon wrote:
I just found out that Tesseract also supports the hOCR format. But I'm not sure if character-wise confidence levels are available even there. How do I go about parsing it?

inma

unread,
Aug 29, 2014, 4:48:26 AM8/29/14
to tesser...@googlegroups.com, saty...@gmail.com
One question Priya:
In this code you are using a ResultIterator. And you are using two functions: "GetUTF8Text (...)" and "Confidence (...)", correct?
I've searched these functions in "resultiterator.cpp"and I've found the first one but not the second one, "Confidence()".
I'm wrong? Where is this function?
Thanks in advance for your time.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages