Hi,

If I have a tiny crop of a part of an image, how would I find out if that crop is present in the larger image, and if so, the (x,y) coordinates in the larger image, where the crop is to be found?

I've tried searching this list at http://marc.theaimsgroup.com/?l=imagemagick-user but I don't even know what keywords to look for, so I didn't find anything...

Any help appreciated!

Background: I want to write an app to automate mouse operations in a Windows GUI.

I plan to use the perl module Win32::Screenshot that returns an Image::Magick perl object of the desktop and then look for e.g. "the OK button", and then send a mouse click to $screenshot->locationOf($okButtonImage) + (10,10)

That $okButtonImage can be assumed to be a crop of a previous Win32::Screenshot object from the same desktop, so colors etc. will be the same.

(I'm hoping for the existance of a method like locationOf($otherImage), or to be able to write a similar perl sub or C function)

And because I don't know exactly when the $okButtonImage will appear in the $screenshot, I'll be doing this on a polling basis, so this locationOf() method should ideally be very fast, allowing me to poll often! :D

Hope this is possible!

Peter
--
Peter Valdemar Mørch
http://www.morch.com
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to