# How to get the coordinates of the point that the mouse touch?

How to get the coordinates of the point that the mouse touch?

When my mouse touch the picture that the Mathematica touch ,I hope it can return the coordinates?

-
Right click - Get Coordinates? –  Öskå Sep 15 '13 at 11:57
Or ExampleData[{"TestImage", "Lena"}] and then:  Dynamic[MousePosition["Graphics"]] –  Pinguin Dirk Sep 15 '13 at 11:58

There are two options to interactively extract the pixel location. As suggested by Oska, you can right click on the image and choose Get Coordinates. This returns the coordinates with the origin at the lower left of the image, as if one were using a plot command. Or, you can right click on the image and choose "Get Indices, which returns the indices in row/column form of the image with the origin at the upper left of the image, as if one indexing into a matrix. You can read about why this dual-indexing exists here.
If operating programmatically, then the command MousePosition` accomplishes much the same thing, as suggested by Pinguin Dirk.