Fill in boundaries in Image
Mostrar comentarios más antiguos
How can I fill in the red regions in the image below given by:
%DrawRegions from Binary onto raw image:
labeledImage = bwlabel(Back, 8); % Label each blob so we can make measurements of it
blobMeasurements = regionprops(labeledImage, ROI, 'all'); %ROI is original image
numberOfBlobs = size(blobMeasurements, 1);
hold on;
boundaries = bwboundaries(Back);
numberOfBoundaries = size(boundaries);
subplot(4,5,[1,2,6,7])
hold on
for k = 1 : numberOfBoundaries
thisBoundary = boundaries{k};
plot(thisBoundary(:,2), thisBoundary(:,1), 'r.', 'LineWidth', 1);
end
hold off;
i.e. the red boundaries in the image.

4 comentarios
Mohammad Abouali
el 15 de En. de 2015
Editada: Mohammad Abouali
el 15 de En. de 2015
What do you want to fill it with?
And a side question, the red region apparently comes from the bwlabel of Back. Isn't Back already filled red region then?
Pete sherer
el 25 de Sept. de 2015
any solutions to this? I am trying to do the same
Image Analyst
el 25 de Sept. de 2015
Mohammad's code worked for Jason. Doesn't it work for you? If not, post your image and code in a new question.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
