⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pick_curves.m.svn-base

📁 fast marching method
💻 SVN-BASE
字号:
function sk = pick_curves(mask)% pick_curves - ask for the user to build a set of curves%%   sk = pick_curves(mask);%%   mask is a background image (should be in [0,1] approx).%%   The user right-click on a set of point which create a curve.%   Left click stop a curve.%   Another left click stop the process.%%   Copyright (c) 2007 Gabriel Peyr?n = size(mask,1);sk = zeros(n);b = 1;while b(end)==1    % draw a line    clf;    imagesc(mask+sk); axis image; axis off;    colormap gray(256);    [y1,x1,b] = ginput(1);    while b==1        clf;        imagesc(mask+sk); axis image; axis off;        [y2,x2,c] = ginput(1);        if c~=1            break;        end        t = linspace(0,1,1000);        x = round( x1*t+x2*(1-t) );        y = round( y1*t+y2*(1-t) );        sk( x+(y-1)*n ) = 1;        x1 = x2; y1 = y2;    endend

⌨️ 快捷键说明

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