Ginput does not seem to work for me

7 views (last 30 days)
Valeria Iegorova
Valeria Iegorova on 6 Jan 2021
Good afternoon. I am trying to use
ginput(1)
for getting the coordinates of the point clicked / button input. Full code I'm using: https://github.com/silviazuffi/smalr_online/blob/master/src/annotate_kp_matlab/annotate2DwithQuery_multipleverts.m
However, it does not seem to work for me at all. If I click a point in the image, it is ignored. If I am trying to type something, it just hides the image and brings me to the Command Window on Matlab. I've tried holding down Shift - no result. I've tried to press Return - no result, it just again hides the image and brings me to the Command Window.
What should I do to make it work? I'm using Matlab R2020b.
  2 Comments
Walter Roberson
Walter Roberson on 6 Jan 2021
which -all ginput
Question: are you getting the cross-hairs?
Valeria Iegorova
Valeria Iegorova on 6 Jan 2021
I am getting th cross-hairs. Also, ginput seems to work as expected if I just call it from the command window or from the empty (apart from ginput command) script. So it might have something to do with the rest of the code - not really sure what where makes the input redirected to the command window.

Sign in to comment.

Answers (0)

Categories

Find more on Visual Exploration in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!