How to draw a line around for each connected components in an edge image. I tried bellow using bwboundaries() but i didn't get expected output.

5 ビュー (過去 30 日間)

採用された回答

Image Analyst
Image Analyst 2018 年 3 月 4 日
This snippet will work:
hold on;
boundaries = bwboundaries(binaryImage);
numberOfBoundaries = size(boundaries, 1);
for k = 1 : numberOfBoundaries
thisBoundary = boundaries{k};
plot(thisBoundary(:,2), thisBoundary(:,1), 'r', 'LineWidth', 2);
end
hold off;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeComputer Vision with Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by