How to obtain an average polygon out of multiple polygon boundaries?
4 次查看(过去 30 天)
显示 更早的评论
Hi, How do I obtain an average ROI from multiple ROIs drawn on different images? Thank you very much for your help.
Images=dir("*ExampleImage.tif");
S_Boundaries=[];
for i=1 :numel(Images)
Image=imread(Images(i).name);
imshow(Image);
p=drawpolygon();
S_boundary{i}=p.Position
S_Boundaries=[S_Boundaries; S_boundary{i}]
end
AverageBoundary = HelpFunction(S_Boundaries)
%HelpFunction would compute an average boundary from multiple boundaries saved as S_Boundaries.
2 个评论
采纳的回答
Image Analyst
2020-7-14
I already did this for someone else. Luckily I saved the code. It's attached.
5 个评论
Image Analyst
2020-7-14
You can convert your polygons/boundaries into images with the poly2mask() function.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!