【发布时间】:2015-08-11 16:57:13
【问题描述】:
所以我在 Matlab 中创建了一个图像直方图,用户可以使用 imrect 来选择所需的区域。
我希望能够从用户选择的区域中找到最小 y 值。
这是我目前所拥有的:
handles.pet_hist_rect = imrect(gca);
[xmin ymin width height] = getPosition(handles.pet_hist_rect);
xdata = get(findobj(gcf,'type','patch'),'xdata');
ydata = get(findobj(gcf,'type','patch'),'ydata');
我不确定如何从 [xmin, xmin+width] 范围内提取最小 y 值(来自 ydata)
提前致谢!
【问题讨论】:
标签: matlab user-interface histogram