How to use ResultIterator

445 views
Skip to first unread message

merve t

unread,
Sep 27, 2011, 7:50:51 AM9/27/11
to tesser...@googlegroups.com
Hello,

Is there somebody have ever used ResultIterator?

I do not know if i understand right but i need all possibilities for one word in the text.

There is a pageIteratorLevel property, i think i must pass all paragraph, line, word and symbol number to result iterator to get text and confidence. But some time tesseract thinks one letter instead of two letters in fact.

Thanks for idea.

Mehmet Emre

unread,
Mar 4, 2014, 5:36:38 AM3/4/14
to tesser...@googlegroups.com
i hope i understand your question. so you try this code

    tesseract::ResultIterator* it = _tesseract->GetIterator();

    

    do {

            int top, bottom, left, right;

            it->BoundingBox(tesseract::RIL_WORD, &left, &top, &right, &bottom);

            char* utf8Text = it->GetUTF8Text(tesseract::RIL_WORD);

            //NSString* aBoxText = [NSString stringWithUTF8String:utf8Text];

        

            //NSLog(@"%@ %d ,%d, %d, %d",aBoxText, top, bottom, left, right);

       

    } while (it->Next(tesseract::RIL_WORD));

as you can see, the pageIteratorLevel is like tesseract::RIL_WORD.


regards.
Reply all
Reply to author
Forward
0 new messages