Hi Andres,

I tried including the tessdll.lib.
My code is:
/
******************************************************************************/
IplImage*       img     = cvLoadImage("number36.tif", 0) ;   /// load
image into grayscale
if ( img==NULL )
       return -1;

TessDllAPI api("eng");
api.BeginPageUpright(img     ->width , img     ->height , (unsigned
char *)img     ->imageData, img     ->depth);

ETEXT_DESC      *output = api.Recognize_all_Words();
char    *buffer = NULL ;
buffer = new char [output->count] ;
if ( buffer == NULL )
        return -1;
int i;
for (i = 0; i < output->count; ++i)
{
        const EANYCODE_CHAR             *ch = &output->text[i];
        buffer[i] = ch->char_code ;
}
buffer[i] = '\0';
printf(" OCR: %s\n", buffer);

/
******************************************************************************/

I tried it on an image where we have "36" written, in big caracters,
well segmented, not blured.

When I tried the same image using directly dlltest.exe, it works well,
it recognizes: 36
But with my code (using the lib), it does not work: it recognizes:
'1'ix

Do you have an idea?

Thank you.



On 2 août, 18:55, Andres <[email protected]> wrote:
> Hello Caroline,
>
> Look for dlltest.cpp and see what is being done there.
> Perhaps others in the list might give you better options.
>
> In Windows:
> link with tessdll.lib and be sure to have tessdll.dll in your path
>
> Regards.
>
> 2010/8/2 caro <[email protected]>
>
> > I already use tesseract OCR with command line directly. It works weel.
> > And I would like now to integrate it in a C++ program, first under
> > Linux.
> > Can anyone help me using it?
>
> > And finally, I would like to use it under Windows. I read I have to
> > use the dll, but I do not know how.
>
> > Thank you for your help.
>
> > Caroline
>
> > --
> > 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]<tesseract-ocr%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/tesseract-ocr?hl=en.

-- 
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.

Reply via email to