Paste image on coordinates outputted previously [SOLVED]

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Paste image on coordinates outputted previously [SOLVED]

Post by anthony »

NOTE the images from the previous topic are GONE. so I am using the images given near the start of this thead. Now if these images are NOT right, then my handling is not going to be much good!

Remember the difference between a match and non match is not actually the square, but just a few pixels (the bars) which seems to get swamped by the other matching pixels.

What is wanted is some way of matching a smaller neighbourhood in the sub-image we are searching for (the bars) and have it ignore the square colors. I think the first step is to thus pre-process both sub-image and the main image to hightlight the part we are interested in (black bars).

For example fill anything that is NOT black as white, in BOTH images, before giving it to compare
afterwards you can get all matches at the same time.

Code: Select all

convert 58SetLava.gif 18greenCMD.gif  -fuzz 25% -fill white +opaque black  -depth 16 miff:- |
   compare - -dissimilarity-threshold 1.0 -subimage-search null:
Really I don't think you could have picked a worse set of images to compare
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply