in reply to Image processing in perl

Let me see if I understand you correctly. You have a source image e.g.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

along with a sample image:

* * * *

And your goal is to discover how many occurrences of the sample image can be found in the source image? If so I don't think that's what ImageMagicks compare is for. If this isn't what you are trying to do please clarify.

Replies are listed 'Best First'.
Re^2: Image processing in perl
by jethro (Monsignor) on Feb 02, 2011 at 10:02 UTC

    You might be wrong about ImageMagick. See the last example with -subimage-search at http://www.imagemagick.org/script/compare.php. The similarity image seems to be what he wants, even though the gif file isn't exactly the data structure a perl programmer wants

      You may be right, I'm no ImageMagick expert. OP seems to want a count of the occurances of subimage in the source image. The output from compare with it's -subimage-search method is the best match ofset and another image, which presents OP with another problem as this only seems to work for the first match. Also, I don't think it's output is limited to gif files, that could just be an example. I think the solutions offered by others, Image::Match with it's match method and possibly Imager::Search are more along the lines of what OP requires.

Re^2: Image processing in perl
by viplav4u1ly (Initiate) on Feb 02, 2011 at 05:27 UTC
    Hi marto, You got my point, what i want from perlmagick module.If i can't do it by compare function then please suggest me how can i do it?