How to apply a prefixed boundary in Active Contour Method?

2 visualizaciones (últimos 30 días)
Tawsif Mostafiz
Tawsif Mostafiz el 26 de Mayo de 2021
Editada: Tawsif Mostafiz el 26 de Mayo de 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
B=roipoly(img);
However, in the Watershed Method code, a boundary is already created by the method, and the boundary is implemented in this way:
[B,L]=bwboundaries(tumor,'noholes');
for i=1:length(B)
[rows, columns, numberOfColorChannels] = size(img);
mask = poly2mask(B{i}(:,2),B{i}(:,1), rows, columns);
end
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?

Respuestas (0)

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by