how to apply a contour to an image

1 Ansicht (letzte 30 Tage)
Ana SIlva
Ana SIlva am 27 Mai 2015
Bearbeitet: Ana SIlva am 27 Mai 2015
Hello,
Does anyone knows how to apply a red contour to the lungs in this image?
I want something like this:
Thank you so much!

Antworten (1)

Image Analyst
Image Analyst am 27 Mai 2015
Try something like this (untested)
hold on;
boundaries = bwboundaries(grayImage > 0);
numberOfBoundaries = size(boundaries, 1);
for k = 1 : numberOfBoundaries
thisBoundary = boundaries{k};
plot(thisBoundary(:,2), thisBoundary(:,1), 'r-', 'LineWidth', 2);
end
hold off;
  1 Kommentar
Ana SIlva
Ana SIlva am 27 Mai 2015
Bearbeitet: Ana SIlva am 27 Mai 2015
First of all, thank you for the answer :)
unfortunately , the output of that code is:
the objective is to fuse this two outputs

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by