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 »

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
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: detect sub images

Post by fmw42 »

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
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/

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