[magick-users] How to locate (x, y) coordinates of one sub-image within another?

Gabe Schaffer magick at gabe.com
Thu Jul 6 21:33:52 PDT 2006


On 7/6/06, Anthony Thyssen <anthony at griffith.edu.au> wrote:
> Peter Valdemar Mørch on  wrote...
> | I'm amazed, though, that this isn't something that is in the standard
> | lib.  Especially since lots of image experience and optimization seems
> | appropriate given the above discussion.
>
> I agree that these sort of functions should be more commonly available.
>
> But I also don't want to specialize the function to the point where
> it is only really useful to a single basic application.
>
> This is why a more general sub-image locating function also needs to be
> able to handle
>   * Fuzzy matching (near by not exact the same color
>     (caused by JPEG distortions, shading, color
>   * Perhaps only matching a high percentage of pixels
>     EG: a small part of the sub-image on the main image was obscured
>     say by other image overlays, copyright notices, etc.
>   * sub-image has transparent areas that are not to be matched against
>     the main image (EG: a shaped image)
>   * The posibility to find multiple matching locations
>
> All of these are of course optional, but the initial algorithm should at
> least be able to be expanded to handle these things.

Those are some great features, but I don't see them as necessary. It's
like saying that a string searching function should really be a
regular expression matcher, when really all that's needed is
case-insensitivity.

GNS



More information about the Magick-users mailing list