reajust.m

来自「Fusion algorithm example to split a pict」· M 代码 · 共 21 行

M
21
字号
function res = reajust(labels,adj)

labelCourant = 1;

taille = size(adj);
% for i=1:taille(1),
%     for a=1:tailleimg(1)
%         for b=1:
%     labels(labels(:))
%     
%     
% end

res = labels;
for i=1:taille(1),
    a = labels == i;
    if any(a)
        res(a) = labelCourant;
        labelCourant = labelCourant + 1;
    end
end;

⌨️ 快捷键说明

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