in reply to Re: Installing tesseract on XP
in thread Installing tesseract on XP

I actually installed it using ppm.

when I run this I get:
use Image::OCR::Tesseract 'get_ocr'; my $image = './hi.jpg'; my $text = get_ocr($image);
Invalid Parameter - -compress 1024 at C:/Perl/site/lib/Image/OCR/Tesseract.pm line 77.

Replies are listed 'Best First'.
Re^3: Installing tesseract on XP
by Anonymous Monk on Jun 25, 2009 at 06:33 UTC
      I ran the code and received:

      "all" is not defined in %Image::OCR::Tesseract::EXPORT_TAGS
      at t2.pl line 3
      main::BEGIN() called at C:/Perl/site/lib/Image
      /OCR/Tesseract.pm line 3
      eval {...} called at C:/Perl/site/lib/Image
      /OCR/Tesseract.pm line 3
      Can't continue after import errors at t2.pl line 3
      BEGIN failed--compilation aborted at t2.pl line 3.
        "all" is not defined

        If you've followed the link supplied by Anonymous, then you've run the test script for version 1.20 of the module. But you probably have an older version of Image::OCR::Tesseract - one that apparently doesn't define the tag "all".

        Any chance that you can update to the latest version of the module ? Looks like it's a pure perl module, so this is probably as simple as grabbing Tesseract.pm from http://search.cpan.org/src/LEOCHARRE/Image-OCR-Tesseract-1.20/lib/Image/OCR/Tesseract.pm and sticking it in your perl/site/lib/Image/OCR folder (overwriting the existing Tesseract.pm).

        Then try the test script again. (That test script might need to be able to locate other files from the source distro - you can get the entire source distro from http://search.cpan.org/~leocharre/Image-OCR-Tesseract-1.20/)

        Cheers,
        Rob