MATLAB Answers

How to obtain an average polygon out of multiple polygon boundaries?

10 views (last 30 days)
Hi, How do I obtain an average ROI from multiple ROIs drawn on different images? Thank you very much for your help.
for i=1 :numel(Images)
S_Boundaries=[S_Boundaries; S_boundary{i}]
AverageBoundary = HelpFunction(S_Boundaries)
%HelpFunction would compute an average boundary from multiple boundaries saved as S_Boundaries.


Sudip Paudel
Sudip Paudel on 14 Jul 2020
  • Hi Matt, the average boundary meaning the one that represents the entire set of boundaries (I think a best fit boundary would work). Thank you.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 14 Jul 2020
I already did this for someone else. Luckily I saved the code. It's attached.


Show 2 older comments
Sudip Paudel
Sudip Paudel on 14 Jul 2020
Thank you for your comment. I have to draw the ROI/polygon manually though. I see you have used croppedBlob = props(k).Image; but I have only the boundaries.
Image Analyst
Image Analyst on 14 Jul 2020
You can convert your polygons/boundaries into images with the poly2mask() function.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!