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
http://www.cit.gu.edu.au/~anthony/graph ... #trim_blur
Just replace the blur-fuzz parts with your color trashing function.
Finding image in image
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/