Get points from a figure

Hi,
I would like to have a function which an image appear then the user can choose which point it was to use on an image. When the user clicks somewhere on the image, its (x,y) coordinate is stored to two variables and some further calculations can be done with this. Is this possible with MATLAB and is there a existing function for this?

 Risposta accettata

Oleg Komarov
Oleg Komarov il 1 Ago 2011
doc ginput

6 Commenti

Lizan
Lizan il 1 Ago 2011
Is it possible for the user to zoom the image before he chooses his point?
Oleg Komarov
Oleg Komarov il 1 Ago 2011
Of course.
Lizan
Lizan il 1 Ago 2011
How?
Also I am getting this message:
Warning: Image is too big to fit on screen; displaying at 50%
> In imuitools/private/initSize at 73
In imshow at 262
What is this about?
Oleg Komarov
Oleg Komarov il 1 Ago 2011
Clicking on the magnifiyng glass.
Resolution of image is bigger than screen resolution so it zoomed out.
Lizan
Lizan il 1 Ago 2011
The magnifying glass button is disabled. Maybe because of this zoom message. Can you remove this message and activate the zoom button?
Many thanks!
Oleg Komarov
Oleg Komarov il 1 Ago 2011
Can you upload your image on tinypic (or other) and post the code you're using?

Accedi per commentare.

Più risposte (0)

Categorie

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by