How to plot entire boundary points ?
4 views (last 30 days)
Show older comments
Selva Karna
on 22 Aug 2017
Commented: Selva Karna
on 29 Aug 2017
How to plot entire boundary points ? I have 7 cell boundaries i need to plot entire boundaries how is it possible?
3 Comments
José-Luis
on 22 Aug 2017
Most such things are possible.
How?
Difficult to say without knowing your data and what you expect the output to be.
Accepted Answer
Image Analyst
on 25 Aug 2017
You have multiple blobs so multiple boundaries, each of a different length so that's why they're in a cell array. You need to extract each boundary one at a time and plot it. See this snippet. Adapt as needed.
imshow(originalImage);
title('Outlines, from bwboundaries()', 'FontSize', captionFontSize);
axis image; % Make sure image is not artificially stretched because of screen's aspect ratio.
hold on;
boundaries = bwboundaries(binaryImage);
numberOfBoundaries = size(boundaries, 1);
for k = 1 : numberOfBoundaries
thisBoundary = boundaries{k};
plot(thisBoundary(:,2), thisBoundary(:,1), 'g', 'LineWidth', 2);
end
hold off;
2 Comments
More Answers (0)
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!