use ginput and pushbutton

3 次查看(过去 30 天)
sina alizadeh
sina alizadeh 2017-1-15
hi, i wand to store multi click on image and save them after push done button. i store [x , y] coordinate of click in array but when click push button nothing happening . i get the click in while loop :
function pushbutton_callback(src,event , points ,names) // function callback
display(points);
while 1
[xi, yi] = ginput(1); % get coordinate %
%do somthing and save to array click points%
imshow(imageCopy);% image to show for click%
b = uicontrol('Style','pushbutton','Callback',{@pushbutton_callback ,points ,names}); %button%
end
when i click on the button the [x,y] is the past click and not change and nothing happen and run loop again, how to stop the while loop and call pushbutton_callback function . tanx

回答(0 个)

类别

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