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

📄 plotshapes_xt.m

📁 cootes提出的ASM算法的matlab实现。在cootes用于课堂使用的源代码的基础上改写。改正了原来代码中的一些错误
💻 M
字号:
function PlotShapes(Xu,str,ContoursEndingPoints);%function PlotShapes(Xu,str,ContoursEndingPoints);%ColorsArray={'y*','m*','c*','r*','g*','b*','k*'};%starsColorsArray={'y' ,'m' ,'c' ,'r' ,'g' ,'b' , 'k'}; %continousNumContours=length(ContoursEndingPoints);n=size(Xu,1);% m: 1st , 8th  , 15th ... shape% c: 2nd , 9th  , 16th% r: 3rd , 10th , 17th% g: 4th    .% b: 5th    . % k: 6th    . % y: 7th , 14th ,21st%hold onfor ind1=1:size(Xu,2),   clr=ColorsArray{1+mod(ind1,length(ColorsArray))};   StartPoint=1;   for ind2=1:NumContours,      %plot closed contour-ind2 of shape-ind1      X=[Xu(StartPoint    :ContoursEndingPoints(ind2)    ,ind1);Xu(StartPoint    ,ind1)];      Y=[Xu(StartPoint+n/2:ContoursEndingPoints(ind2)+n/2,ind1);Xu(StartPoint+n/2,ind1)];      plot(X,Y,clr);      title(str);      StartPoint=ContoursEndingPoints(ind2)+1;   endend

⌨️ 快捷键说明

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