Reputation: 2748
Is there any way in matlab to do mouse event handling like click handling?
I need it to develop an application where I'm displaying an image in matlab's imshow. Once user clicks at a particular point on image, I need to know co-ordinates of that point and use them for later processing.
Upvotes: 1
Views: 1886
Reputation: 74940
To capture clicks, you have to define the ButtonDownFcn
property of your IMAGE. The callback can then read the CurrentPoint
property of the AXES and thus determine the coordinates.
Alternatively, you may want to have a look at GINPUT if you want the user to select a fixed number of points.
Upvotes: 2