Acquiring imrect updated values help
1 次查看(过去 30 天)
显示 更早的评论
Hi all
i was playing with some functions like imrect and impositionrect and i wanted to ask if it is possible in the exapmle below provided by Matlab to get the new position of the rectangle in a matrix and then imediately update another function that depends on those values
figure, imshow('cameraman.tif');
h = imrect(gca, [10 10 100 100]);
addNewPositionCallback(h,@(p) title(mat2str(p,3)));
fcn = makeConstrainToRectFcn('imrect',get(gca,'XLim'),get(gca,'YLim'));
setPositionConstraintFcn(h,fcn);
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 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!