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

📄 colorsegments.m

📁 BOOSTING DEMO, A VERY USEFUL DEMO FOR ADABOOST
💻 M
字号:
function img = colorSegments(cube)
% Transforms the segmentation mask into a color image. This  function is
% just intended as a visualization tool. 
% It might introduce artifacts if you try to use this function for segmenting objects.

[nrows, ncols, ncolor] = size(cube);

if ncolor>0
    map = hsv(ncolor);

    cube = reshape(cube, [nrows*ncols ncolor]);
    img = double(cube) * map;
    img = reshape(img, [nrows ncols 3]);

    img(img>1) = 1;

    img = uint8(255*img);
else
    % If it is an indexed map
end

⌨️ 快捷键说明

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