How to set Confidence in tesseract

207 views
Skip to first unread message

bergheil

unread,
Mar 17, 2009, 1:23:28 PM3/17/09
to tesseract-ocr
Dear Tesser-Expert,
in the forum I found some information about confidence value for a
recognized word as integer between 1 to 255 (1 is the best).
Is it possibile to select that value running tesseract?
I building a training for Micr-CMC7 number and I would like the 100%
accurancy, so I prefer that tesseract reject a word instead recognize
with a low confidence.
Thanks in advice. Saluti a tutti

Albert Law

unread,
Mar 17, 2009, 2:32:14 PM3/17/09
to tesser...@googlegroups.com
Hi,

I would look through each letter in your word to get the word's confidence. So something like this:


ETEXT_DESC* results = tess->Recognize_all_Words();
for (int iter = 0; iter < results->count; iter++) {
const EANYCODE_CHAR* ch = &results->text[iter];
if (255 > ch->confidence) {
// TODO: reject the letter and thus the whole word associated with it
}
}


-
Albert

Remi Thomas

unread,
Mar 17, 2009, 2:40:19 PM3/17/09
to tesseract-ocr
From my experience, each word letter get the same confidence value =
the word confidence.

Rémi

Albert Law

unread,
Mar 17, 2009, 3:29:55 PM3/17/09
to tesser...@googlegroups.com
Hi Remi,

Mmm, I thought that was a bug.

bergheil

unread,
Mar 18, 2009, 6:01:37 AM3/18/09
to tesseract-ocr
Thanks for answer. I forgot to say that I do not use API but just
command line.
Regards

Debian 4.0
Tesseract 2.03

On Mar 17, 7:32 pm, "Albert Law" <a...@snowbound.com> wrote:
Reply all
Reply to author
Forward
0 new messages