detect sub images

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
sachini de silva
Posts: 3
Joined: 2017-06-27T06:12:10-07:00
Authentication code: 1151

detect sub images

Post by sachini de silva » 2017-06-27T08:02:59-07:00

I implemented a sub image detecting system using the compare command of imagemagick.
command = "compare -metric MAE -subimage-search "+image1+" "+image2+" null: ";
I used the above command in subimage detection. But it gives fine results only for some images. Some times it's detecting wrong images as the sub images of the original image. Can you tell me way to avoid this problem?

User avatar
Posts: 25429
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: detect sub images

Post by fmw42 » 2017-06-27T08:37:53-07:00

Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.. You can post images to any free hosting service and put the URLs here.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620

For novices, see

viewtopic.php?f=1&t=9620 ... essing.php

Please note that subimage detection using compare is sensitive to rotation and scale. So if your images are too different in scale and rotation, it will not work well

Post Reply