Pointer circle to close roipoly polygon not showing up in GUIDE GUI

1 次查看(过去 30 天)
Hello,
I am making a GUI using GUIDE that has a webcam preview in it. I am using roipoly to give the user the option to draw a polygon on top of the live display. When I call roipoly in the GUI, the tool works fine except for one feature: when I drag my cursor over the initial coordinate, the cursor does not switch to a circle and clicking on the initial vertex does not close the polygon.
I have tested roipoly on the exact same code outside of GUIDE with the same webcam preview and it works just fine there. Any ideas as to why this feature is not working in GUIDE?
Thanks! Alex
Edit: I think it has something to do with the axes created by GUIDE. When I load the webcam preview within these axes, I get the malfunctioning polygon. However when I delete the axes within GUIDE and load the preview the polygon works! Unfortunately this is not a long term solution because I use those axes in other parts of the code. If someone happens to know what property of the GUIDE axes I need to change to make the polygon work, it would be much appreciated!

采纳的回答

Alexander
Alexander 2017-6-30
Found the problem - the axes created by GUIDE set the SortMethod property to 'depth'. Changing the property to 'childorder' before calling roipoly fixed the problem without affecting the rest of my code.

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by