monkeybus has asked for the wisdom of the Perl Monks concerning the following question:

I have scanned a few thousand images that I want to run through Tesseract to OCR the text contained within.

First though, I have to run the images through The Gimp to increase the colour threshold and convert the images to 1 bit indexed monochrome.

Is there a Perl module to take care of this?

Thank you kindly, monks.

Replies are listed 'Best First'.
Re: Controlling The Gimp
by stark (Pilgrim) on Sep 09, 2007 at 08:07 UTC

    It should be possible using modules like Gimp or Gimp::OO, but I have not used them myself and they seem very old.

    Have you considered using ImageMagic or Imager for this task? Just search the CPAN...

    Hope this helps

Re: Controlling The Gimp
by mmmmtmmmm (Monk) on Sep 09, 2007 at 16:23 UTC
Re: Controlling The Gimp
by Anonymous Monk on Sep 09, 2007 at 10:49 UTC
    Easier to use imagemagick's `convert`
      Try, perlmagick if you want to use perl, it is an API to ImageMagick,
      $img->Set(monochrome=>true)
Re: Controlling The Gimp
by perrin (Chancellor) on Sep 10, 2007 at 01:23 UTC
    You may be able to do this more quickly and efficiently with Imager.