Extract coordinates of similar features

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
djd
Posts: 41
Joined: 2011-11-12T22:20:18-07:00
Authentication code: 8675308

Extract coordinates of similar features

Post by djd »

Is there a script available which can extract the pixel coordinates of similar features in an image?
For example, the location of each of 20 bullet holes in a target.
djd
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Extract coordinates of similar features

Post by snibgo »

Yes, but it depends on what you mean by "similar features". Do you mean a paper target, like a shooting range? If so, that is probably quite simple.

IM contains commands "compare" and "-compare", which do pixel-by-pixel comparisons. So if the pixels in and around each bullet hole correspond, either exactly or roughly, they will be found.

But if the bullet holes vary in size, the pixels won't directly correspond. Scripts can be written to do searching at multiple scales.

Perhaps the bullet holes are in different materials. Again, pixels won't correspond, but a script might be possible.

Image processing techniques might be used to determine the presence or absence of a bullet hole.

Advice can be more specific if you can link to example images. Also please state what version of IM you use, on what platform.
snibgo's IM pages: im.snibgo.com
Post Reply