0
function [x, y] = get_one_point_from_image(input_image)
% read image
I = im2double(input_image);
handle = subplot(1,1,1);
imshow(I);
% let the user pick one point
[x,y] = ginput(1);
% round to integer to match required input by regiongrowing function
x = round(x);
y = round(y);
close(handle);
end
此例程彈出一個窗口。關閉圖像窗口
我需要那個窗口關閉時,選擇一個點完成。
但是,這個例程不起作用。