test.m
来自「对图形图像进行切割的算法」· M 代码 · 共 20 行
M
20 行
%-- Tests growcut.mload test_datasubplot(2,2,1), imshow(img); title('Image');subplot(2,2,2), imshow(labels,[]); title('Seeds');[labels_out, strengths] = growcut(img,labels);labels_out = medfilt2(labels_out,[9,9]);subplot(2,2,3), imshow(img);hold on;contour(labels_out,[0 0],'g','linewidth',4);contour(labels_out,[0 0],'k','linewidth',2);hold off;title('Output');subplot(2,2,4), imshow(labels_out);title('Binary Output');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?