Placing multiple rectangles using imrect in GUI
显示 更早的评论
Hi everyone!
I am new to gui creation in Matlab and have just worked through the simple Gui tutorial.
What I want to do is the following:
load an image -> drag multiple (e.g. 3) rectangles over the roi using imrect with a specific size (e.g. 32x100 px) and then get the coordinates to process the image only in the specified region by an edge detecting algorithm I programmed.
I am loading and displaying the image using a pushbutton
handles.img_in=imread(load_im());
guidata(hObject,handles)
imshow(handles.img_in);
and I know I can draw a rectangle and get the position via another pushbutton
h=imrect;
rect=uint16(getPosition(h));
can someone help me with the next step that is fixing the size of the rectangle and how to store the data for every instance I click the button and place a rectangle properly?
Every help is appreciated!
Best Wishes, Chris
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!