use ginput and pushbutton
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!