MATLAB: 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. boundariesImage Processing Toolboxoutlines Best Answer 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);endhold off; Related SolutionsMATLAB: To assign different color in boundary. You can use bwboundaries() and plot() to do that:hold on;boundaries = bwboundaries(binaryImage);numberOfBoundaries = size(boundaries, 1);for k = 1 : numberOfBoundaries thisBoundary = boundaries{k}; plot(thisBoundary(:,2), thisBoundary(:,1), 'g', 'LineWidth', 2);endhold off; MATLAB: Help with bwboundaries() function Please define "isolate". Related QuestionHow to apply the result of bwboundaries() outputDistance between edges in video processing.Regionprops didn’t work
Best Answer