digipts.m

来自「hopfield neural network for binary image」· M 代码 · 共 39 行

M
39
字号
% DIGIPTS - digitise points in an image%% Function to digitise points in an image.  Points are digitised by clicking% with the left mouse button.  Clicking any other button terminates the% function.  Each location digitised is marked with a red '+'.%% Usage:  [u,v] = digipts%% where u and v are  nx1 arrays of x and y coordinate values digitised in% the image.%% This function uses the cross-hair cursor provided by GINPUT.  This is% much more useable than IMPIXEL% Peter Kovesi% School of Computer Science & Software Engineering% The University of Western Australia% pk @ csse uwa edu au% http://www.csse.uwa.edu.au/~pk% % May 2002function [u,v] = digipts        hold on    u = []; v = [];    but = 1;    while but == 1	[x y but] = ginput(1);	if but == 1	    u = [u;x];	    v = [v;y];	    	    plot(u,v,'r+');	end    end        hold off

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?