fillc.m
来自「matlab处理图像的一些基本方法。其中有一部分mex程序需要安装编译」· M 代码 · 共 41 行
M
41 行
function pcr=fillc(lc)%FILLC Fill the image contours%% HPATCHES=FILLC(HLINES)%% Claudio 28 Oct 1995% Copyright (c) 1995 by Claudio Rivetti and Mark Young% claudio@alice.uoregon.edu, mark@alice.uoregon.edupc=[];for i=length(lc):-1:1if strcmp(get(lc(i), 'visible'), 'on')==1 X=[get(lc(i), 'Xdata') NaN]; Y=[get(lc(i), 'Ydata') NaN]; Z=[get(lc(i), 'Zdata') NaN]; c=get(lc(i), 'color'); n=find(isnan(X)==1); n=[0 n]; for j=1:length(n)-1 x=X(n(j)+1:n(j+1)-1); y=Y(n(j)+1:n(j+1)-1); z=Z(n(j)+1:n(j+1)-1); p=fill(x,y,c, 'EdgeColor', c); set(p, 'Zdata', z+i*100); pc=[pc;p]; endendendif nargout > 0 pcr=pc;endreturn
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?