Get the confidence degeree from OCR engine

Asked by syscatch

I am a noob in cuneiform, can you please indicate how can I get the degree of confidence for each recognised character from the OCR engine.
I would like to make a patch to export this value in the hocr format.
Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Cuneiform for Linux Edit question
Assignee:
No assignee Edit question
Solved by:
Polevoy Dmitry
Solved:
Last query:
Last reply:
Revision history for this message
Best Polevoy Dmitry (openocr-polevoy) said :
#1

Look at function CED_GetAlternatives() and try to use it in function Static_MakeHTML (rout module, like OneChar). As far as I know, variable named "probability" has no real probabilistic nature - it is a rating from 0 to 255 with unknown probabilistic distribution

Revision history for this message
syscatch (victor-cristinari) said :
#2

Thanks Polevoy Dmitry, that solved my question.

Revision history for this message
syscatch (victor-cristinari) said :
#3

Thanks a lot, this is just what I needed.
By looking at CED_CreateChar in ced/sources/main/wrapper.cpp, I think that value 254 for probability means least probable.