MATLAB Answers

0

Hiding markers of polygon ROI

Trent Okeson さんによって質問されました 2019 年 8 月 14 日
最新アクティビティ Jyotsna Talluri さんによって コメントされました 2019 年 8 月 22 日
I am trying to use the drawpolygon function described here.
I would like to remove the markers, so that only the lines are present. I don't see any options for changing the markersize (only the linewidth). Is there any way to do this?
Example code from matlab:
I = imread('baby.jpg');
figure
imshow(I)
my_vertices = [500 500;400 600;400 700;500 800;600 800;700 700; 700 600];
h = drawpolygon('Position',my_vertices);
% Now I want to set the markers in h to be hidden (or at the very least much smaller than they are now)

  0 件のコメント

サインイン to comment.

タグ

製品


リリース

R2018b

1 件の回答

Answer by Jyotsna Talluri on 20 Aug 2019

Hi,
You can use the 'polyshape' function .Specify the x coordinates and y coordinates of vertices seperately as arguments.
x=[500 400 400 500 600 700 700];
y=[500 600 700 800 800 700 600];
h=polyshape(x,y);
Refer to the link for more details

  2 件のコメント

Polyshape does not include all of the user interactivity that is built into drawpolygon. The user needs to be able to adjust the polygon and add vertices. All of which are already built into the drawpolygon function. Is there a way to change the markers for these interactive objects?
As of now there is no property to change the markers or marker size of interactive objects using drawpolygon function

サインイン to comment.



Translated by