http://qs1969.pair.com?node_id=805229

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

Hi monks,
this is probably one of those really obvious questions, that I just missed the answer to whilst searching, but does anyone one know of a module for doing image processing (i.e. edge detection, gaussian masking and the such like). I've tried cpan and google, but can't find anything that actually is useful. If no modules exist, is there a routine for reading in bitmaps so that they can be manipulated as a matrix of pixels (I've got code that does image manipulation in matlab, from a Computer Vision module I'm taking but want to do this in perl)?

Thanks in advance.

Replies are listed 'Best First'.
Re: module for image manipulation
by Corion (Patriarch) on Nov 05, 2009 at 11:12 UTC

    I've had good experience with Imager, which can read images and give you access to their bitmaps. It also has custom kernel functions (for example for edge detection), but I haven't done anything with them.

      Thanks for the quick response, I shall look into this.
Re: module for image manipulation
by keszler (Priest) on Nov 05, 2009 at 11:37 UTC

      I prefer GraphicsMagick, same (awful) API and (great) functionality as ImageMagick but faster and less crufty.

      As above, thanks for the quick response.
Re: module for image manipulation
by zentara (Archbishop) on Nov 05, 2009 at 13:19 UTC
    I would also mention, as a long shot, in case you can't get the results you need from the 2 above mentioned modules; that Gimp-fu, the scripting interface to the great Image program the Gimp, is worth a look : Gimp-Perl-fu

    I would try perlmagick first myself.... but it's syntax can take some getting used to.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku
Re: module for image manipulation
by scorpio17 (Canon) on Nov 05, 2009 at 14:30 UTC
    You might also want to check out PDL (perl data language). There's a steep learning curve, but it's very powerful.
      PDL is on my agenda to learn, the steep curve has put me off for a bit, but I think I should start reading up on it, because more power and usefulness is always a good thing :-)