Obtaining coordinates of the vertices of the mask

6 views (last 30 days)
Hi all, I have some problems regarding find the vertices of the mask. I obtained the mask from using function impoly. My mask is a polygon with 4 vertices. since i want to use shapeinserter to draw on my frame, the coordinates i will need is [x1 y1 x2 y2 x3 y3 x4 y4 x4 y4]? Thanks!

Answers (1)

Matt J
Matt J on 24 Mar 2014
vertices = getposition(h); %h is handle to the impoly object
  1 Comment
Yin Lok
Yin Lok on 24 Mar 2014
Thanks Matt! so if i want to insert it into the frame is it to step(shape, frame, vertices)? but the matrix of vertices and the draw polygon is not the same.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!