Event listener for multiple draggable rectangles using imrect in matlab
古いコメントを表示
function computeButton_Callback(hObject, eventdata, handles)
% hObject handle to computeButton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
PImage=handles.ProcessedImage;
Image=handles.Image;
imshow(Image);
hold on;
bw=bwconncomp(PImage,4);
regions=regionprops(bw,'BoundingBox','PixelIdxList');
for i=1:length(regions)
box=regions(i).BoundingBox;
h=imrect(gca,box);
%rectangle('Position',box,'EdgeColor','black','LineWidth',2);
end
%I want to make an event listener that would record the
%properties(height,width) of all the rectangles and even
%the changes on each of the draggable rectangles on the Image.
採用された回答
その他の回答 (1 件)
Rajeev Yadav
2022 年 7 月 14 日
編集済み: Rajeev Yadav
2022 年 7 月 14 日
0 投票
Can we add ARROW KEYS (UP ARROW, RIGHT ARROW, LEFT ARROW,DOWN ARROW) with fixed step size control to move the rectangle?
カテゴリ
ヘルプ センター および File Exchange で App Building についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!