How can I detect / calculate if a small pictures is present inside a bigger picture?
What I am trying to accomplish in PHP with GD or ImageMagick is the following: I have one large image (say 2000 x 2000 pixels).. I would like to check if a second, smaller image (say 50 x 50 pixels) appears somewhere inside the larger picture, and to what percentage the area is a match.. So, for example, there's a 95% match of the smaller image at that place in the larger image.. Is this possible? How could this be achieved? Thanks!!!! I had a quick look in PHP's ImageMagick and GD and neither has a built in way of doing that. An approach could be to use ImageMagick to divide the larger image