How can I get back the original image of the segmented area after using active contour? the background is still black but the segmented area fills with the original colour image.
1 次查看(过去 30 天)
显示 更早的评论
clc clear all; close all; I = imread('B1_51.tif'); I=rgb2gray(I); imshow(I)
str = 'Click to select initial contour location. Double-click to confirm and proceed.';
title(str,'Color','b','FontSize',12);
disp(sprintf('\nNote: Click close to object boundaries for more accurate result.'));
mask = roipoly;
figure, imshow(mask)
title('Initial MASK');
maxIterations = 200;
bw = activecontour(I, mask, maxIterations, 'Chan-Vese');
figure, imshow(bw)
title('Segmented Image')
please give me some idea and comment about this! thank you.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Biomedical Imaging 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!