Reputation: 81
In order to classify remote sensing image by using k-means method in matlab, I want to select some samples in an image with an mouse clicking on it, but I don't know how to code that, could you tell me some method to accomplish it?
Upvotes: 0
Views: 89
Reputation: 26069
you can use impoint
, for example:
figure, imshow('pout.tif');
h = impoint(gca,[]);
position = wait(h);
this interactively place a point. Use wait
to block the MATLAB command line. Double-click on the point to resume execution of the MATLAB command line.
position
is specifying the coordinates of the point [X Y].
Upvotes: 2