Finding image in image

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?".
Post Reply
User avatar
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Yes it is posible, but depend on exactly what you are trying to find.

The simplist methof would be to make a copy of the image, trash all the unwanted colors, say using
-fill white -bordercolor red -draw 'color 0,0 border'
to leave just the red colors.

Then -trim the image and look at the info: output, to see what the image trimmed down to. That will be the size and location of your red pixels.

For a simular example of trashing images and trimming to locate some object
see.. Triiming 'Noisy' Images ... #trim_blur

Just replace the blur-fuzz parts with your color trashing function.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
Post Reply