How to use an impoint?

3 次查看(过去 30 天)
Pani
Pani 2013-7-19
I want to use impoint in the gui that I've created, but I don't know how should I do that. There is a part in my gui that the user should be able to choose 2 pixel on the loaded image and then the program runs another function with the coordinates of those 2 pixels. I want also that the program updates the coordinates when the user changes that points.
  1 个评论
karan padariya
karan padariya 2022-6-28
imshow(image,'Parent',app.UIAxes);hold on;
adding this in your code might work

请先登录,再进行评论。

回答(1 个)

Chad Gilbert
Chad Gilbert 2013-7-19
See help ginput. A minimal working example:
pcolor(rand);
[x,y] = ginput(1);
% User clicks a value.
x = floor(x);
y = floor(y);
  7 个评论
Caleb
Caleb 2013-7-19
When I'm using impoint() the points are draggable. Is there some way you can post a sample of your code?
Pani
Pani 2013-7-19
I did, in my first comment

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Visual Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by