1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| figure(1);
imagesc('CData',image,'XData',[x1 x1+m*pix],'YData',[y1 y1+nn*pix]); axis equal; hold on;
% Initially, the list of points is empty.
xy = [];
n = 0;
% Loop, picking up the points.
disp('Left mouse button picks points.');
disp('Right mouse button picks last point.');
File_Path=[feature_dir,FeatName,'.dat'];
File_id=fopen(File_Path,'w');
but = 1;
while but == 1;
[xi,yi,but] = ginput(1);
plot(xi,yi,'ro','MarkerSize',5); hold on;
n = n+1;
xy(:,n) = [xi;yi];
fprintf(File_id,'%g %g \n',xi,yi);
end;
hold off; |
Partager