How to display a picture and print pixel coordinates when I click?

5

2

When using ImageMagick or similar command line tools it can be useful to know coordinates of some points in the image.

How to display an image (with panning and zooming) and print coordinates of pixels when I click at them?

Nearest thing I found is using ImageMagick's display and clicking the middle mouse button. Magnify 3% window opens with coordinates drawn in overlay. But I need them printed to console, to be reused as arguments in other scripts.

Vi.

Posted 2013-12-27T13:37:59.313

Reputation: 13 705

Answers

3

I ended up coding it myself. You can find my solution here:

https://github.com/vi/DisplayAndPickPixel

Vi.

Posted 2013-12-27T13:37:59.313

Reputation: 13 705

0

Old question, but it might help somebody else: there's imageJ, an app written in Java, which allows to add macros. One of the examples they provide is PickerPixelTool, that lets you click pixels and sends their coordinates to a window, which you can save afterwards.

matiasg

Posted 2013-12-27T13:37:59.313

Reputation: 101