region_seg_demo.m
来自「This code and doucument describe the ima」· M 代码 · 共 26 行
M
26 行
% Demo of "Region Based Active Contours"%% Example:% seg_demo%% Coded by: Shawn Lankton (www.shawnlankton.com)clcclear allclose allI = imread('airplane.jpg'); %-- load the imagem = zeros(size(I,1),size(I,2)); %-- create initial maskm(111:222,123:234) = 1;I = imresize(I,.5); %-- make image smaller m = imresize(m,.5); % for fast computationsubplot(2,2,1); imshow(I); title('Input Image');subplot(2,2,2); imshow(m); title('Initialization');subplot(2,2,3); title('Segmentation');seg = region_seg(I, m, 250); %-- Run segmentationsubplot(2,2,4); imshow(seg); title('Global Region-Based Segmentation');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?