How can I apply an automatic ROI selection for a whole set of images?
4 views (last 30 days)
Show older comments
Serena Ditroia
on 25 Jun 2018
Answered: Image Analyst
on 25 Jun 2018
Hi everyone! I'm post-processing some images where an elliptic ROI selection must be applied to build a mask for further calculations. Thanks to previous Mathworks examples I learnt how to read the images and to manually create the ROI selection. Now I would like to apply the same ROI (selected for the first image) to the whole set of images read from a folder.
Is there a way to do that or to keep a record of the shape of the ROI (like center and radius) to apply it later on in the code?
An extract from the code in attachment.
Hope someone can help me! Thanks in advance!
0 Comments
Accepted Answer
Image Analyst
on 25 Jun 2018
Simply put it in an if statement so that it only gets called the first time:
if ii == 1
roi = imellipse;
end
Subsequent iterations will use the roi you setup on the first iteration.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!