필터 지우기
필터 지우기

Hiding markers of polygon ROI

조회 수: 3 (최근 30일)
Trent Okeson
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)

답변 (1개)

Jyotsna Talluri
Jyotsna Talluri 2019년 8월 20일
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
Trent Okeson
Trent Okeson 2019년 8월 20일
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?
Jyotsna Talluri
Jyotsna Talluri 2019년 8월 22일
As of now there is no property to change the markers or marker size of interactive objects using drawpolygon function

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Elementary Polygons에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by