Using graphicsmagick, what is a good way to find the coordinates of a small image inside a bigger image?

StackOverflow https://stackoverflow.com/questions/20480336

Domanda

Question:

Using graphicsmagick, what is a good way to find the coordinates of a small image inside a bigger image?

Explnation:

To explain further, I have a large screen shot that I am working with and would like to find the pixel coordinates of a known icon that is expected to be found somewhere within the screen shot.

Also, if this is not a good library to be using for this purpose, would love to hear suggestions for alternatives that will preferably be compatible with Python.

Thanks so much!

È stato utile?

Soluzione

I use "gm display" to do that.

gm display &

Click on the image. Select Transform, then Crop. Put the cursor at the top left of the small image. Read the coordinates from the small information window. Select "dismiss"

Note that this is a manual method, which is OK if you are really "working with the image" on screen. If you are looking for a batch method, it'll be a little more complex.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top