Hi Ray,
Thank you very much for the info. I think I figured it out - my numbers were too tall, after resizing it works great. Thanks again! Georg Oberth [email protected] www.godata.at 0043-676-692-6070 0043-3127-88121 Von: [email protected] [mailto:[email protected]] Im Auftrag von Ray Smith Gesendet: Thursday, September 17, 2009 11:02 PM An: [email protected] Betreff: Re: Encoding format with TesseractExtractResult? TesseractExtractResult was written by OCRopus, and they only care about single lines, so it has no way of telling the end of line. The text string is already utf-8. It needs no further conversion. If you want access to the end of line flag, the easiest way is to subclass TessBaseAPI and write a function to extract whatever information you like, based on GetUTF8Text or GetBoxText, or AllWordConfidences, or some combination. (In the 3.00 code on svn.) In some future version, it would be desirable to have an all-purpose function that extends TeseractExtractResult with more useful information. Ray. On Wed, Sep 16, 2009 at 12:43 PM, patrickq <[email protected]> wrote: I am using myTess->TesseractExtractResult(&text, &lengths, &costs, &x0, &y0, &x1, &y1, page_res_pass2) to get the recognized characters separately as well as confidence numbers etc - all is fine, except the returned characters, which seem to include some occasional 2-bytes characters among other, mostly 1-byte characters. I wouldn't mind ignoring all of these characters (which are > 127, i.e. not alpha- numeric ASCII codes) but I am not sure how to properly ignore them: should I treat any char > 127 as a prefix to a double-byte character which includes the next one? I tried to convert "text" (returned by TesseractExtractResult) into a UTF8 string but that fails on occasion depending on the image scanned. The short question is: where can I find the documentation of the encoding of the text array returned by TesseractExtractResult? Can I set a variable to force single-byte values only? And a related question: it seems TesseractExtractResult returns blanks for either and actual blank or a newline position - in both cases with a rect with +/- maxint (32xxx), and I am left with the task to decide if it is a blank or a newline (based on position of previous char). Any variable to just ask Tesseract to generate blanks or newlines itself? Thanks! Patrick --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tesseract-ocr?hl=en -~----------~----~----~----~------~----~------~--~---
<<inline: image001.jpg>>

