BM=roipoly(I), won't load figure window and create an interactive polygon selection tool. Is there a problem with the function?
4 次查看(过去 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
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 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!