However, in some images, the region I want to focus on is small, and
using the zoom-in feature would be nice. Unfortunately, zooming seems
to be disabled when using ginput.
I am currently working around this by using a pause command after
displaying the image, then un-pausing (by hitting enter) before using
ginput, but this is kind of awkward, since I have to click on the
Matlab command window tab before hitting enter.
Is there a better way to zoom when using ginput?
You can't zoom by clicking on the figure when GINPUT is operating -- it
would be ambiguous whether MATLAB should zoom in or select the point when
you click. You could create buttons that call the ZOOM function with a
specific zoom factor, or you could try the first approach I found on the
MathWorks technical support site (www.mathworks.com/support) by searching
for "zoom" and "ginput":
http://www.mathworks.com/support/solutions/data/1-1CBCQ.html?solution=1-1CBCQ
or you could try this:
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=9127
Alternately, if you're using GINPUT to get the coordinates just so you can
display them, take a look at the Data Cursor mode:
http://www.mathworks.com/support/solutions/data/1-UHVFH.html?solution=1-UHVFH
[All three of these came from the technical support site, from that one
search.]
--
Steve Lord
sl...@mathworks.com