problem with active contour - image segmentation
古いコメントを表示
Hello, I'm trying to use active contour to create segmentation. my flow is as follow:
- load slide(image) - is a matrix where 1 represent the boundaries of the object otherwise 0.
- creating a mask for the object.
- "put" the mask on the slide and set all the areas outside the mask to 0 - we can call it cleanup.
- enable active contour on 3 result.
I have problem with number 4. as you can see in the picture below, the active contour dosent calculate the boundaries of the object. it calculate the inner area for some reason. my goal is to create boundaries to the object from 3 using active contour. Anyone have idea/hint how to fix it ?

%open the next slide
nextSlide = segMat(:,:,ii);
subplot(2,2,1)
imshow(nextSlide)
title('Original slide')
% create the mask
mask = imdilate(slide ,strel('disk' , 10));
subplot(2,2,2)
imshow(mask)
title('The mask');
%outside the mask countor set 0.
nextSlide(mask == 0 ) = 0;
subplot(2,2,3)
imshow(nextSlide)
title('clenup outside the mask');
% Active contur
bw = activecontour(nextSlide,mask,300,'edge');
subplot(2,2,4)
imshow(bw)
title('Active countour to clean slide using mask');
回答 (1 件)
Image Analyst
2017 年 6 月 4 日
0 投票
I don't know why you're using activecontour() on the mask. Why not simply use the mask as it is? If you, for some reason, want the boundaries of it use bwperim() (to get an image), or bwboundaries() (to get a list of x,y coordinates).
1 件のコメント
Shon Otmazgin
2017 年 6 月 5 日
編集済み: Shon Otmazgin
2017 年 6 月 5 日
カテゴリ
ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
