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

📄 display_segmentation.m.svn-base

📁 fast marching method
💻 SVN-BASE
字号:
function display_segmentation(B,M)% display_segmentation - display a level set segmentation%%   display_segmentation(B,M);%%   B should be <0 inside the region of interest%   M is a background image%   %   See also: perform_active_contour%%   Copyright (c) 2007 Gabriel Peyreif min(B(:))>=0    if max(B(:))>2        % more that one phase        B = cat(3, B>2, mod(B,2) );    end    for k=1:size(B,3)        B(:,:,k) = rescale(B(:,:,k),-1,1);    endendnb_phase = size(B,3);n = size(B,1);M = rescale(M);if nb_phase==1    M1 = M;    M1(B<0) = M1(B<0)*.2;    M = cat(3,M,M1,M1);elseif nb_phase==2    % 2 phases    M1 = M; M2 = M;    M1(B(:,:,1)<0) = M1(B(:,:,1)<0)*.2;    M2(B(:,:,2)<0) = M2(B(:,:,2)<0)*.2;    M = cat(3,M,M1,M2);else    error('Only 1/2 phase accepted');endhold on;imagesc(M); axis image; axis off; axis([1 n 1 n]);for k=1:nb_phase    [c,h] = contour(B(:,:,k),[0 0], 'r');    set(h, 'LineWidth', 2);endhold off;colormap gray(256);axis ij;

⌨️ 快捷键说明

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