How to apply a prefixed boundary in Active Contour Method?

2 views (last 30 days)
Tawsif Mostafiz
Tawsif Mostafiz on 26 May 2021
Edited: Tawsif Mostafiz on 26 May 2021
I have two codes fo image segmentation. One is Watershed Method, and the other is Active Contour Method. In the Active Contour Method code, I have to select a boundary using the roiplay function.
%% create a mask for the breast
However, in the Watershed Method code, a boundary is already created by the method, and the boundary is implemented in this way:
for i=1:length(B)
[rows, columns, numberOfColorChannels] = size(img);
mask = poly2mask(B{i}(:,2),B{i}(:,1), rows, columns);
Where the proparties of tumor is alreay defined.
And the output figure is this:
I want to apply the same boundary to Active Contour Method, without using roiplay. My goal is to merge two codes, where I get the boundary from watershed method, and the boundary is applied into active contour. How can I do that?

Answers (0)




Community Treasure Hunt

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

Start Hunting!

Translated by