How to fill the unclosed region?? activecontour is not working...

1 view (last 30 days)
I want to make like below...
I try to this by using activecontour, but image don't be changed, remain same.
Image is matrix which is consist of 0 and 1
% Fill the cavity
mask = false(row, col);
mask(1:low,1:col) = true;
Image2 = activecontour(Image, mask, 400, 'edge');
what's wrong?? if activecontour is not right way, how to fill the unclosed and disorder region??

Answers (1)

Image Analyst
Image Analyst on 30 Jul 2016
To make each blob convex, use bwconvhull().

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!