How do I tell matlab to identify vertices within ROI?

3 views (last 30 days)
I want matlab to identify all vertices of the hexagons that will be within an ROI. That ROI can be of any shape (it can be an irregular shape).
Here is my code:
xhex=[0 1 2 2 1 0];
yhex=[2 3 2 1 0 1];
for i=1:k
for q=1:l
hold on
axis equal
h = drawfreehand;
I have attached a picture of a sample ROI.
I will appreciate any advise on this matter. Many thanks.
  1 Comment
Image Analyst
Image Analyst on 16 Jul 2022
This would be so easy with a digital image. Just use h.createMask and bwmorph and find(). But using an analytical image created with patch or fill or whatever, it's trickier (at least for me).

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!