...=round(dim(2)/2)-90;%计算起始点列坐标row=find(I1(:,col),1);%计算起始点行坐标?connectivity=8;num_points=1390;contour=bwtraceboundary(I1,[row,col],'N',connectivity,num_points);%提取边界b= edge(I2,'sobel');%finding edges[height,width]=siz...
...图像'); s=size(I); for row = 2:55:s(1) for col=1:s(2) if I(row,col), break; end end contour = bwtraceboundary(I, [row, col], 'S', 8, 50,... 'counterclockwise'); if(~isempty(contour)) hold on; plot(contour(...