BM=roipoly(I), won't load figure window and create an interactive polygon selection tool. Is there a problem with the function?

조회 수: 2 (최근 30일)
It doesn't seem like there are any problems with my code, in reference to the roipoly MATLAB function documentation. Is there something wrong with the function in the version of MATLAB I am using? I am using R2020a.
Code:
img=double(imread('ali.jpg'))./255;
M=roipoly(img);
Errors:
Error in polygonSymbol/initialize (line 49)
h_close_line_bottom = line('Color', 'w', ...
Error in basicPolygon (line 36)
draw_api.initialize(h_group);
Error in impoly>impolyAPI (line 223)
basicPolygonAPI =
basicPolygon(h_group,draw_api,positionConstraintFcn);
Error in impoly (line 99)
[h_group,draw_api] = impolyAPI(varargin{:});
Error in iptui.roiPolygon (line 10)
obj = obj@impoly(h_parent,[]);
Error in createWaitModePolygon (line 17)
h_poly = iptui.roiPolygon(h_ax,finished_cmenu_text);
Error in roipoly>parse_inputs (line 184)
[xi,yi,placement_cancelled] =
createWaitModePolygon(gca,cmenu_text);
Error in roipoly (line 80)
[xdata,ydata,num_rows,num_cols,xi,yi,placement_cancelled] =
parse_inputs(varargin{:});
Error in Untitled2 (line 3)
M=roipoly(img);
  댓글 수: 2
Steve Eddins
Steve Eddins 2022년 3월 15일
I suspect something is wrong with your installation, or perhaps with your MATLAB search path. Is there another version of roipoly on your search path? What is the output of this:
which -all roipoly
Also, were any actual error messages printed? Your question includes only the error stack information (those "Error in" lines).
Finally, was there already a figure window displayed with other content? If so, does the result change if you close all figure windows first?

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

답변 (0개)

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by